Class JPEGLosslessDecoder
- java.lang.Object
-
- com.twelvemonkeys.imageio.plugins.jpeg.JPEGLosslessDecoder
-
final class JPEGLosslessDecoder extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private int[][]
acTab
private int[][]
dcTab
private Frame
frame
private int[][][]
HuffTab
private java.util.List<HuffmanTable>
huffTables
private static int[]
IDCT_P
private int[]
IDCT_Source
private javax.imageio.stream.ImageInputStream
input
private JPEGImageReader
listenerDelegate
private int
marker
private int
markerIndex
private int
mask
private static int
MAX_HUFFMAN_SUBTREE
private static int
MSB
private int[]
nBlock
private int
numComp
private int[][]
outputData
private int[][]
qTab
private QuantizationTable
quantTable
private static int
RESTART_MARKER_BEGIN
private static int
RESTART_MARKER_END
private boolean
restarting
private int
restartInterval
private Scan
scan
private int
selection
private int
xDim
private int
xLoc
private int
yDim
private int
yLoc
-
Constructor Summary
Constructors Constructor Description JPEGLosslessDecoder(java.util.List<Segment> segments, javax.imageio.stream.ImageInputStream data, JPEGImageReader listenerDelegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int[][]
decode()
private int
decode(int[] prev, int[] temp, int[] index)
private int
decode0(int[] prev, int[] temp, int[] index)
private int
decodeAny(int[] prev, int[] temp, int[] index)
private int
decodeRGB(int[] prev, int[] temp, int[] index)
private int
decodeSingle(int[] prev, int[] temp, int[] index)
private <T> T
get(java.util.List<Segment> segments, java.lang.Class<T> type)
private <T> java.util.List<T>
getAll(java.util.List<Segment> segments, java.lang.Class<T> type)
private Frame.Component
getComponentSpec(Frame.Component[] components, int sel)
(package private) int
getDimX()
(package private) int
getDimY()
private int
getHuffmanValue(int[] table, int[] temp, int[] index)
private int
getn(int[] pred, int n, int[] temp, int[] index)
(package private) int
getNumComponents()
(package private) int
getPrecision()
private int
getPreviousX(int[] data)
private int
getPreviousXY(int[] data)
private int
getPreviousY(int[] data)
private boolean
isLastPixel()
private boolean
isLossless()
private void
output(int[] pred)
private void
outputAny(int[] pred)
private void
outputRGB(int[] pred)
private void
outputSingle(int[] pred)
private void
processWarningOccured(java.lang.String warning)
private int
readNumber()
private Scan
readScan()
private boolean
useACForDC(int dcTabSel)
-
-
-
Field Detail
-
input
private final javax.imageio.stream.ImageInputStream input
-
listenerDelegate
private final JPEGImageReader listenerDelegate
-
frame
private final Frame frame
-
huffTables
private final java.util.List<HuffmanTable> huffTables
-
quantTable
private final QuantizationTable quantTable
-
scan
private Scan scan
-
HuffTab
private final int[][][] HuffTab
-
IDCT_Source
private final int[] IDCT_Source
-
nBlock
private final int[] nBlock
-
acTab
private final int[][] acTab
-
dcTab
private final int[][] dcTab
-
qTab
private final int[][] qTab
-
restarting
private boolean restarting
-
marker
private int marker
-
markerIndex
private int markerIndex
-
numComp
private int numComp
-
restartInterval
private int restartInterval
-
selection
private int selection
-
xDim
private int xDim
-
yDim
private int yDim
-
xLoc
private int xLoc
-
yLoc
private int yLoc
-
mask
private int mask
-
outputData
private int[][] outputData
-
IDCT_P
private static final int[] IDCT_P
-
RESTART_MARKER_BEGIN
private static final int RESTART_MARKER_BEGIN
- See Also:
- Constant Field Values
-
RESTART_MARKER_END
private static final int RESTART_MARKER_END
- See Also:
- Constant Field Values
-
MAX_HUFFMAN_SUBTREE
private static final int MAX_HUFFMAN_SUBTREE
- See Also:
- Constant Field Values
-
MSB
private static final int MSB
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JPEGLosslessDecoder
JPEGLosslessDecoder(java.util.List<Segment> segments, javax.imageio.stream.ImageInputStream data, JPEGImageReader listenerDelegate)
-
-
Method Detail
-
getDimX
int getDimX()
-
getDimY
int getDimY()
-
getAll
private <T> java.util.List<T> getAll(java.util.List<Segment> segments, java.lang.Class<T> type)
-
get
private <T> T get(java.util.List<Segment> segments, java.lang.Class<T> type)
-
decode
int[][] decode() throws java.io.IOException
- Throws:
java.io.IOException
-
processWarningOccured
private void processWarningOccured(java.lang.String warning)
-
useACForDC
private boolean useACForDC(int dcTabSel)
-
isLossless
private boolean isLossless()
-
getComponentSpec
private Frame.Component getComponentSpec(Frame.Component[] components, int sel)
-
readScan
private Scan readScan() throws java.io.IOException
- Throws:
java.io.IOException
-
decode
private int decode(int[] prev, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
decodeSingle
private int decodeSingle(int[] prev, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
decodeRGB
private int decodeRGB(int[] prev, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
decodeAny
private int decodeAny(int[] prev, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
decode0
private int decode0(int[] prev, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
getHuffmanValue
private int getHuffmanValue(int[] table, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
getn
private int getn(int[] pred, int n, int[] temp, int[] index) throws java.io.IOException
- Throws:
java.io.IOException
-
getPreviousX
private int getPreviousX(int[] data)
-
getPreviousXY
private int getPreviousXY(int[] data)
-
getPreviousY
private int getPreviousY(int[] data)
-
isLastPixel
private boolean isLastPixel()
-
output
private void output(int[] pred)
-
outputSingle
private void outputSingle(int[] pred)
-
outputRGB
private void outputRGB(int[] pred)
-
outputAny
private void outputAny(int[] pred)
-
readNumber
private int readNumber() throws java.io.IOException
- Throws:
java.io.IOException
-
getNumComponents
int getNumComponents()
-
getPrecision
int getPrecision()
-
-