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 intBLOCK_TYPESprivate static intCOEF_BANDSprivate int[][][][]coefProbsprivate booleandebugprivate intfilterLevelprivate javax.imageio.stream.ImageInputStreamframeprivate intframeTypeprivate intheightprivate javax.imageio.event.IIOReadProgressListenerlistenerprivate intmacroBlockColsprivate intmacroBlockNoCoeffSkipprivate intmacroBlockRowsprivate MacroBlock[][]macroBlocksprivate intmacroBlockSegementAbsoluteDeltaprivate int[]macroBlockSegmentTreeProbsprivate static intMAX_ENTROPY_TOKENSprivate static intMAX_MODE_LF_DELTASprivate static intMAX_REF_LF_DELTASprivate int[]modeLoopFilterDeltasprivate intmodeRefLoopFilterDeltaEnabledprivate intmodeRefLoopFilterDeltaUpdateprivate intmultiTokenPartitionprivate longoffsetprivate static intPREV_COEF_CONTEXTSprivate int[]refLoopFilterDeltasprivate intrefreshEntropyProbsprivate intrefreshLastFrameprivate byte[]rgbprivate intsegmentationIsEnabledprivate SegmentQuantssegmentQuantsprivate intsharpnessLevelprivate booleansimpleFilterprivate BoolDecodertokenBoolDecoderprivate java.util.List<BoolDecoder>tokenBoolDecodersprivate intupdateMacroBlockSegmentationMapprivate intupdateMacroBlockSegmentatonDataprivate intwidthprivate 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 voidcopyBlock(MacroBlock macroBlock, java.awt.image.WritableRaster byteRGBRaster, java.awt.Rectangle region, int xSubsampling, int ySubsampling)private voidcreateMacroBlocks()booleandecode(java.awt.image.WritableRaster raster, javax.imageio.ImageReadParam param)private voiddecodeMacroBlockRow(int mbRow, java.awt.image.WritableRaster raster, java.awt.Rectangle region, int xSubsampling, int ySubsampling)private voidfireProgressUpdate(int mbRow)SubBlockgetAboveRightSubBlock(SubBlock sb, SubBlock.Plane plane)SubBlockgetAboveSubBlock(SubBlock sb, SubBlock.Plane plane)private intgetBitAsInt(int data, int bit)(package private) int[][][][]getCoefProbs()java.awt.image.BufferedImagegetDebugImageDiff()java.awt.image.BufferedImagegetDebugImagePredict()java.awt.image.BufferedImagegetDebugImageUBuffer()java.awt.image.BufferedImagegetDebugImageUDiffBuffer()java.awt.image.BufferedImagegetDebugImageUPredBuffer()java.awt.image.BufferedImagegetDebugImageVBuffer()java.awt.image.BufferedImagegetDebugImageVDiffBuffer()java.awt.image.BufferedImagegetDebugImageVPredBuffer()java.awt.image.BufferedImagegetDebugImageYBuffer()java.awt.image.BufferedImagegetDebugImageYDiffBuffer()java.awt.image.BufferedImagegetDebugImageYPredBuffer()intgetFrameType()intgetHeight()SubBlockgetLeftSubBlock(SubBlock sb, SubBlock.Plane plane)MacroBlockgetMacroBlock(int mbCol, int mbRow)intgetMacroBlockCols()java.lang.StringgetMacroBlockDebugString(int mbx, int mby, int sbx, int sby)intgetMacroBlockRows()intgetQIndex()SegmentQuantsgetSegmentQuants()intgetSharpnessLevel()BoolDecodergetTokenBoolDecoder()intgetWidth()private voidreadModes(BoolDecoder bc)private intreadPartitionSize(long l)private intreadSubBlockMode(BoolDecoder bc, int A, int L)private intreadUvMode(BoolDecoder bc)private intreadYMode(BoolDecoder bc)voidsetProgressListener(javax.imageio.event.IIOReadProgressListener listener)private voidsetupTokenDecoder(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)
-
-