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 ImageInputStream
private final LSBBitReader
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
copyIntoRasterWithParams
(Raster srcRaster, WritableRaster dstRaster, ImageReadParam param) Copy a source raster into a destination raster with optional settings applied.private WritableRaster
createDecodeRaster
(WritableRaster raster, ImageReadParam param, Rectangle bounds) private int
decodeBwRef
(WritableRaster raster, ColorCache colorCache, int width, HuffmanCodeGroup curCodeGroup, byte[] rgba, short code, int x, int y) private void
decodeCached
(WritableRaster raster, ColorCache colorCache, byte[] rgba, int y, int x, short code) private void
decodeImage
(WritableRaster raster, HuffmanInfo huffmanInfo, ColorCache colorCache) private void
decodeLiteral
(WritableRaster raster, ColorCache colorCache, HuffmanCodeGroup curCodeGroup, byte[] rgba, int y, int x, short code) private int
lz77decode
(int prefixCode) private HuffmanInfo
readHuffmanCodes
(int xSize, int ySize, int colorCacheBits, boolean readMetaCodes) private int
readTransform
(int xSize, int ySize, List<Transform> transforms) void
readVP8Lossless
(WritableRaster raster, boolean topLevel, ImageReadParam param, int width, int height) private static int
subSampleSize
(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)
-