From 8ec0f40770fa56f65edc574f2a5c78f5c1d17ee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 20 Aug 2026 19:23:36 +0300 Subject: [PATCH] diag(aac-sbr): re-run feed-forward FIR vs all-pole A/B on the normative QMF bank Round-48 (commit 8bc305b) shipped the spec's feed-forward 2-tap FIR extension of sbr_hf::generate; round-50 (ec65451) reverted it to the all-pole residual resynthesis on measurement, but that A/B ran through the old fitted-Kaiser QMF bank, not today's normative ISO/IEC 14496-3 4.6.18.4/4.6.18.8.2 analysis/synthesis pair in sbr_qmf.rs. Re-tried the feed-forward FIR (cherry-picked from 8bc305b, adapted: HfHistory drops the now-unused y-history half, stabilize's doc updated) against today's sbr_real_library test suite: sbr_real_library_matches_reference (full-band correlation, ch0/ch1): reeln: all-pole 0.986993/0.986238 vs feed-forward 0.965566/0.965680 FMJ: all-pole 0.997880/0.993373 vs feed-forward 0.994118/0.983006 synthetic_heaac_matrix, 48k family, above-crossover band: 32k: 0.9969 -> 0.9951 48k: 0.9882 -> 0.9646 64k: 0.9864 -> 0.9727 96k: 0.9863 -> 0.9726 synthetic_heaac_matrix, 44.1k family: unchanged (both already near-zero, a separate pre-existing issue this round didn't touch). Feed-forward loses on every witness again, same direction as round-50, on the QMF bank that round-50's finding was suspected of being contingent on. The all-pole structure and its stability bound (BIBO |a1|+|a2|<1, correct for an IIR recursion; the spec's own |alpha|>=4 -> 0 guard on the FIR coefficients is not applicable here since that structure isn't in use) are unchanged from main -- this commit is doc-only, recording the re-measurement so the next round doesn't re-try this exact experiment from a stale premise. --- crates/ec-aac/src/sbr_hf.rs | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/crates/ec-aac/src/sbr_hf.rs b/crates/ec-aac/src/sbr_hf.rs index 40155884..1ff8b63c 100644 --- a/crates/ec-aac/src/sbr_hf.rs +++ b/crates/ec-aac/src/sbr_hf.rs @@ -38,17 +38,21 @@ //! raw copy (`X_high[l] = X_src[l] + bw*a1*X_src[l-1] + bw^2*a2*X_src[l-2]`). //! That version compiled, passed its own unit test, and is *closer* to a //! literal spec transcription -- but measured reproducibly WORSE on real -//! content: full-band correlation against the reference decoder on -//! reeln dropped 0.972474->0.963863 (ch0) and 0.969785->0.961027 (ch1), -//! same direction on below-crossover and whole-file windowed-mean -//! correlation too (round-50 A/B, ledger-recorded). This module reverted to -//! the all-pole structure documented above on that measurement, not on the -//! spec reading: the bar this project holds itself to is matching the -//! reference decoder's actual output, and a from-memory "more spec-literal" -//! label does not outrank it. The feed-forward alternative and its -//! discriminating unit test remain in history (commit 8bc305b) as the -//! documented alternative, should some other change in this pipeline ever -//! make it the better match. +//! content, then (round-50) and again re-tried and re-lost (later round) +//! after `sbr_qmf` became the normative ISO/IEC 14496-3 4.6.18.4/4.6.18.8.2 +//! bank rather than the earlier fitted Kaiser one -- so the QMF bank change +//! was not the missing piece either. Full-band correlation against the +//! reference decoder on reeln: 0.986993/0.986238 (all-pole, ch0/ch1) vs +//! 0.965566/0.965680 (feed-forward); FMJ: 0.997880/0.993373 (all-pole) vs +//! 0.994118/0.983006 (feed-forward); synthetic 48k-family above-crossover +//! band also regresses under feed-forward (e.g. 0.9882->0.9646 at 48k/48kbps). +//! This module keeps the all-pole structure documented above on that +//! measurement, not on the spec reading: the bar this project holds itself +//! to is matching the reference decoder's actual output, and a from-memory +//! "more spec-literal" label does not outrank it. The feed-forward +//! alternative and its discriminating unit test remain in history (commit +//! 8bc305b) as the documented alternative, should some other change in this +//! pipeline ever make it the better match. use crate::sbr_bands::BandTables; use ec_dsp::Complex;