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

52ec5427962dc05f69ab6a8a9417e27df5f8db22Ahmet Kaan GümüşParent: 8cfe3a6
  • 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(
32632 force_integer_mv: bool,32632 force_integer_mv: bool,
32633 interp_fixed: Option<mc::InterpFilterKind>,32633 interp_fixed: Option<mc::InterpFilterKind>,
32634 enable_dual_filter: bool,32634 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,
32636 ) -> Result<Picture> {32642 ) -> Result<Picture> {
32637 let single_tile = TileInfo {32643 let single_tile = TileInfo {
32638 mi_col_starts: vec![0, mi_cols],32644 mi_col_starts: vec![0, mi_cols],
@@ -32670,9 +32676,7 @@ pub(crate) fn decode_inter_frame_tile(
32670 false,32676 false,
32671 [0; 2],32677 [0; 2],
32672 true,32678 true,
32673- // `tx_select`: this raw entry point decodes this crate's own encoder's32679+ tx_select,
32674- // streams, which always write `TxMode::Largest`.
32675- false,
32676 false,32680 false,
32677 false,32681 false,
32678 false,32682 false,
@@ -36763,7 +36767,9 @@ mod tests {
36763 false,36767 false,
36764 Some(mc::InterpFilterKind::Regular),36768 Some(mc::InterpFilterKind::Regular),
36765 false,36769 false,
36766- false, fctx,36770+ false,
36771+ false,
36772+ fctx,
36767 )36773 )
36768 .unwrap_err();36774 .unwrap_err();
36769 let msg = err.to_string();36775 let msg = err.to_string();
@@ -37157,7 +37163,9 @@ mod tests {
37157 false,37163 false,
37158 Some(mc::InterpFilterKind::Regular),37164 Some(mc::InterpFilterKind::Regular),
37159 false,37165 false,
37160- false, fctx,37166+ false,
37167+ frame.tx_select,
37168+ fctx,
37161 )37169 )
37162 .unwrap();37170 .unwrap();
37163 assert_eq!(37171 assert_eq!(
@@ -37466,7 +37474,9 @@ mod tests {
37466 false,37474 false,
37467 Some(mc::InterpFilterKind::Regular),37475 Some(mc::InterpFilterKind::Regular),
37468 false,37476 false,
37469- false, fctx,37477+ false,
37478+ frame.tx_select,
37479+ fctx,
37470 )37480 )
37471 .unwrap();37481 .unwrap();
37472 assert_eq!(decoded.y, ffmpeg_frames[i].y, "frame {i} luma vs ffmpeg");37482 assert_eq!(decoded.y, ffmpeg_frames[i].y, "frame {i} luma vs ffmpeg");