forge
Explore
Log in

Don't you dare go Hollow

Commits

Commits on mainFiltered to crates/ec-aac/src/sbr_qmf_window.rsClear filter

2026-10-23

Restore edith_codecs after local data loss (2026-10-23)Ahmet Kaan Gümüş · b7434a2
Restore edith_codecs after local data loss (2026-10-23)

On 2026-10-23 an automated agent ran `rm -rf $HOME` and deleted the local
repository with all of its history. This commit restores the working tree
from the newest surviving copy, the host-c server lane mirror. That mirror
matches local main as of the testcut Phase 2 reports, including the tool
cache, the nextest fast profile and changed-crates.sh. The history before
this commit was not recovered.

2026-08-20

diag(aac-sbr): normative 640-tap QMF window embedded, checksum-pinned; bank replacement reverted, dead end recordedAhmet Kaan Gümüş · 2928bfe
diag(aac-sbr): normative 640-tap QMF window embedded, checksum-pinned; bank replacement reverted, dead end recorded

Charter: replace sbr_qmf's fitted Kaiser bank with the normative ISO/IEC
14496-3 4.6.18.4/4.6.18.8 analysis/synthesis pair built from the provided
640-tap prototype table.

Embedded the table verbatim as crate::sbr_qmf_window::QMF_WINDOW with a
checksum test (sum/sum-of-squares/max/argmax) -- passes, table transcription
confirmed correct.

Implemented and empirically tried, in order, against a broadband-noise
round-trip correlation probe (independent of any real file):

1. The literal folded reading of 4.6.18.4/4.6.18.8 an external spec review
   produced (320-sample analysis buffer folded 5-way to 64 taps, carrier
   exp(j*pi/64*(k+0.5)*(2n-1)); 1280-sample synthesis overlap-add, carrier
   exp(j*pi/64*(k+0.5)*(2n-255)), synthesis window built by mirroring the
   640-tap table to 1280 samples) -- broadband round-trip correlation
   plateaued at ~0.03-0.05 regardless of a grid search over analysis/
   synthesis phase-intercept sign and offset (tried +-1, +-63, +-65, +-127,
   +-129, +-255, +-511, 0) and an alternating-sign fold variant. Not a
   near-miss: this structure does not reconstruct at all.

2. The prior fitted bank's own direct (unfolded) 640-tap-dot-product
   structure, with the real QMF_WINDOW table substituted for the fitted
   Kaiser prototype (no fold, theta = omega_step*(k+0.5)*(n+offset), one
   omega_step per bank) -- best found ~0.697 correlation (offset=bands/2,
   omega_step=pi/64 analysis / pi/128 synthesis, the fitted bank's own
   convention), well short of the fitted bank's own 0.9998 achieved only
   through its Kaiser-beta + cutoff fit. A grid over omega_step in
   {pi/64, pi/128} x2 banks and offset in {+-16, +-32} never exceeded ~0.70.

Both avenues ruled out a fold-based reading of the reviewed equations
outright, and showed the review's exact phase-intercept constants (-1,
-255) are not simply a typo away from working with either window-derivation
guess. Given no access to the literal ISO text (only a review's paraphrase,
itself flagged "review, not ground truth") and no reference decoder's QMF
internals to cross-check against, further correction is a guess-and-check
search over an open constant space, not a bounded fix.

Reverted crates/ec-aac/src/sbr_qmf.rs and sbr_hf.rs to HEAD (4346f31) to
avoid shipping a QMF pair that round-trips at ~0.03-0.70 in place of one
that round-trips the passband at ~0.9998 -- verified unchanged real-file
numbers below.

DONE-GATE, unchanged from baseline (revert confirmed exact):
  cargo test -p ec-aac --lib: 51 passed (50 baseline + 1 new window
    checksum test), 0 failed.
  reeln (44.1k): ch0 full-band corr 0.972474, ch1 0.969785 (both
    unchanged); below 5000Hz 0.992799/0.992329, above 5000Hz
    0.761967/0.746352; whole-file windowed mean 0.955717/0.951577.
  FMJ (48k, kx=27): ch0 full-band corr -0.024069, ch1 0.010887 (both
    unchanged, pre-existing catastrophic decorrelation, separately tracked).

sbr_qmf_window.rs's QMF_WINDOW is not wired into sbr_qmf (module doc there
states why); kept for the next attempt, which needs either the literal ISO
text or a reference decoder's QMF stage to check phase/window hypotheses
against instead of guessing.