mirror of
https://github.com/google/liblc3.git
synced 2026-04-28 01:44:48 +00:00
Improvement: Add warning on double promotion and remove one the last that remains
This commit is contained in:
@@ -646,12 +646,12 @@ static int estimate_noise(enum lc3_dt dt, enum lc3_bandwidth bw,
|
||||
for (i = 6*(3 + dt) - w; i < LC3_MIN(nq, bw_stop); i++) {
|
||||
z = xq[i] ? 0 : z + 1;
|
||||
if (z > 2*w)
|
||||
sum += fabs(x[i - w]), n++;
|
||||
sum += fabsf(x[i - w]), n++;
|
||||
}
|
||||
|
||||
for ( ; i < bw_stop + w; i++)
|
||||
if (++z > 2*w)
|
||||
sum += fabs(x[i - w]), n++;
|
||||
sum += fabsf(x[i - w]), n++;
|
||||
|
||||
int nf = n ? 8 - (int)((16 * sum) / n + 0.5f) : 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user