P4: port framed_render.py model to C++ (FramedDetector: twin-res -> level -> Pchip LUT -> warp -> res^rp gain), replace empirical Detector; tt_base 49.93%->61.45% (single-band); multi-band refs still 100% (model is single-band)
This commit is contained in:
+12
-4
@@ -156,10 +156,18 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
SpectralProcessor sp(2048, 512);
|
||||
sp.setDetectorParams(
|
||||
static_cast<float>(params.sharpness),
|
||||
static_cast<float>(params.selectivity),
|
||||
static_cast<float>(params.depth));
|
||||
float fc = 500.0f;
|
||||
float q = 1.0f;
|
||||
if (!params.bands.empty()) {
|
||||
for (const auto& b : params.bands) {
|
||||
if (b.on > 0.5f && b.freq > 1.0f) {
|
||||
fc = static_cast<float>(b.freq);
|
||||
q = static_cast<float>(b.q > 0.0f ? b.q : 1.0f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
sp.setDetectorParams(fc, q);
|
||||
|
||||
std::vector<float> left(frames, 0.0f), right(frames, 0.0f);
|
||||
encode_ms(left_in.data(), right_in.data(), frames);
|
||||
|
||||
Reference in New Issue
Block a user