wip(av1): trace skip_mode/compound_idx on the sb128-compound-refs pin -- NOT the compound blend, it is skip_mode desync
Browse files at this commit15f253dabf2f30000a2dd2a065326627bd782fbdParent: e48aa4c1 changed file +18 -0
- crates/ec-av1/src/decode.rs +18 -0
crates/ec-av1/src/decode.rsmodified+18 -0
| @@ -4668,6 +4668,12 @@ fn decode_inter_block( | |||
| 4668 | uni: neighbours.left_ref1[r] | 4668 | uni: neighbours.left_ref1[r] |
| 4669 | .is_some_and(|r1| is_uni_comp_ref(neighbours.left_ref[r], r1)), | 4669 | .is_some_and(|r1| is_uni_comp_ref(neighbours.left_ref[r], r1)), |
| 4670 | }); | 4670 | }); |
| 4671 | + if std::env::var_os("EC_AV1_COMPIDX_DUMP").is_some() { | ||
| 4672 | + eprintln!( | ||
| 4673 | + "EC_PRECOMP r={r} c={c} skip_mode={skip_mode} skip={skip} reference_select={reference_select} tell={}", | ||
| 4674 | + dec.debug_bitpos() | ||
| 4675 | + ); | ||
| 4676 | + } | ||
| 4671 | let is_compound = | 4677 | let is_compound = |
| 4672 | skip_mode || (reference_select && read_comp_mode(dec, cdfs, above_nbr, left_nbr)); | 4678 | skip_mode || (reference_select && read_comp_mode(dec, cdfs, above_nbr, left_nbr)); |
| 4673 | if is_compound { | 4679 | if is_compound { |
| @@ -5015,6 +5021,12 @@ fn decode_inter_block( | |||
| 5015 | (8, 8, 1u8) | 5021 | (8, 8, 1u8) |
| 5016 | }; | 5022 | }; |
| 5017 | compound_ctx = Some((ref1, comp_group_idx as u8, compound_idx)); | 5023 | compound_ctx = Some((ref1, comp_group_idx as u8, compound_idx)); |
| 5024 | + if std::env::var_os("EC_AV1_COMPIDX_DUMP").is_some() { | ||
| 5025 | + eprintln!( | ||
| 5026 | + "EC_COMPIDX mi_row={mi_row} mi_col={mi_col} bsize={side} mode={compound_mode} mv0=({},{}) mv1=({},{}) ref0={ref0} ref1={ref1} comp_group_idx={comp_group_idx} compound_idx={compound_idx} tell={}", | ||
| 5027 | + mv0.0, mv0.1, mv1.0, mv1.1, dec.debug_bitpos() | ||
| 5028 | + ); | ||
| 5029 | + } | ||
| 5018 | 5030 | ||
| 5019 | // spec 5.11.19/libaom `decodemv.c` 1575: `read_mb_interp_filter` | 5031 | // spec 5.11.19/libaom `decodemv.c` 1575: `read_mb_interp_filter` |
| 5020 | // comes AFTER `read_compound_type` (the `comp_group_idx`/ | 5032 | // comes AFTER `read_compound_type` (the `comp_group_idx`/ |
| @@ -6014,6 +6026,12 @@ fn decode_inter_block8( | |||
| 6014 | (8, 8, 1u8) | 6026 | (8, 8, 1u8) |
| 6015 | }; | 6027 | }; |
| 6016 | compound_ctx8 = Some((ref0, ref1, comp_group_idx as u8, compound_idx)); | 6028 | compound_ctx8 = Some((ref0, ref1, comp_group_idx as u8, compound_idx)); |
| 6029 | + if std::env::var_os("EC_AV1_COMPIDX_DUMP").is_some() { | ||
| 6030 | + eprintln!( | ||
| 6031 | + "EC_COMPIDX mi_row={mi_row} mi_col={mi_col} bsize=8 mode={compound_mode} mv0=({},{}) mv1=({},{}) ref0={ref0} ref1={ref1} comp_group_idx={comp_group_idx} compound_idx={compound_idx} tell={}", | ||
| 6032 | + mv0.0, mv0.1, mv1.0, mv1.1, dec.debug_bitpos() | ||
| 6033 | + ); | ||
| 6034 | + } | ||
| 6017 | 6035 | ||
| 6018 | let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?; | 6036 | let (py0, pu0, pv0) = ref_planes(ref0, ref_y, ref_u, ref_v, other_refs)?; |
| 6019 | let (py1, pu1, pv1) = ref_planes(ref1, ref_y, ref_u, ref_v, other_refs)?; | 6037 | let (py1, pu1, pv1) = ref_planes(ref1, ref_y, ref_u, ref_v, other_refs)?; |