ffmpeg | branch: master | Daniil Cherednik <dan.chered...@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);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to