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

Safe HaskellNone



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



type MutableMacroBlock s a = STVector s a #

Macroblock that can be transformed.

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

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) #

Perform a Jpeg level shift in a mutable fashion.

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

Create a new macroblock with the good array size