Class VP8LDecoder
- java.lang.Object
-
- com.twelvemonkeys.imageio.plugins.webp.lossless.VP8LDecoder
-
public final class VP8LDecoder extends java.lang.ObjectVP8LDecoder.
-
-
Field Summary
Fields Modifier and Type Field Description private static byte[]DISTANCESUsed for decoding backward references Upper 4Bits are y distance, lower 4 Bits are 8 minus x distanceprivate javax.imageio.stream.ImageInputStreamimageInputprivate LSBBitReaderlsbBitReader
-
Constructor Summary
Constructors Constructor Description VP8LDecoder(javax.imageio.stream.ImageInputStream imageInput, boolean debug)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcopyIntoRasterWithParams(java.awt.image.Raster srcRaster, java.awt.image.WritableRaster dstRaster, javax.imageio.ImageReadParam param)Copy a source raster into a destination raster with optional settings applied.private java.awt.image.WritableRastercreateDecodeRaster(java.awt.image.WritableRaster raster, javax.imageio.ImageReadParam param, java.awt.Rectangle bounds)private intdecodeBwRef(java.awt.image.WritableRaster raster, ColorCache colorCache, int width, HuffmanCodeGroup curCodeGroup, byte[] rgba, short code, int x, int y)private voiddecodeCached(java.awt.image.WritableRaster raster, ColorCache colorCache, byte[] rgba, int y, int x, short code)private voiddecodeImage(java.awt.image.WritableRaster raster, HuffmanInfo huffmanInfo, ColorCache colorCache)private voiddecodeLiteral(java.awt.image.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, java.util.List<Transform> transforms)voidreadVP8Lossless(java.awt.image.WritableRaster raster, boolean topLevel, javax.imageio.ImageReadParam param, int width, int height)private static intsubSampleSize(int size, int samplingBits)
-
-
-
Field Detail
-
DISTANCES
private static final byte[] DISTANCES
Used for decoding backward references Upper 4Bits are y distance, lower 4 Bits are 8 minus x distance
-
imageInput
private final javax.imageio.stream.ImageInputStream imageInput
-
lsbBitReader
private final LSBBitReader lsbBitReader
-
-
Method Detail
-
readVP8Lossless
public void readVP8Lossless(java.awt.image.WritableRaster raster, boolean topLevel, javax.imageio.ImageReadParam param, int width, int height) throws java.io.IOException- Throws:
java.io.IOException
-
createDecodeRaster
private java.awt.image.WritableRaster createDecodeRaster(java.awt.image.WritableRaster raster, javax.imageio.ImageReadParam param, java.awt.Rectangle bounds)
-
copyIntoRasterWithParams
public static void copyIntoRasterWithParams(java.awt.image.Raster srcRaster, java.awt.image.WritableRaster dstRaster, javax.imageio.ImageReadParam param)Copy a source raster into a destination raster with optional settings applied.
-
decodeImage
private void decodeImage(java.awt.image.WritableRaster raster, HuffmanInfo huffmanInfo, ColorCache colorCache) throws java.io.IOException- Throws:
java.io.IOException
-
decodeCached
private void decodeCached(java.awt.image.WritableRaster raster, ColorCache colorCache, byte[] rgba, int y, int x, short code)
-
decodeLiteral
private void decodeLiteral(java.awt.image.WritableRaster raster, ColorCache colorCache, HuffmanCodeGroup curCodeGroup, byte[] rgba, int y, int x, short code) throws java.io.IOException- Throws:
java.io.IOException
-
decodeBwRef
private int decodeBwRef(java.awt.image.WritableRaster raster, ColorCache colorCache, int width, HuffmanCodeGroup curCodeGroup, byte[] rgba, short code, int x, int y) throws java.io.IOException- Throws:
java.io.IOException
-
lz77decode
private int lz77decode(int prefixCode) throws java.io.IOException- Throws:
java.io.IOException
-
readTransform
private int readTransform(int xSize, int ySize, java.util.List<Transform> transforms) throws java.io.IOException- Throws:
java.io.IOException
-
readHuffmanCodes
private HuffmanInfo readHuffmanCodes(int xSize, int ySize, int colorCacheBits, boolean readMetaCodes) throws java.io.IOException
- Throws:
java.io.IOException
-
subSampleSize
private static int subSampleSize(int size, int samplingBits)
-
-