Repository navigation
Performance Research A07 HRTF Indexing and Target Update
| Field | Value |
|---|---|
| Evidence state | 97,309-address model matches; separate channel-update reductions reproduce a defect |
| Inspected source | 322986f4c5502b3fa887a9605ac8cd88e9b2c579 |
| First experiment | Separate target-update correctness repair from index walking |
| Scope | Addendum dated September 15, 2026; not a current-main benchmark or implementation status |
Unproven performance research · Performance research — common test protocol · Performance research — reproducible checks
Source and proof. The filter uses 31 taps, a maximum integer delay of 42, and a 73-sample ring. For valid p in [0,72], d in [0,42], and k in [0,30], let t=p-d-k. Then t lies in [-72,72], so the existing ring index equals t+73 when negative and t otherwise. The predecessor index and decrement-with-wrap recurrence also match. All 97,309 position/delay/tap combinations were checked with zero mismatches. This proves addressing equivalence for the stated domain, not complete audio equivalence or a speedup. Filter source.
Practical implementation order. First replace repeated modular indexing with a correctly initialized pointer/index walk. Then investigate independent coefficient-smoothing lanes. Only later change the FIR reduction layout. Preserve per-sample parameter stepping, interpolation, in-place input/output behavior, accumulation order, FMA policy, and saved history.
Production precedent. Arm CMSIS-DSP uses expanded FIR state buffers to avoid circular addressing and describes the resulting performance benefit. That supports contiguous state handling, but xemu's changing coefficients and fractional delay prevent treating a stock fixed-coefficient FIR as an equivalent drop-in. CMSIS FIR.
Concrete correctness defect found. In hrtf_filter_set_target_params(), the normalization loop uses break when the current channel's absolute coefficient sum is zero or one. If that is the left channel, the right target is not copied. The caller is present in the guest HRTF-target assignment method. Two standalone C cases reproduce stale right-channel targets using coefficients encodable by the existing signed-8-bit conversion; a left-sum-two control updates both channels correctly. Isolate this correctness repair from performance work. Target assignment, coefficient conversion.
Gain scale. Each active HRTF voice executes 1,984 tap evaluations per 32-sample frame, approximately 2.976 million/s at 48 kHz. The opportunity is real work removal, but % 73 may already be strength-reduced by the compiler; inspect generated code rather than assuming a hardware integer divide per tap.
Use separate patches/controls for C1 target update and P1 indexing. Defer changed FIR reduction, FMA use and coefficient SIMD until P1 output is qualified.
C1: update both channel targets independently; P1: same sample stepping and tap order with decrement-and-wrap indices
Locate the inspected seam before editing; names or ownership may have changed since the pinned review:
git grep -n -E 'hrtf_filter_process|hrtf_filter_set_target_params|set_hrir' -- hw/xbox/mcpx/apuThese are implementation gates to add or exercise, not claims that production tests already exist or passed. Retained standalone checks are on the checks page.
| Test ID | Setup / deliberate control | Required oracle |
|---|---|---|
A07.C1 |
Left coefficient absolute sum 0 and 1, with a nonzero new right target; sum-2 positive control. | Old reduction preserves a stale right target in the first two cases; the repair updates both targets independently. |
A07.P1 |
All 73 positions x 43 delays x 31 taps; check predecessor and decrement-with-wrap indices. | 97,309 tuples match the original integer addressing. |
A07.P2 |
Replay in-place processing across ring wrap, delay endpoints and fractional delays, with coefficient changes every sample/frame boundary. | Sample outputs and saved history match under the declared floating-point/FMA policy. |
Collect: index_mismatches, channel_target_mismatches, pcm_mismatches, active_hrtf_voices, tap_evaluations, hrtf_cpu_ns. Keep exact counts separate from sampled durations; use an uninstrumented build for performance qualification.
Reject or hold: A passing indexing model does not qualify parameter semantics or changed summation. Inspect generated assembly: do not assume one hardware divide per source-level modulo.
Follow the common protocol for source identities, previous-main/fixed-baseline controls, raw results, confidence and retail/XISO qualification. No gain becomes proven from a model, cache hit, local operation count, or shifted wait label alone.
DSP tooling guide and navigation updated November 2, 2026 for experimental PR #384, source 8f51d237. Capture/replay usage and limits.
The earlier wiki-wide review was published November 1, 2026. Emulator source: b7140848. Reviewed wiki content: 1d2b671. Current status · Release availability · Publication process.
- Home
- Current status
- Stable versus main
- Implemented mechanisms
- Controls and defaults
- Measured results and limits
- Complete change register
- System
- CPU and vCPU
- Memory and DMA
- Graphics / NV2A
- APU and audio
- Timing and timers
- Platform and I/O
- Hardware observations
- Fidelity boundaries
- Methodology
- PGR2 routes
- Debugging lag / hot paths
- Tools and commands
- DSP capture, replay and fuzzing
- HLE readiness and public XISO proof
- Concurrent DSP shadow and OpenAL proof
- DSP HLE operation inventory
- DSP HLE fix examples and testing
- Development
- Upstream shortlist
- Wiki maintenance
- Research / retired work
- Optimization catalog
- Hot-path shortcuts
- Researched experiments
- Unproven proposal directory
- PR lessons
- September26 snapshot
Repository · PRs · Issues