JuicyPixels-3.3.3: Picture loading/serialization (in png, jpeg, bitmap, gif, tga, tiff and radiance)

Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Jpg.Internal.DefaultTable

Description

Module used by the jpeg decoder internally, shouldn't be used in user code.

Synopsis

Documentation

data DctComponent #

Enumeration used to search in the tables for different components.

Constructors

DcComponent 
AcComponent 

data HuffmanTree #

Tree storing the code used for huffman encoding.

Constructors

Branch HuffmanTree HuffmanTree

If bit is 0 take the first subtree, if 1, the right.

Leaf Word8

We should output the value

Empty

no value present

type HuffmanTable = [[Word8]] #

type MacroBlock a = Vector a #

Represent a compact array of 8 * 8 values. The size is not guarenteed by type system, but if makeMacroBlock is used, everything should be fine size-wise

makeMacroBlock :: Storable a => [a] -> MacroBlock a #

Helper function to create pure macro block of the good size.

buildHuffmanTree :: [[Word8]] -> HuffmanTree #

Transform parsed coefficients from the jpeg header to a tree which can be used to decode data.

defaultAcLumaHuffmanTable :: HuffmanTable #

From the Table K.5 of ITU-81 (p154)

defaultDcChromaHuffmanTable :: HuffmanTable #

From the Table K.4 of ITU-81 (p153)

defaultDcLumaHuffmanTable :: HuffmanTable #

From the Table K.3 of ITU-81 (p153)