forge
Explore
Log in

Don't you dare go Hollow

ec-av1: tag the EC_SYMR reads in read_eob and read_coeffs' tx_type

Browse files at this commit

37631b389d19e230bf6ddd0099f33f8927812a7eAhmet Kaan GümüşParent: 28056ec
`set_symr_cdf` (msac.rs:428) existed and had 24 call sites, but nothing tagged
the two reads the 4:4:4 partition-walk work pairs against the oracle's
per-read `site=`: `read_eob`'s EOB_PT read and `read_coeffs`' tx_type read.
Both printed `cdf=` empty, so a CDF width could not be attributed to a read
FUNCTION -- n=7 reads identically as "width 8 = TX_SET_INTRA_1" and as "the
64-CLASS EOB_PT width", and that ambiguity is exactly what a tag settles.

Two lines, behaviour-free: `SYMR_CDF` is a `Cell<&'static str>` thread-local
reset after each symbol (msac.rs:491) and is read only by the EC_SYMR
eprintln, and the placement matches the 24 existing `y_mode`/`uv_mode` tags.

Report section 16 of the branch is NOT landed with it: it depends on rounds
2-7, which main does not carry, and its headline (a transform-CLASS fork at
read 41976) is retracted by `lanes/av1tilerows.report.md` 17 on merged main.
crates/ec-av1/src/decode.rsmodified+2 -0
@@ -8029,6 +8029,7 @@ fn read_eob(dec: &mut SymbolDecoder, coding: &mut TxbTables, class: TxClass) ->
8029 let (range, value) = dec.debug_state();8029 let (range, value) = dec.debug_state();
8030 eprintln!("EC_AV1_EOBPT_CDF {eob_pt:?} range={range} value={value}");8030 eprintln!("EC_AV1_EOBPT_CDF {eob_pt:?} range={range} value={value}");
8031 }8031 }
8032+ crate::msac::SymbolDecoder::set_symr_cdf("eob_pt");
8032 let group = dec.symbol(eob_pt) + 1;8033 let group = dec.symbol(eob_pt) + 1;
8033 if trace {8034 if trace {
8034 eprintln!("TRACE eob_pt value={group} rng={}", dec.debug_state().0);8035 eprintln!("TRACE eob_pt value={group} rng={}", dec.debug_state().0);
@@ -8277,6 +8278,7 @@ fn read_coeffs(
8277 if crate::envflags::env_flag!("EC_AV1_EOBPT_CDF") && len == 3 {8278 if crate::envflags::env_flag!("EC_AV1_EOBPT_CDF") && len == 3 {
8278 eprintln!("EC_AV1_TXTYPE32_CDF {tx_type_cdf:?}");8279 eprintln!("EC_AV1_TXTYPE32_CDF {tx_type_cdf:?}");
8279 }8280 }
8281+ crate::msac::SymbolDecoder::set_symr_cdf("tx_type");
8280 let t = dec.symbol(tx_type_cdf);8282 let t = dec.symbol(tx_type_cdf);
8281 crate::census::tx_type(len, t);8283 crate::census::tx_type(len, t);
8282 if coeff_trace_on() {8284 if coeff_trace_on() {