JuicyPixels-3.3.9: Picture loading/serialization (in png, jpeg, bitmap, gif, tga, tiff and radiance)
Safe HaskellSafe-Inferred
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 Source #

Enumeration used to search in the tables for different components.

Constructors

DcComponent 
AcComponent 

Instances

Instances details
Generic DctComponent Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

Associated Types

type Rep DctComponent :: Type -> Type

Show DctComponent Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

Methods

showsPrec :: Int -> DctComponent -> ShowS

show :: DctComponent -> String

showList :: [DctComponent] -> ShowS

NFData DctComponent Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

Methods

rnf :: DctComponent -> ()

Eq DctComponent Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

Methods

(==) :: DctComponent -> DctComponent -> Bool

(/=) :: DctComponent -> DctComponent -> Bool

type Rep DctComponent Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

type Rep DctComponent = D1 ('MetaData "DctComponent" "Codec.Picture.Jpg.Internal.DefaultTable" "JuicyPixels-3.3.9-Fpv7pN9BKOy7eCVQxsU3eX" 'False) (C1 ('MetaCons "DcComponent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "AcComponent" 'PrefixI 'False) (U1 :: Type -> Type))

data HuffmanTree Source #

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

Instances

Instances details
Show HuffmanTree Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

Methods

showsPrec :: Int -> HuffmanTree -> ShowS

show :: HuffmanTree -> String

showList :: [HuffmanTree] -> ShowS

Eq HuffmanTree Source # 
Instance details

Defined in Codec.Picture.Jpg.Internal.DefaultTable

Methods

(==) :: HuffmanTree -> HuffmanTree -> Bool

(/=) :: HuffmanTree -> HuffmanTree -> Bool

type HuffmanTable = [[Word8]] Source #

type HuffmanPackedTree = Vector Word16 Source #

type MacroBlock a = Vector a Source #

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

type HuffmanWriterCode = Vector (Word8, Word16) Source #

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

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

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

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

defaultAcLumaHuffmanTable :: HuffmanTable Source #

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

defaultDcChromaHuffmanTable :: HuffmanTable Source #

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

defaultDcLumaHuffmanTable :: HuffmanTable Source #

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