Skip to main content

dct_block_unquantized

Function dct_block_unquantized 

Source
pub fn dct_block_unquantized(pixels: &[f64; 64], qt: &[u16; 64]) -> [f64; 64]
Expand description

8×8 forward DCT + divide by QT, but do NOT round.

Returns continuous f64 values (the “unquantized” coefficients). The rounding error for each position is: unquantized[i] - dct_block(pixels, qt)[i] as f64 and lies in the range [-0.5, +0.5].

Used by SI-UNIWARD to exploit quantization rounding errors for more efficient embedding when the original pixels are available.