spectral: vectors instead of new[]; vlaw: extract law + vlaw_check target

- spectral.cpp: window_/buf_/tmp_buf_/fir_buf_/fir_freq_ as std::vector (no
  exception-leak in ctor, destructor = default)
- framed_model.hpp: extract vlaw_cut/vlaw_mask inline (BLOCKMAP:314 softplus)
- dsp/vlaw_check.cpp: unit test for law (monotonic, zero-level, delta, ref,
  comb-neutral) — PASS
- CMake: add vlaw_check target
- Guard: corpus --compare d=+0.000, fn529fe0_check PASS, twin_check PASS
This commit is contained in:
2026-09-02 23:19:34 +03:00
parent e4c53480ad
commit 2f854cd1da
8 changed files with 163 additions and 29 deletions
+3 -4
View File
@@ -316,10 +316,9 @@ static void process_band_structural(
if (delta_state) {
}
for (size_t k2 = 0; k2 < nbin; k2++) {
double cs = vlaw_alpha * std::log1p(static_cast<double>(raw_level[k2]) / vlaw_beta)
+ vlaw_c
+ (delta_mark[k2] ? vlaw_delta : 0.0);
band_level[k2] = static_cast<float>(std::pow(10.0, -cs / 20.0));
band_level[k2] = static_cast<float>(vlaw_mask(
static_cast<double>(raw_level[k2]), vlaw_alpha, vlaw_beta,
vlaw_c, delta_mark[k2] ? vlaw_delta : 0.0));
}
frame_dbg_ctr++;
} else