aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2018-01-09 21:15:20 +0300
committerRostislav Pehlivanov <atomnuker@gmail.com>2018-01-13 17:54:20 +0000
commitc7d726f7f466f69af8321a5e01133e64b4885f53 (patch)
tree209a6c2f92e95bfd921b0a6007652429f55d2311
parent6c4b9eb935b677e6f562660caf145b73ea49cf30 (diff)
downloadffmpeg-c7d726f7f466f69af8321a5e01133e64b4885f53.tar.gz
opusenc_psy: Typo, use all coeffs in range for band tonality calculation
-rw-r--r--libavcodec/opusenc_psy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/opusenc_psy.c b/libavcodec/opusenc_psy.c
index b712603344..8aded2140d 100644
--- a/libavcodec/opusenc_psy.c
+++ b/libavcodec/opusenc_psy.c
@@ -119,7 +119,7 @@ static void step_collect_psy_metrics(OpusPsyContext *s, int index)
for (j = 0; j < range; 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);