Class VP8Frame
- java.lang.Object
-
- com.twelvemonkeys.imageio.plugins.webp.vp8.VP8Frame
-
public final class VP8Frame extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BLOCK_TYPES
private static int
COEF_BANDS
private int[][][][]
coefProbs
private boolean
debug
private int
filterLevel
private javax.imageio.stream.ImageInputStream
frame
private int
frameType
private int
height
private javax.imageio.event.IIOReadProgressListener
listener
private int
macroBlockCols
private int
macroBlockNoCoeffSkip
private int
macroBlockRows
private MacroBlock[][]
macroBlocks
private int
macroBlockSegementAbsoluteDelta
private int[]
macroBlockSegmentTreeProbs
private static int
MAX_ENTROPY_TOKENS
private static int
MAX_MODE_LF_DELTAS
private static int
MAX_REF_LF_DELTAS
private int[]
modeLoopFilterDeltas
private int
modeRefLoopFilterDeltaEnabled
private int
modeRefLoopFilterDeltaUpdate
private int
multiTokenPartition
private long
offset
private static int
PREV_COEF_CONTEXTS
private int[]
refLoopFilterDeltas
private int
refreshEntropyProbs
private int
refreshLastFrame
private byte[]
rgb
private int
segmentationIsEnabled
private SegmentQuants
segmentQuants
private int
sharpnessLevel
private boolean
simpleFilter
private BoolDecoder
tokenBoolDecoder
private java.util.List<BoolDecoder>
tokenBoolDecoders
private int
updateMacroBlockSegmentationMap
private int
updateMacroBlockSegmentatonData
private int
width
private byte[]
yuv
-
Constructor Summary
Constructors Constructor Description VP8Frame(javax.imageio.stream.ImageInputStream stream, boolean debug)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
copyBlock(MacroBlock macroBlock, java.awt.image.WritableRaster byteRGBRaster, java.awt.Rectangle region, int xSubsampling, int ySubsampling)
private void
createMacroBlocks()
boolean
decode(java.awt.image.WritableRaster raster, javax.imageio.ImageReadParam param)
private void
decodeMacroBlockRow(int mbRow, java.awt.image.WritableRaster raster, java.awt.Rectangle region, int xSubsampling, int ySubsampling)
private void
fireProgressUpdate(int mbRow)
SubBlock
getAboveRightSubBlock(SubBlock sb, SubBlock.Plane plane)
SubBlock
getAboveSubBlock(SubBlock sb, SubBlock.Plane plane)
private int
getBitAsInt(int data, int bit)
(package private) int[][][][]
getCoefProbs()
java.awt.image.BufferedImage
getDebugImageDiff()
java.awt.image.BufferedImage
getDebugImagePredict()
java.awt.image.BufferedImage
getDebugImageUBuffer()
java.awt.image.BufferedImage
getDebugImageUDiffBuffer()
java.awt.image.BufferedImage
getDebugImageUPredBuffer()
java.awt.image.BufferedImage
getDebugImageVBuffer()
java.awt.image.BufferedImage
getDebugImageVDiffBuffer()
java.awt.image.BufferedImage
getDebugImageVPredBuffer()
java.awt.image.BufferedImage
getDebugImageYBuffer()
java.awt.image.BufferedImage
getDebugImageYDiffBuffer()
java.awt.image.BufferedImage
getDebugImageYPredBuffer()
int
getFrameType()
int
getHeight()
SubBlock
getLeftSubBlock(SubBlock sb, SubBlock.Plane plane)
MacroBlock
getMacroBlock(int mbCol, int mbRow)
int
getMacroBlockCols()
java.lang.String
getMacroBlockDebugString(int mbx, int mby, int sbx, int sby)
int
getMacroBlockRows()
int
getQIndex()
SegmentQuants
getSegmentQuants()
int
getSharpnessLevel()
BoolDecoder
getTokenBoolDecoder()
int
getWidth()
private void
readModes(BoolDecoder bc)
private int
readPartitionSize(long l)
private int
readSubBlockMode(BoolDecoder bc, int A, int L)
private int
readUvMode(BoolDecoder bc)
private int
readYMode(BoolDecoder bc)
void
setProgressListener(javax.imageio.event.IIOReadProgressListener listener)
private void
setupTokenDecoder(BoolDecoder bc, int first_partition_length_in_bytes, long offset)
-
-
-
Field Detail
-
BLOCK_TYPES
private static final int BLOCK_TYPES
- See Also:
- Constant Field Values
-
COEF_BANDS
private static final int COEF_BANDS
- See Also:
- Constant Field Values
-
MAX_ENTROPY_TOKENS
private static final int MAX_ENTROPY_TOKENS
- See Also:
- Constant Field Values
-
MAX_MODE_LF_DELTAS
private static final int MAX_MODE_LF_DELTAS
- See Also:
- Constant Field Values
-
MAX_REF_LF_DELTAS
private static final int MAX_REF_LF_DELTAS
- See Also:
- Constant Field Values
-
PREV_COEF_CONTEXTS
private static final int PREV_COEF_CONTEXTS
- See Also:
- Constant Field Values
-
listener
private javax.imageio.event.IIOReadProgressListener listener
-
coefProbs
private final int[][][][] coefProbs
-
filterLevel
private int filterLevel
-
frame
private final javax.imageio.stream.ImageInputStream frame
-
debug
private final boolean debug
-
frameType
private int frameType
-
height
private int height
-
macroBlockCols
private int macroBlockCols
-
macroBlockNoCoeffSkip
private int macroBlockNoCoeffSkip
-
macroBlockRows
private int macroBlockRows
-
macroBlocks
private MacroBlock[][] macroBlocks
-
macroBlockSegementAbsoluteDelta
private int macroBlockSegementAbsoluteDelta
-
macroBlockSegmentTreeProbs
private int[] macroBlockSegmentTreeProbs
-
modeLoopFilterDeltas
private final int[] modeLoopFilterDeltas
-
modeRefLoopFilterDeltaEnabled
private int modeRefLoopFilterDeltaEnabled
-
modeRefLoopFilterDeltaUpdate
private int modeRefLoopFilterDeltaUpdate
-
multiTokenPartition
private int multiTokenPartition
-
offset
private long offset
-
refLoopFilterDeltas
private final int[] refLoopFilterDeltas
-
refreshEntropyProbs
private int refreshEntropyProbs
-
refreshLastFrame
private int refreshLastFrame
-
segmentationIsEnabled
private int segmentationIsEnabled
-
segmentQuants
private SegmentQuants segmentQuants
-
sharpnessLevel
private int sharpnessLevel
-
simpleFilter
private boolean simpleFilter
-
tokenBoolDecoder
private BoolDecoder tokenBoolDecoder
-
tokenBoolDecoders
private final java.util.List<BoolDecoder> tokenBoolDecoders
-
updateMacroBlockSegmentationMap
private int updateMacroBlockSegmentationMap
-
updateMacroBlockSegmentatonData
private int updateMacroBlockSegmentatonData
-
width
private int width
-
yuv
private final byte[] yuv
-
rgb
private final byte[] rgb
-
-
Method Detail
-
setProgressListener
public void setProgressListener(javax.imageio.event.IIOReadProgressListener listener)
-
createMacroBlocks
private void createMacroBlocks()
-
decode
public boolean decode(java.awt.image.WritableRaster raster, javax.imageio.ImageReadParam param) throws java.io.IOException
- Throws:
java.io.IOException
-
decodeMacroBlockRow
private void decodeMacroBlockRow(int mbRow, java.awt.image.WritableRaster raster, java.awt.Rectangle region, int xSubsampling, int ySubsampling) throws java.io.IOException
- Throws:
java.io.IOException
-
fireProgressUpdate
private void fireProgressUpdate(int mbRow)
-
getAboveRightSubBlock
public SubBlock getAboveRightSubBlock(SubBlock sb, SubBlock.Plane plane)
-
getAboveSubBlock
public SubBlock getAboveSubBlock(SubBlock sb, SubBlock.Plane plane)
-
getBitAsInt
private int getBitAsInt(int data, int bit)
-
getCoefProbs
int[][][][] getCoefProbs()
-
getDebugImageDiff
public java.awt.image.BufferedImage getDebugImageDiff()
-
getDebugImagePredict
public java.awt.image.BufferedImage getDebugImagePredict()
-
getDebugImageUBuffer
public java.awt.image.BufferedImage getDebugImageUBuffer()
-
getDebugImageUDiffBuffer
public java.awt.image.BufferedImage getDebugImageUDiffBuffer()
-
getDebugImageUPredBuffer
public java.awt.image.BufferedImage getDebugImageUPredBuffer()
-
getDebugImageVBuffer
public java.awt.image.BufferedImage getDebugImageVBuffer()
-
getDebugImageVDiffBuffer
public java.awt.image.BufferedImage getDebugImageVDiffBuffer()
-
getDebugImageVPredBuffer
public java.awt.image.BufferedImage getDebugImageVPredBuffer()
-
getDebugImageYBuffer
public java.awt.image.BufferedImage getDebugImageYBuffer()
-
getDebugImageYDiffBuffer
public java.awt.image.BufferedImage getDebugImageYDiffBuffer()
-
getDebugImageYPredBuffer
public java.awt.image.BufferedImage getDebugImageYPredBuffer()
-
getFrameType
public int getFrameType()
-
getWidth
public int getWidth()
-
getHeight
public int getHeight()
-
getLeftSubBlock
public SubBlock getLeftSubBlock(SubBlock sb, SubBlock.Plane plane)
-
getMacroBlock
public MacroBlock getMacroBlock(int mbCol, int mbRow)
-
getMacroBlockCols
public int getMacroBlockCols()
-
getMacroBlockDebugString
public java.lang.String getMacroBlockDebugString(int mbx, int mby, int sbx, int sby)
-
getMacroBlockRows
public int getMacroBlockRows()
-
getQIndex
public int getQIndex()
-
getSegmentQuants
public SegmentQuants getSegmentQuants()
-
getSharpnessLevel
public int getSharpnessLevel()
-
getTokenBoolDecoder
public BoolDecoder getTokenBoolDecoder() throws java.io.IOException
- Throws:
java.io.IOException
-
readModes
private void readModes(BoolDecoder bc) throws java.io.IOException
- Throws:
java.io.IOException
-
readPartitionSize
private int readPartitionSize(long l) throws java.io.IOException
- Throws:
java.io.IOException
-
readSubBlockMode
private int readSubBlockMode(BoolDecoder bc, int A, int L) throws java.io.IOException
- Throws:
java.io.IOException
-
readUvMode
private int readUvMode(BoolDecoder bc) throws java.io.IOException
- Throws:
java.io.IOException
-
readYMode
private int readYMode(BoolDecoder bc) throws java.io.IOException
- Throws:
java.io.IOException
-
setupTokenDecoder
private void setupTokenDecoder(BoolDecoder bc, int first_partition_length_in_bytes, long offset) throws java.io.IOException
- Throws:
java.io.IOException
-
copyBlock
private void copyBlock(MacroBlock macroBlock, java.awt.image.WritableRaster byteRGBRaster, java.awt.Rectangle region, int xSubsampling, int ySubsampling)
-
-