P1.4: full FUN_180529fe0 decomp confirms mask-canon (scale->IIR->blend->combine+weights->warp->dry/wet->FFT-conv); documented remaining live scalars for bit-exact

This commit is contained in:
2026-08-19 23:34:02 +03:00
parent 8b8895f68a
commit cff28a605c
+30
View File
@@ -160,6 +160,36 @@
Остаток 0.7 dB (Q=0.1) = LUT-колено 0.574 -> нужен FFT-уровень (0x535a70 + окно 0x540658 + freq-axis
0x540698), см. SESSION_HANDOFF §5-6.
## ============ UPDATE 2026-08-19e: FUN_180529fe0 FULL DECOMP CONFIRMS MASK-CANON ============
Source: /tmp/consumers_out.txt:471-1277 (full Ghidra decomp). Validates + completes the
"CONFIRMED per-band pipeline" section below (lines 237-253). Notes:
### Mask chain (0x5408b8==0 mono path; 0x5408b8!=0 = dynamic/stereo-extra path)
Per band (band in [iVar20, lVar18)):
1. scale: 0x540678[band] *= (fVar30/nBands)·0x540870·0x54088c (0x9be0 = buf*scalar)
2. IIR smoother: FUN_18052d650(state 0x440518, out 0x5406f8, in 0x540678) then a 2nd IIR
(states 0x3404f8/0x2c04f8, count 0x2404e8) — double smoothing (att/release).
3. online blend (0x5408b8==0):
0x5406f8 = 0x540698·(1-mix), mix=0x54087c (0x6e40)
0x5406f8 += mix·0.8 (fVar25=0x24c3e28=0.8) (0x15060)
0x540678[band] = bigkernel(0x540678,0x5406f8) (0x26b820)
4. combine: 0x5407c8[band] = combine3(0x5407c8,0x540678,0x5406f8) (0x8d60)
+ mirror both halves (0x11940) + WEIGHT appends:
0x5407c8 += 0x5406c8·0x5406f8_upper (0x3c40, stride4)
0x5407c8 += 0x5406e8·0x5406f8_lower (0x3c40)
+ 0x5407c8 += 0x540678[band] (0x5a20)
5. (0x5408b8!=0 branch: freq-axis blend 0x6e40/0x15060 + 0x26b820 + 0x4f0400 weight)
6. WARP (tilt): 0x540678 *= 0x5406a8 (freqpath warp) (0x8700)
7. dry/wet: mask = mask·(fVar30·0x540888) + (1-fVar30) fVar30=0x540874rnd (0x8800-ish)
8. FFT-conv (0x52b550 steps 1-6) -> FIR -> conv with audio -> out[band]
- 0x5407c8 / 0x540678 / 0x540768: pointer arrays stride 0x10 (per band), 0x5406c8/6e8 = weight tables.
- Constants: fVar11=1.0 (c3ea4), fVar25=0.8 (c3e28), fVar28=0x24c4674(-0.7), fVar27=0x24c4670(-0.5).
### Confirmed scalar A/R (0x540888/88c) = expf(p·0.11513), captured window tail degenerate flat.
=> Mask-canonic is now FULLY mapped structurally. Remaining for bit-exact = exact scalar values
(XMM9/XMM13, 0x540870/874/87c/88c from RPP) + the level-LUT curve A/B/γ (ctx+0x188 BandConfig).
Structural C++ port of steps 3-8 exists: dsp/fftconv.cpp (P1.3) + dsp/levelpath.cpp (LUT curve).
## ============ UPDATE 2026-08-19d: f_52d990 / f_52d920 / f_52db50 DECODED (CORRECTION) ============
Disasm: handoff/nls_dasm/f_52d990.dis (52 B), f_52d920.dis, f_52db50.dis; caller f_52b570.dis.