forge
Explore
Log in

Don't you dare go Hollow

Finish r5's set_tile_origin sweep -- key-frame tile loop now green

Browse files at this commit

1a6617f87b12e470f5a079b950ea0a887a8d01a0Ahmet Kaan GümüşParent: 74818ac
  • fix
    • finish r5's set_tile_origin sweep -- key-frame tile loop now green
Show full message
fix(av1): finish r5's set_tile_origin sweep -- key-frame tile loop now green

The two shorthand struct-init blocks r5 flagged (near decode.rs:11661/11673)
already carried all four PlaneBuf fields; the actual break was the key-frame
per-tile loop's own set_tile_origin(x0, y0) calls at decode.rs:4910-4912,
still 2-arg after the signature grew to 4. Thread mi_col1/mi_row1 (this
tile's own end, clamped to the plane's padded width/height) through as
x1/y1 so the key-frame path's right/bottom reach bound matches the rest of
the tree. cargo check clean.
crates/ec-av1/src/decode.rsmodified+18 -3
@@ -4907,9 +4907,24 @@ pub(crate) fn decode_key_frame_tile_with_cdfs(
49074907 }
49084908 let mut dec = SymbolDecoder::new(tile_bytes);
49094909 neighbours.start_tile(mi_row0 as usize, mi_col0 as usize, mi_col1 as usize);
4910- y.set_tile_origin(mi_col0 as usize * 4, mi_row0 as usize * 4);
4911- u.set_tile_origin(mi_col0 as usize * 2, mi_row0 as usize * 2);
4912- v.set_tile_origin(mi_col0 as usize * 2, mi_row0 as usize * 2);
4910+ y.set_tile_origin(
4911+ mi_col0 as usize * 4,
4912+ mi_row0 as usize * 4,
4913+ (mi_col1 as usize * 4).min(y.width),
4914+ (mi_row1 as usize * 4).min(y.height),
4915+ );
4916+ u.set_tile_origin(
4917+ mi_col0 as usize * 2,
4918+ mi_row0 as usize * 2,
4919+ (mi_col1 as usize * 2).min(u.width),
4920+ (mi_row1 as usize * 2).min(u.height),
4921+ );
4922+ v.set_tile_origin(
4923+ mi_col0 as usize * 2,
4924+ mi_row0 as usize * 2,
4925+ (mi_col1 as usize * 2).min(v.width),
4926+ (mi_row1 as usize * 2).min(v.height),
4927+ );
49134928 TILE_HITS.with(|c| c.set(c.get() + 1));
49144929
49154930 for sb_r in sb_r0..sb_r1 {