[FFmpeg-cvslog] opusenc_psy: Typo, use all coeffs in range for band tonality calculation

Daniil Cherednik git at videolan.org
Sat Jan 13 19:54:49 EET 2018


ffmpeg | branch: master | Daniil Cherednik <dan.cherednik at gmail.com> | Tue Jan  9 21:15:20 2018 +0300| [c7d726f7f466f69af8321a5e01133e64b4885f53] | committer: Rostislav Pehlivanov

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

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c7d726f7f466f69af8321a5e01133e64b4885f53
---

 libavcodec/opusenc_psy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);



More information about the ffmpeg-cvslog mailing list