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

Safe HaskellNone
LanguageHaskell2010

Codec.Picture.Jpg.Internal.FastIdct

Description

Module providing a fast implementation of IDCT

inverse two dimensional DCT, Chen-Wang algorithm (cf. IEEE ASSP-32, pp. 803-816, Aug. 1984) 32-bit integer arithmetic (8 bit coefficients) 11 mults, 29 adds per DCT sE, 18.8.91

coefficients extended to 12 bit for IEEE1180-1990 compliance sE, 2.1.94

this code assumes >> to be a two's-complement arithmetic right shift: (-2)>>1 == -1 , (-3)>>1 == -2

Synopsis

Documentation

type MutableMacroBlock s a = STVector s a Source #

Macroblock that can be transformed.

fastIdct :: MutableMacroBlock s Int16 -> ST s (MutableMacroBlock s Int16) Source #

Algorithm to call to perform an IDCT, return the same block that the one given as input.

mutableLevelShift :: MutableMacroBlock s Int16 -> ST s (MutableMacroBlock s Int16) Source #

Perform a Jpeg level shift in a mutable fashion.

createEmptyMutableMacroBlock :: (Storable a, Num a) => ST s (MutableMacroBlock s a) Source #

Create a new macroblock with the good array size