Skip to content

DspTap 0.4.0: the family's floor moves, and the linear guard band filter runs DspTap's Q15 rows (question 21) - #116

Merged
tap merged 3 commits into
mainfrom
claude/sample-rate-solutions-comparison-mqc190
Nov 22, 2026
Merged

tap merged 3 commits into
mainfrom
claude/sample-rate-solutions-comparison-mqc190

Conversation

@tap

@tap tap commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What this changes

This is the last step of your answer to question 21 ("DspTap Q15 rows"), after tap/DspTap#69.

  • Pin moved: submodules/dsptap bd9617a (v0.3.0) → ca6ff4a, DspTap 0.4.0 (v0.4.0 once that commit is tagged; this PR does not wait on the tag). TAP_SR_DSPTAP_MINIMUM becomes 0.4.0, token-identically in the three umbrella headers. The family test, the root README's tested pairs and CLAUDE.md move with it. TAP_SR_VERSION stays 0.8.0.
  • guard_band.h:
    • build_rows() calls DspTap's quantize_symmetric_row_preserving_sum<S> in place of its own half-then-mirror. DspTap pins that the two are bit-identical.
    • In Q15, the linear form now runs tap::dsp::k_guard_band_fir_q15 at the four 70 dB named settings. These rows are designed so that, quantized to Q1.14, they hold the 70 dB tier.
    • transparent keeps the double rows in Q15, where 120 dB is format-limited as it is for every FIR stage. A custom linear setting keeps the run-time Kaiser path; its Q15 stopband is not stated.
    • Float, double and Q31 are unchanged.
  • Per-format numbers: in Q15 the linear form's taps(), latency_output_frames(), window_frames() and macs_per_output() differ from the other formats at super_economy and balanced. The header, the README and the book state each format's numbers.
  • Docs:
    • docs/IIR_PLAN.md v13: question 21's limit is lifted at this pin move;
    • rational/PLAN.md: R26, a v0.24 row and a record;
    • docs/ROADMAP.md, rational/README.md, the book chapter and rational/CLAUDE.md.

Why

Before this pin move, the linear form in Q15 quantized the double rows and missed the 70 dB tier: −67.1 / −68.9 / −66.8 / −64.6 dB at the four 70 dB settings. Every FIR rate stage in rational attains that tier in Q15, and you chose DspTap Q15 rows to close the gap.

Verification

The Q15 linear form at each named setting, measured from the stop edge on 16385 points. The numbers are identical on x86-64, M33, M55 and Hexagon.

setting half-band taps (other formats) latency, frames stopband ripple
super_economy nonlinear 32 (30) 31/2 (29/2) −89.23 dB 0.0090 dB
super_economy FIR, near-linear 40 (38) 39/2 (37/2) −70.40 dB 0.0098 dB
economy every kind 50 (50) 49/2 −72.33 dB 0.0097 dB
balanced every kind 60 (58) 59/2 (57/2) −70.66 dB 0.0096 dB
transparent nonlinear 72 (72) 71/2 −70.87 dB (format limit, kept) 0.0125 dB
transparent FIR, near-linear 102 (102) 101/2 −69.18 dB (format limit, kept) 0.0148 dB

Pinned by:

  • guard_band_fixed_test.QuantizedLinearTablesAttainTheirStatedStopbands: the 70 dB settings now assert the tier;
  • TheQ15LinearFormRunsDspTapsQ15Rows;
  • TheLinearFormsLengthLatencyAndWindowArePerFormat;
  • Q15FloorsAgainstDouble: the linear form against its own design in double, −82.4 dB RMS at worst at 70 dB;
  • the exact-latency and offering tests, now with Q15 chains.

What moved and what didn't:

  • Moved: the Q15 FIR bit pin is re-recorded.
  • Didn't move:
    • the Q15 Chebyshev II pin, both Q31 pins, and every float, double and Q31 golden number;
    • the golden leg's original twelve cases. It gains four Q15 linear cases: each Q15 row's double taps through lfilter.

The pin move, A/B'd against the parent (DspTap 0.3.0), with the same toolchains and both builds on the embedded targets:

  • Every async, bridge and rational ratchet binary is byte-identical (stripped). That is 72 per build on M33, M55 and Hexagon (16 async, 22 bridge, 34 rational), and 84 on the host.
  • Every icount row passes ±3 % against the committed baselines, and every ceiling passes. No baseline or ceiling file is touched.

