Commits
Commits on
6e36a7de49dbcf82a7f03480f9a39abe6f1dcc21Filtered to scripts/aac-tables/qmf_check.pyClear filter2026-08-20
diag(aac-sbr): bisect the 0.62 cross-family QMF corr with same-rate 64->64 and 32->32 round-trips; cross-checks T1/T2/T3 refutedAhmet Kaan Gümüş · 4de6175
diag(aac-sbr): bisect the 0.62 cross-family QMF corr with same-rate 64->64 and 32->32 round-trips; cross-checks T1/T2/T3 refuted
64->64 (4.6.18.4 analysis, x of 640, newest at x[0] reversed, Z[n]=x[n]*c[n],
u folded by 5x128, X[k]=sum u[n]*exp(j*pi/128*(k+0.5)*(2n-1)) -> the existing
4.6.18.8.2 synthesis unchanged) round-trips at corr=0.999999, amp_ratio~1.0,
confirming the ORIGINAL hand-written equations (no sign flip, +j, (2n-1),
(2n-255), 1/64 scale) are correct for that pairing. This is exactly the
convention the first round already had.
Cross-check T1 (shift direction: both x/v buffers growing at the TOP,
forward-order new samples, vs the charter's reverse/newest-at-index-0) and
T2 ((2n+1) modulation index instead of (2n-1)/(2n-255)) are both REFUTED
under the 64->64 witness: every T1 (forward-shift) variant collapses to
corr 0.03-0.05 regardless of T2; every T2 (2n+1) variant with the correct
T1 shift stays close (0.9998-0.9999) but never beats the baseline (2n-1)/
(2n-255) config. T3 (drop the 1/64 synthesis scale) only rescales energy
(amp_ratio jumps to ~64x) and does not change corr, as expected -- the
window does NOT carry the normalization; the 1/64 factor is required.
32->32 downsampled (4.6.18.8.3: v of 640, shift 64, pi/64*(2n-63), w=g*c[2n])
tops out at corr=0.702744 (amp_ratio 0.807, energy 0.631) with the SAME
newest-at-x[0]/c[2n]/(2n-1) convention that gave 64->64 a clean pass --
i.e. the 32-band analysis or 32-band downsampled-synthesis half of the
bank (the c[2n]-subsampled / 320-tap path) is itself imperfect, not just
the 32-band-analysis-into-64-band-synthesis pairing.
Feeding 32-band analysis output (bands 0..31) into the CONFIRMED-correct
64-band synthesis (zero bands 32..63) drops further, to corr~0.05, across
every scale_k in {1,2,0.5,sqrt2} and both conjugate/non-conjugate X[k] --
worse than the earlier same-round ad-hoc 0.624 best (which used a
non-normative ssign/re_only combination, not this confirmed-correct
synthesis). The zero-stuffing-gain hypothesis (charter step 3) is REFUTED
under the correct-64-synthesis witness: scaling alone does not fix it.
Net: the 64-band same-rate pairing is spec-correct and verified; the
32-band analysis and/or 32-band downsampled-synthesis equations
(4.6.18.4.1 / 4.6.18.8.3, both built on the c[2n]/320-tap subsampled
window) are the remaining open defect, and the 32-band-analysis-into-
64-band-synthesis cross-family bridge used by real SBR HF generation is
not simple zero-padding -- something in the 32<->64 band correspondence
itself needs a different treatment than tested here. Still below the
0.999 numpy gate; no Rust changes this round either.diag(aac-sbr): numpy round-trip of the normative 4.6.18.4.1/4.6.18.8.2 32/64-band QMF exhausts all listed carrier variants, dead endAhmet Kaan Gümüş · 93d147f
diag(aac-sbr): numpy round-trip of the normative 4.6.18.4.1/4.6.18.8.2 32/64-band QMF exhausts all listed carrier variants, dead end
scripts/aac-tables/qmf_check.py implements the analysis (32-band, ISO/IEC
14496-3 4.6.18.4.1) and synthesis (64-band, 4.6.18.8.2) equations exactly as
specified against the checksum-pinned 640-tap window, then round-trips 8192
white-noise samples through analysis -> zero-upper-32 -> synthesis and
correlates the decimated-by-2 output against the original at the best lag.
Impulse-response probe confirms the cascade is not garbage (a clean
symmetric twin-peak decaying kernel centred near the expected group delay),
but the broadband round-trip correlation tops out at 0.624 (newest-sample-
at-x[0], Z[n]=x[n]*c[2n], across both analysis and synthesis phase-sign
choices, Re-only vs Re+Im) -- far under the 0.999 gate. All four binary
alternatives from the charter (newest-sample position, c[2n] vs c[n],
analysis exp sign, synthesis Re-vs-both) were cross-producted (32 trials,
full table in run output); "scaling" is correlation-invariant so not a
separate axis. Output energy ratio is also off (~0.5x input energy where a
true PR interpolator should read ~2x), pointing at a real normalization/
equation bug beyond the four listed axes, not a coefficient tie-break.
Per the charter's gate ("only once numpy >=0.999: port to Rust"), this
round does not touch sbr_qmf.rs / sbr_hf.rs -- no Rust changes, no test
gate re-run. Recorded as a dead end for the next round.