P2: level-tracker UPDATE-loop located (inline bidirectional IIR in FUN_180529fe0), structural module leveltrack (iir_first_order/bidirectional/unrolled4); scalar==unrolled verified; remaining = live A[] coeffs

This commit is contained in:
2026-08-19 23:53:01 +03:00
parent cff28a605c
commit 433a0026e6
5 changed files with 116 additions and 1 deletions
+23
View File
@@ -0,0 +1,23 @@
#pragma once
#include <cstddef>
// Level-tracker UPDATE (structural transcription, NOTES_LEVEL 2026-08-19f).
// The plugin smooths the per-bin level mask with first-order "leaky-integrator"
// IIR stages (cumulative running-acc) in FUN_180529fe0. Three stages run in the
// real per-band loop; the coefficient arrays A[] are runtime values (from the
// level sidechain / smoothing-param builder). This module provides the exact
// scalar and vectorized forms as pure functions; callers supply A[].
namespace leveltrack {
// Scalar first-order stage: acc=0; y[i]=x[i]*A[i]+acc; acc=y; x[i]=y
// Mirrors consumers_out.txt scalar loop. In-place on x.
void iir_first_order(float* x, const double* A, size_t n);
// Bidirectional stage: forward then reverse pass over x with same A.
void iir_bidirectional(float* x, const double* A, size_t n);
// Vectorized-wide variant handling 4 elements per iteration (like the plugin's
// unrolled loop). Same math, provided for parity tests.
void iir_first_order_unrolled4(float* x, const double* A, size_t n);
} // namespace leveltrack