Where it ran:

  • Hosted: GCC 13 with -Werror on all three engines, 493 of 493 (my rebuild of the pushed head). The agent that built it also ran Clang 18 with -Werror and GCC without exceptions or RTTI, 493 of 493 each, and GCC 15.3 (the gcc:15 image) with -Werror, 512 of 512.
  • QEMU, both builds:
    • M33: 169, guard band 79 of 80 (double's limit-cycle test skipped, as before), 6;
    • M55: 169, 80, 6;
    • Hexagon: 276 of 276.
  • Style and docs: clang-format 18, clang-tidy 18 on the changed TUs, the vocabulary gate and the book, all clean.

Notes for the reviewer

  • Submodule pin moved: bd9617a → ca6ff4a. DspTap 0.4.0 adds a quantizer, the Q15 table and its lookup, and comment corrections; no existing row or contract moves (DspTap 0.4.0: Q15 rows for the linear guard band filter, the symmetric quantizer, and the IIR honest limits corrected DspTap#69). The pin commit names v0.4.0. Please tag ca6ff4a with it. Until then the commit is reachable on DspTap's main.
  • Tested pairs: the unreleased 0.9.0 row now reads DspTap 0.4.0 / v0.4.0, with a note that it ran on 0.3.0 until the guard band's Q15 rows.
  • Image size: the guard band test executable's M55 image grows from 965,964 to 996,264 bytes. The main image is unchanged at 2,042,664.

Generated by Claude Code

Moves submodules/dsptap from v0.3.0 (bd9617a) to v0.4.0 (ca6ff4a,
tap/DspTap#69): the guard band filter's Q15 rows (k_guard_band_fir_q15 in
iir_tables.h and iir_design.h) and the symmetric quantizer they are measured
through (quantize_symmetric_row_preserving_sum in quantize.h), additive, no
committed row before them moved, plus comments in iir_kernels.h.

TAP_SR_DSPTAP_MINIMUM is 0.4.0 in the three umbrella headers, token-identical
(family.VersionMacrosAgree, whose re-pin names why), and the root README's
tested pairs and CLAUDE.md say so. TAP_SR_VERSION stays 0.8.0.

The pin move's A/B: every async, bridge and rational ratchet workload, probe
and stack binary, built at db08c86 (DspTap 0.3.0) and on this pin with the same
toolchains on the M33, M55, Hexagon and host in both builds, is byte-identical
(stripped); no count or ceiling is re-recorded.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…on 21)

Question 21 of docs/IIR_PLAN.md was answered "DspTap Q15 rows", and DspTap
0.4.0 (the previous commit's pin) commits them. Two changes to guard_band.h:
- build_rows() quantizes through DspTap's
  quantize_symmetric_row_preserving_sum instead of the inline half-then-mirror
  (substrate discipline; DspTap pins the two bit-identical on every committed
  guard band row in every format);
- the linear form in Q15 runs k_guard_band_fir_q15 at the four 70 dB named
  settings, copied at compile time like the double rows and referenced only
  by the Q15 instantiation; transparent keeps the double rows in Q15 (DspTap
  has none at 120 dB, which Q1.14 cannot carry), and a custom linear setting
  keeps the run-time Kaiser design, its Q15 stopband not stated. The stop
  edge stays the double row's in every format.

In Q15, at the named settings in order (super_economy behind the nonlinear
half-band and behind the others, economy, balanced, transparent likewise):
- taps 32 / 40 / 50 / 60 / 72 / 102 (30 / 38 / 50 / 58 / 72 / 102 in float,
  double and Q31), so the latency (N - 1) / 2, the window N - 1 and the
  multiplies N are per format at super_economy and balanced;
- the Q1.14 taps attain -89.23 / -70.40 / -72.33 / -70.66 dB from the stop
  edge, flat to 0.0090 / 0.0098 / 0.0097 / 0.0096 dB (the tier, pinned), and
  at transparent -70.87 / -69.18 dB, 0.0125 / 0.0148 dB (the honest limit,
  unchanged and still pinned).

The golden leg gains four Q15 linear cases, the Q15 rows' design taps through
lfilter (the generator checks each row symmetric and at the double row's stop
edge); the Q15 FIR bit pin moves to 0x4dcf86873a95c8f2. Nothing else moved:
the Q15 Chebyshev II pin, both Q31 pins and every float, double and Q31 golden
number are unchanged. The Q15 floor test compares the linear form with its own
design in double: -82.4 dB RMS at worst at 70 dB, -77.8 at transparent.

New tests pin each format's length, latency, window and multiplies, that Q15
runs DspTap's Q15 rows through its quantizer, the Q15 offering rows where they
differ and a Q15 chain's exact latency; the chunking test runs balanced too.
The header, rational/README.md (its settings and offering tables), the book's
guard band chapter and rational/CLAUDE.md state the Q15 rows and numbers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
…an v13)

docs/IIR_PLAN.md v13 records question 21's answer as it lands: DspTap 0.4.0
(tap/DspTap#69) commits the guard band filter's Q15 rows and the symmetric
quantizer, and the pin move runs them, so the linear form in Q15 holds the 70
dB tier at the four 70 dB named settings (-89.2 / -70.4 / -72.3 / -70.7 dB at
32 / 40 / 50 / 60 taps); transparent's Q15 limit stays pinned (-70.9 / -69.2
dB), as the FIR stages state Q15 at transparent (section 5 item 4, section 8).

rational/PLAN.md: R26 names the Q15 rows and the per-format length; v0.24 and
section 6's record of the pin move carry the Q15 numbers per setting, what
moved (the Q15 FIR pin and the Q15 rows' latency, window and multiplies) and
what did not (every float, double and Q31 output, the Q15 Chebyshev II), the
A/B (every async, bridge and rational ratchet binary byte-identical across the
move on the M33, M55, Hexagon and host in both builds) and the verification.
docs/ROADMAP.md adds the pin move after IIR-c's follow-up (#115) and moves
TapTools' first step to DspTap v0.4.0, the family's floor.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016GKzq1VSdcMYCRMhddiMaf
@tap
tap merged commit bcef447 into main Nov 22, 2026
41 checks passed
@tap
tap deleted the claude/sample-rate-solutions-comparison-mqc190 branch November 22, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants