Class VP8LDecoder
java.lang.Object
com.twelvemonkeys.imageio.plugins.webp.lossless.VP8LDecoder
VP8LDecoder.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final byte[]Used for decoding backward references Upper 4Bits are y distance, lower 4 Bits are 8 minus x distanceprivate final ImageInputStreamprivate final LSBBitReader -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopyIntoRasterWithParams(Raster srcRaster, WritableRaster dstRaster, ImageReadParam param) Copy a source raster into a destination raster with optional settings applied.private WritableRastercreateDecodeRaster(WritableRaster raster, ImageReadParam param, Rectangle bounds) private intdecodeBwRef(WritableRaster raster, ColorCache colorCache, int width, HuffmanCodeGroup curCodeGroup, byte[] rgba, short code, int x, int y) private voiddecodeCached(WritableRaster raster, ColorCache colorCache, byte[] rgba, int y, int x, short code) private voiddecodeImage(WritableRaster raster, HuffmanInfo huffmanInfo, ColorCache colorCache) private voiddecodeLiteral(WritableRaster raster, ColorCache colorCache, HuffmanCodeGroup curCodeGroup, byte[] rgba, int y, int x, short code) private intlz77decode(int prefixCode) private HuffmanInforeadHuffmanCodes(int xSize, int ySize, int colorCacheBits, boolean readMetaCodes) private intreadTransform(int xSize, int ySize, List<Transform> transforms) voidreadVP8Lossless(WritableRaster raster, boolean topLevel, ImageReadParam param, int width, int height) private static intsubSampleSize(int size, int samplingBits)
-
Field Details
-
DISTANCES
private static final byte[] DISTANCESUsed for decoding backward references Upper 4Bits are y distance, lower 4 Bits are 8 minus x distance -
imageInput
-
lsbBitReader
-
-
Constructor Details
-
VP8LDecoder
-
-
Method Details
-
readVP8Lossless
public void readVP8Lossless(WritableRaster raster, boolean topLevel, ImageReadParam param, int width, int height) throws IOException - Throws:
IOException
-
createDecodeRaster
private WritableRaster createDecodeRaster(WritableRaster raster, ImageReadParam param, Rectangle bounds) -
copyIntoRasterWithParams
public static void copyIntoRasterWithParams(Raster srcRaster, WritableRaster dstRaster, ImageReadParam param) Copy a source raster into a destination raster with optional settings applied. -
decodeImage
private void decodeImage(WritableRaster raster, HuffmanInfo huffmanInfo, ColorCache colorCache) throws IOException - Throws:
IOException
-
decodeCached
private void decodeCached(WritableRaster raster, ColorCache colorCache, byte[] rgba, int y, int x, short code) -
decodeLiteral
private void decodeLiteral(WritableRaster raster, ColorCache colorCache, HuffmanCodeGroup curCodeGroup, byte[] rgba, int y, int x, short code) throws IOException - Throws:
IOException
-
decodeBwRef
private int decodeBwRef(WritableRaster raster, ColorCache colorCache, int width, HuffmanCodeGroup curCodeGroup, byte[] rgba, short code, int x, int y) throws IOException - Throws:
IOException
-
lz77decode
- Throws:
IOException
-
readTransform
- Throws:
IOException
-
readHuffmanCodes
private HuffmanInfo readHuffmanCodes(int xSize, int ySize, int colorCacheBits, boolean readMetaCodes) throws IOException - Throws:
IOException
-
subSampleSize
private static int subSampleSize(int size, int samplingBits)
-