P4: multi-band FramedDetector (per-band twin res, sens-scaled GAIN, min-combine); tt_base 61.40%; min-combine wrong (soothe2 uses additive accumulator 0x5407c8)
This commit is contained in:
+13
-10
@@ -156,18 +156,21 @@ int main(int argc, char* argv[]) {
|
||||
}
|
||||
|
||||
SpectralProcessor sp(2048, 512);
|
||||
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;
|
||||
}
|
||||
std::vector<DetectorBand> bands;
|
||||
for (const auto& b : params.bands) {
|
||||
if (b.on > 0.5f && b.freq > 1.0f) {
|
||||
DetectorBand db;
|
||||
db.fc = static_cast<float>(b.freq);
|
||||
db.q = static_cast<float>(b.q > 0.0f ? b.q : 1.0f);
|
||||
db.sens = static_cast<float>(b.sens);
|
||||
bands.push_back(db);
|
||||
}
|
||||
}
|
||||
sp.setDetectorParams(fc, q);
|
||||
if (bands.empty()) {
|
||||
DetectorBand db{500.0f, 1.0f, 12.0f};
|
||||
bands.push_back(db);
|
||||
}
|
||||
sp.setDetectorParams(bands);
|
||||
|
||||
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