Skip to main content

code_bands_tiled

Function code_bands_tiled 

Source
pub fn code_bands_tiled<B: Bits, M: CoefModel>(
    p: &Pyramid,
    q: &mut [i32],
    preds: &[Pred],
    b: &mut B,
    model: &mut M,
    live: Option<&[Vec<bool>]>,
)
Expand description

code_bands with a tile layer: at the start of each band a flag per tile (context: band class × previous tile’s flag) says whether any residual in it is nonzero, and the coefficients of dead tiles are skipped (residual 0, value = prediction). Large all-zero regions then cost one flag per tile instead of one significance decision per coefficient. live is tile_live when encoding and ignored (decoded) otherwise.