Browse Source

opusenc_psy: Typo, use all coeffs in range for band tonality calculation

tags/n4.0
Daniil Cherednik Rostislav Pehlivanov 7 years ago
parent
commit
c7d726f7f4
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/opusenc_psy.c

+ 1
- 1
libavcodec/opusenc_psy.c View File

@@ -119,7 +119,7 @@ static void step_collect_psy_metrics(OpusPsyContext *s, int index)


for (j = 0; j < range; j++) { for (j = 0; j < range; j++) {
const float c_s = coeffs[j]*coeffs[j]; const float c_s = coeffs[j]*coeffs[j];
dist_dev = (avg_c_s - c_s)*(avg_c_s - c_s);
dist_dev += (avg_c_s - c_s)*(avg_c_s - c_s);
} }


st->tone[ch][i] += sqrtf(dist_dev); st->tone[ch][i] += sqrtf(dist_dev);


Loading…
Cancel
Save