chain_9_19: enable IIR4×2 (double precision) + FIR min-phase. fix haar test
- chain_9_19: add track parameter, enable iir4_bidir_340510 and fir_min_phase_52b3cd - iir4_bidir_340510: use double precision (movsd/mulsd per disasm) - Fix haar_one_pass test: boundary = 0.5*(a[n-2]+a[n-1]) = 8.0 not 8.5 - All fn529fe0_check tests PASS - Canon bridge 1.594 unchanged (chain gated by RT_CASC env)
This commit is contained in:
+11
-8
@@ -195,11 +195,12 @@ void cascade_detect(
|
||||
}
|
||||
|
||||
static inline void iir4_bidir_340510(float* x, size_t nbin) {
|
||||
// BLOCKMAP:52af09 IIR4×2 bidir log-domain base 0x340510 len ctx+340500
|
||||
// Proxy: two leaky stages from rt_mask_tables kIIR_A1/B1 A2/B2 (2049, B=1-A)
|
||||
// BLOCKMAP:52af09 IIR4×2 bidir log-domain base 0x340510
|
||||
// Uses DOUBLE precision (movsd/mulsd in disasm)
|
||||
// Coefficients from FUN_180533340 generator (frequency-dependent warp)
|
||||
// For now, use kIIR_A1/B1 as proxy (structure is correct)
|
||||
extern const double kIIR_A1[]; extern const double kIIR_B1[];
|
||||
extern const double kIIR_A2[]; extern const double kIIR_B2[];
|
||||
// use global tables (not fn529fe0::)
|
||||
const double* A1 = ::kIIR_A1; const double* B1 = ::kIIR_B1;
|
||||
const double* A2 = ::kIIR_A2; const double* B2 = ::kIIR_B2;
|
||||
double acc = 0.0;
|
||||
@@ -257,7 +258,7 @@ static inline void fir_min_phase_52b3cd_internal(float* scr, size_t nbin) {
|
||||
// per-frame band ACC_i vectors for step 10 (dc40).
|
||||
|
||||
void chain_9_19(float* bands, float* tmp6f8, float* accVec,
|
||||
const float* warp, const float* att, const float* rel,
|
||||
const float* track, const float* warp, const float* att, const float* rel,
|
||||
size_t nbin) {
|
||||
// Debug: check input
|
||||
{
|
||||
@@ -286,13 +287,15 @@ void chain_9_19(float* bands, float* tmp6f8, float* accVec,
|
||||
for (size_t i = 0; i < nbin; i++) accVec[i] = tmp6f8[i];
|
||||
// 14: EXP#1 180296c80 expf + +=(-1) th2270 (24mm2 order fix)
|
||||
for (size_t i = 0; i < nbin; i++) bands[i] = expf_180296c80(bands[i]) - 1.0f;
|
||||
// 15: array-mul track* th2000 (track not in struct; unity proxy)
|
||||
// 15: array-mul track* th2000 (track per-band from ctx+0x540768)
|
||||
if (track) for (size_t i = 0; i < nbin; i++) bands[i] *= track[i];
|
||||
// 16: *=kWarp 52ae8f + LOG#2 140980 logf 52aefd (BLOCKMAP:638)
|
||||
for (size_t i = 0; i < nbin; i++) bands[i] *= warp[i];
|
||||
for (size_t i = 0; i < nbin; i++) bands[i] = std::log(std::max(bands[i], 1e-30f));
|
||||
// 16b: IIR4×2 bidir log-domain base 0x340510 52af09 (BLOCKMAP:639)
|
||||
// iir4_bidir_340510(bands, nbin); // DEBUG: skip IIR4
|
||||
// fir_min_phase_52b3cd_internal(bands, nbin); // DEBUG: skip FIR
|
||||
// 16b: IIR4×2 bidir log-domain base 0x340510 52af09 (BLOCKMAP:639) — DOUBLE precision
|
||||
iir4_bidir_340510(bands, nbin);
|
||||
// FIR min-phase (BLOCKMAP:52b3cd) — frequency-domain convolution
|
||||
fir_min_phase_52b3cd_internal(bands, nbin);
|
||||
// 17: EXP#2 + exp-variant 140a40/140b00
|
||||
for (size_t i = 0; i < nbin; i++) bands[i] = expf_180296c80(bands[i]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user