CrImage::JPEG::IDCT
Inverse Discrete Cosine Transform (IDCT) implementation. Uses a fixed-point butterfly algorithm instead of the direct cosine formula.
Constants
COS1_12 = 4017
COS1_18 = 257107
COS3_12 = 3406
COS3_18 = 217965
SIN1_12 = 799
SIN1_18 = 51142
SIN3_12 = 2276
SIN3_18 = 145639
SQRT2INV_14 = 11585
SQRT2INV_COS6_12 = 1108
SQRT2INV_COS6_18 = 70936
SQRT2INV_SIN6_12 = 2676
SQRT2INV_SIN6_18 = 171254
Class methods
transform(block : Indexable(Int32)) : Array(Int32)
Perform 2D IDCT on an 8x8 block Input: 64-element array of DCT coefficients Output: 64-element array of pixel values
transform_dequantize_into(block : Indexable(Int32), quant : Indexable(UInt16), output : Array(Int32) | Slice(Int32)) : Nil
Sourcetransform_dequantize_pixels_into(block : Indexable(Int32), quant : Indexable(UInt16), work : Array(Int32) | Slice(Int32), output : Bytes) : Nil
Sourcetransform_into(block : Indexable(Int32), output : Array(Int32) | Slice(Int32)) : Nil
Sourcetransform_pixels_into(block : Indexable(Int32), work : Array(Int32) | Slice(Int32), output : Bytes) : Nil
Source