forge
Explore
Log in

Don't you dare go Hollow

The raw inter-tile decode entry point takes the frame's own tx_select bit

Browse files at this commit

2d62fa6d16e0575ba59bc9a380529eea5fe37c55Ahmet Kaan GümüşParent: f649e1c
  • test
    • the raw inter-tile decode entry point takes the frame's own tx_select bit
Show full message
test(av1): the raw inter-tile decode entry point takes the frame's own tx_select bit

Three gop round-trip tests decoded inter tiles through decode_inter_frame_tile,
which hard-coded tx_select=false with a comment claiming this crate's encoder
always writes TxMode::Largest. Inter frames write Select by default now, so
the reader consumed the first tx_depth symbol as coefficient data and failed
with a hallucinated empty-reference-slot refusal (class: test asserts against
a stale header, second instance; the key-frame twin was fixed one merge ago).
The entry point now takes tx_select and the tests pass Encoded::tx_select.
crates/ec-av1/src/decode.rsmodified+17 -7
@@ -32632,7 +32632,13 @@ pub(crate) fn decode_inter_frame_tile(
3263232632 force_integer_mv: bool,
3263332633 interp_fixed: Option<mc::InterpFilterKind>,
3263432634 enable_dual_filter: bool,
32635- reference_select: bool, fctx: &crate::decode::FrameCtx,
32635+ reference_select: bool,
32636+ // This frame header's `tx_mode == TxMode::Select`: `Encoded::tx_select`.
32637+ // Hard-coding `false` here desynced at the first `tx_depth` symbol once
32638+ // inter frames coded Select by default (class: test asserts against a
32639+ // stale header, second instance).
32640+ tx_select: bool,
32641+ fctx: &crate::decode::FrameCtx,
3263632642 ) -> Result<Picture> {
3263732643 let single_tile = TileInfo {
3263832644 mi_col_starts: vec![0, mi_cols],
@@ -32670,9 +32676,7 @@ pub(crate) fn decode_inter_frame_tile(
3267032676 false,
3267132677 [0; 2],
3267232678 true,
32673- // `tx_select`: this raw entry point decodes this crate's own encoder's
32674- // streams, which always write `TxMode::Largest`.
32675- false,
32679+ tx_select,
3267632680 false,
3267732681 false,
3267832682 false,
@@ -36763,7 +36767,9 @@ mod tests {
3676336767 false,
3676436768 Some(mc::InterpFilterKind::Regular),
3676536769 false,
36766- false, fctx,
36770+ false,
36771+ false,
36772+ fctx,
3676736773 )
3676836774 .unwrap_err();
3676936775 let msg = err.to_string();
@@ -37157,7 +37163,9 @@ mod tests {
3715737163 false,
3715837164 Some(mc::InterpFilterKind::Regular),
3715937165 false,
37160- false, fctx,
37166+ false,
37167+ frame.tx_select,
37168+ fctx,
3716137169 )
3716237170 .unwrap();
3716337171 assert_eq!(
@@ -37466,7 +37474,9 @@ mod tests {
3746637474 false,
3746737475 Some(mc::InterpFilterKind::Regular),
3746837476 false,
37469- false, fctx,
37477+ false,
37478+ frame.tx_select,
37479+ fctx,
3747037480 )
3747137481 .unwrap();
3747237482 assert_eq!(decoded.y, ffmpeg_frames[i].y, "frame {i} luma vs ffmpeg");