pub fn quantize_block_large(
dct_coeffs: &[f32],
weights: &[f32],
qac_qm: f32,
thresholds: &[f32; 4],
grid_width: usize,
grid_height: usize,
llf_x: usize,
llf_y: usize,
output: &mut [i32],
)Expand description
Quantize AC coefficients for a large block (DCT16+) to a flat output buffer.
For each coefficient at position (y, x) in the grid:
val = dct_coeffs[ygrid_width + x] / weights[ygrid_width + x] * qac_qm
if y < llf_y && x < llf_x: output 0 (LLF handled separately)
elif |val| < threshold[quadrant]: output 0
else: output round_ties_even(val) as i32
grid_width MUST be a multiple of 8.
thresholds[0..4] map to quadrants: [top-left, top-right, bottom-left, bottom-right]
where the split is at grid_height/2 and grid_width/2.