16 kHz quality suite: rate-scaled config, measured thresholds, gtest filter fix#22
Merged
Conversation
New tests/test_asrc_quality_16k.cpp: 16 kHz -> 16 kHz, +200 ppm,
sample-granular transfer, last 1 s analyzed with fitSineTracked —
the test_asrc_quality.cpp methodology with rate-scaled configuration,
applied test-side only (no header changes):
- FilterSpec band edges scaled by 16/48 (balanced-at-16k: passband
~6666.7 Hz, stopband ~9333.3 Hz, L=256, T=48, 120 dB).
- ServoConfig bandwidths scaled by 16/48 as well: they are absolute Hz,
and with the defaults the 3.2 Hz slip beat (vs 9.6 Hz at 48 k) loses
(16/48)^3 ~ 28.6 dB of 3-pole smoother rejection, leaving the
measurement servo-FM-limited ~32 dB below the 48 k figures. Scaling
keeps the loop identical in normalized terms.
- 120 s run: the same sample count and loop time constants as the 48 k
test's 40 s, since the quiet loop is now ~0.017 Hz.
Measured (host, Release), thresholds pinned ~4 dB under:
tone measured threshold 48 k counterpart (same f/fs)
333 Hz 136.6 dB 132 dB 997 Hz: 135.0 dB
2 kHz 121.9 dB 117 dB 6 kHz: 120.0 dB
4 kHz 114.3 dB 110 dB 12 kHz: 112.8 dB
6.5 kHz 106.5 dB 102 dB 19.5 kHz: 105.8 dB
Emulated-target exclusion: the hexagon job's ctest -E 'AsrcQuality|...'
already matches AsrcQuality16k (unanchored regex), but the bare-metal
gtest filter "-AsrcQuality.*" did not ('.' is literal in gtest filters),
so it is widened to "-AsrcQuality*".
README: short 16 kHz note in Measured performance (band-edge/servo
scaling, measured numbers, group delay in ms triples at the same taps).
https://claude.ai/code/session_01HuAFfoeD5a5Xe5aGNA16M9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Measured 16 kHz → 16 kHz quality coverage (the reference-microphone processing rate), with a finding that matters beyond the tests.
The finding: configuration must scale with the rate — including the servo
A literal port of the 48 k methodology measured a uniform ~32 dB deficit with a servo-FM signature. Cause: not just
FilterSpecband edges butServoConfigbandwidths are absolute Hz — at 16 kHz the slip beat sits atppm·fs= 3.2 Hz instead of 9.6 Hz, costing (16/48)³ ≈ 28.6 dB of the Quiet stage's 3-pole rejection. With servo Hz fields scaled by 16/48 (and the run lengthened to 120 s so the slower quiet loop forgets acquisition — same sample count and loop-τ count as the 48 k tests), the measured structure matches 48 k within +0.7…+1.9 dB, confirming quality is a function of normalized frequency as designed. The test file header documents the scaling rule; aConfig-level "scale defaults to my rate" helper is a candidate follow-up.Measured (host) and pinned (−4 dB convention)
Also fixed: a latent test-filter bug
tests/bare_metal_main.cpp's gtest exclusion-AsrcQuality.*treated.as a literal (gtest globs only*/?), so the newAsrcQuality16ksuite would have run on bare metal — verified empirically with--gtest_list_tests, widened to-AsrcQuality*. The hexagon ctest regex was verified to already cover it.Full host suite 50/50; README gains a short 16 kHz paragraph in Measured performance (generated PERF/ICOUNT blocks untouched).
https://claude.ai/code/session_01HuAFfoeD5a5Xe5aGNA16M9
Generated by Claude Code