P4: lock bigkernel semantics (exp2(-mask)*blend) + calibrate scale

Read the 0x26b820 SIMD loop: the exp2 result is multiplied by the blend buffer
(vmulpd at 0x18026bba0 with ymm11=blend) => mask = exp2(-level)*blend, sign
inverted for attenuation. framed_model.cpp corrected to exp2(-scratch)*0.8.
Calibrated level_scale=600 -> t1kq err -0.06 dB (ref -14.98). comb per-tone
errors reduced (max ~7.8 dB); warp/FFT-conv smoothing still approximated.
This commit is contained in:
2026-08-20 15:25:49 +03:00
parent d4a0a68584
commit 0d262461ea
2 changed files with 19 additions and 2 deletions
+5 -2
View File
@@ -117,9 +117,12 @@ void FramedDetector::processFrame(const std::complex<double>* spectrum, float* m
// 4. blend + bigkernel exp2 (0x26b820):
// b = freqaxis*(1-mix) + mix*0.8 (= 0.8 at mix=1.0)
// mask = exp2(0.5 * (mask - b)) [exp2 kernel scales input by 0.5]
// mask = exp2(-mask) * b (vectorized exp2 of x blend;
// verified from the SIMD loop: the
// exp2 result is multiplied by the
// blend buffer ymm11).
for (size_t k = 0; k <= half; k++) {
scratch[k] = std::exp2(0.5 * (static_cast<double>(scratch[k]) - C_BLEND08));
scratch[k] = std::exp2(-static_cast<double>(scratch[k])) * C_BLEND08;
}
// 5. combine / accumulator (0x5407c8[band]):