forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on 84fa44cfe66f76e22181d4ff8bc06ef6ea78db07Filtered to scripts/aac-tables/sbrgrid_probe.pyClear filter

2026-08-19

fix(aac-sbr): the missing bs_pointer field and FIXVAR's reversed freq_resAhmet Kaan Gümüş · 7dabfff
fix(aac-sbr): the missing bs_pointer field and FIXVAR's reversed freq_res

FIXVAR/VARFIX/VARVAR sbr_grid() all carry a bs_pointer field (width
ceil(log2(num_env+1))) between the relative borders and bs_freq_res, which
this parser never read -- and FIXVAR alone transmits bs_freq_res in reverse
time order (envelopes are numbered from the trailing variable border
backwards). Confirmed against a reference decoder's own byte accounting on
a non-uniform freq_res list (scripts/aac-tables/sbrgrid_probe.py) -- a
uniform list hid both bugs, which is why the byte-exact fixtures never
caught them. The missing pointer field also explains the standing "VARVAR
num_env==3 reads one byte fewer" mystery: ptr_bits(3)=2 crosses a byte
boundary.

bs_pointer also drives the noise floor's middle time border (ISO/IEC
14496-3 Sec 4.6.18.3.3), which this parser was deriving with a
nearest-midpoint heuristic instead; Grid::new now follows the spec formula.

Adds a plausibility clamp on the carried DT state (last_env/last_noise) as
containment against any still-undiscovered desync, not a fix for one.

Regenerates the FIXVAR/VARFIX/VARVAR fixtures from the corrected wire
format (all still oracle-verified byte-exact).