[FFmpeg-cvslog] fft-test: fix order of operations for calculating the average error

Michael Niedermayer git at videolan.org
Sun Sep 30 20:18:39 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 30 19:30:48 2012 +0200| [29619f47c152db7390345ff9287e555ae501e277] | committer: Michael Niedermayer

fft-test: fix order of operations for calculating the average error

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

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

diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 681e247..66474ce 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -205,7 +205,7 @@ static int check_diff(FFTSample *tab1, FFTSample *tab2, int n, double scale)
         error+= e*e;
         if(e>max) max= e;
     }
-    av_log(NULL, AV_LOG_INFO, "max:%f e:%g\n", max, sqrt(error)/n);
+    av_log(NULL, AV_LOG_INFO, "max:%f e:%g\n", max, sqrt(error/n));
     return err;
 }
 



More information about the ffmpeg-cvslog mailing list