forge
Explore
Log in

Don't you dare go Hollow

diag(aac): AU-level failure printing for the sbr_real_library sweep

Browse files at this commit

cc561435f2378ba3f7c4fe4019955e4e88eee68bAhmet Kaan GümüşParent: 4c5640d
EC_AAC_SBR_AU_FAIL_DEBUG=1 gates a per-AU index/error/first-bytes dump
in our_decode(), for tracing which access units a real HE-AAC track
fails to decode. Run against the HE-AAC commentary candidate (48kHz,
mkv, absolute stream 3): zero of 1500 access units fail this round --
the "N/1500 AUs fail" fact recorded earlier in the investigation no
longer reproduces at HEAD, superseded by intervening grid/pointer
fixes. That file's catastrophic full-band decorrelation persists with
a clean, non-dropped AU count, so it is not a timeline-shift artifact
of missing samples -- the remaining cause is upstream of AU-level
decode failure and is not root-caused this round.
crates/ec-aac/tests/sbr_real_library.rsmodified+10 -2
@@ -133,11 +133,19 @@ fn our_decode(
133 let rate = decoder.output_sample_rate().unwrap_or(0);133 let rate = decoder.output_sample_rate().unwrap_or(0);
134 let mut planes: Vec<Vec<f32>> = Vec::new();134 let mut planes: Vec<Vec<f32>> = Vec::new();
135 let mut failed = 0;135 let mut failed = 0;
136- for au in &aus {136+ let debug_failures = std::env::var("EC_AAC_SBR_AU_FAIL_DEBUG").as_deref() == Ok("1");
137+ for (au_idx, au) in aus.iter().enumerate() {
137 let frame = match decoder.decode(au, None) {138 let frame = match decoder.decode(au, None) {
138 Ok(f) => f,139 Ok(f) => f,
139- Err(_) => {140+ Err(e) => {
140 failed += 1;141 failed += 1;
142+ if debug_failures {
143+ let head: Vec<u8> = au.iter().take(16).copied().collect();
144+ eprintln!(
145+ " AU {au_idx} FAILED len={} err={e:?} head={head:02x?}",
146+ au.len()
147+ );
148+ }
141 continue;149 continue;
142 }150 }
143 };151 };