forge
Explore
Log in

Don't you dare go Hollow

The hand-built GOLDEN fixture keeps its frames' CDF carry off

Browse files at this commit

4db0da1ec2bdf310f17532b365e0b6aa568b5129Ahmet Kaan GümüşParent: e161916
  • test
    • the hand-built GOLDEN fixture keeps its frames' CDF carry off
Show full message
test(av1): the hand-built GOLDEN fixture keeps its frames' CDF carry off

Its two inter tiles are hand-coded from a fresh Cdfs, so their headers
must say so now that inter_frame_headers leaves
disable_frame_end_update_cdf off -- otherwise frame 2's decode loads what
frame 1 stored and desyncs at the first symbol. Swept the crate: the only
other hand-built inter headers (frame.rs' header round trip) code no tile.
crates/ec-av1/src/stream.rsmodified+8 -1
@@ -3395,7 +3395,13 @@ mod tests {
33953395
33963396 // Frame 1: hand-coded, intra-only, refreshes slot 0 with a flat
33973397 // 128 block (no neighbours to predict `DC_PRED` from).
3398- let (_, header1) = inter_frame_headers(width, height, base_q_idx, 1, 0).unwrap();
3398+ let (_, mut header1) = inter_frame_headers(width, height, base_q_idx, 1, 0).unwrap();
3399+ // These two tiles are hand-coded from a FRESH `Cdfs`, so the
3400+ // frames must not carry CDF state the way the encoder's own inter
3401+ // frames now do (spec 7.20): with the bit set, what each frame
3402+ // stores is what it started from -- the defaults -- which is
3403+ // exactly what the next hand-coded tile assumes.
3404+ header1.disable_frame_end_update_cdf = true;
33993405 let tile1 = {
34003406 let mut cdfs = Cdfs::new(q_ctx_of(base_q_idx));
34013407 let mut enc = SymbolEncoder::new();
@@ -3413,6 +3419,7 @@ mod tests {
34133419 // Frame 2: hand-coded, single_ref all the way to GOLDEN_FRAME,
34143420 // skip zero-MV NEARESTMV -- a direct copy of slot 3 (frame 0).
34153421 let (_, mut header2) = inter_frame_headers(width, height, base_q_idx, 2, 0).unwrap();
3422+ header2.disable_frame_end_update_cdf = true;
34163423 header2.ref_frame_idx[3] = 3; // GOLDEN_FRAME's own slot: frame 0's, untouched by frame 1
34173424 let tile2 = {
34183425 let mut cdfs = Cdfs::new(q_ctx_of(base_q_idx));