22r: affine dB law (RT_LAWAFFINE) ported onto bare chain — TOTAL 1.931 beats canon 2.286; A=7.4/S=1.85 best, tradeoffs mapped
This commit is contained in:
@@ -210,6 +210,16 @@ static void process_band_structural(
|
||||
double mm = std::exp2(-static_cast<double>(band_level[k]));
|
||||
static const int noblend = getenv("RT_NOBLEND") ? atoi(getenv("RT_NOBLEND")) : 0;
|
||||
if (!noblend) mm *= f6f8[k];
|
||||
// RT_LAWAFFINE="A,S" (NOTES 22q): cut_dB = A + S*log2(lvl) — affine dB law
|
||||
static const char* la = getenv("RT_LAWAFFINE");
|
||||
if (la && lut_off) {
|
||||
double A_db = atof(la); const char* cm = strchr(la, ',');
|
||||
double S_db = cm ? atof(cm + 1) : 2.17;
|
||||
if (band_level[k] > 1e-6) {
|
||||
double y = (A_db + S_db * std::log2(band_level[k])) / 6.0174;
|
||||
mm = std::exp2(-y);
|
||||
}
|
||||
}
|
||||
mask_out[k] = static_cast<float>(mm);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user