[FFmpeg-cvslog] swr-test: improve output

Michael Niedermayer git at videolan.org
Thu Apr 26 15:51:18 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Apr 26 13:05:17 2012 +0200| [08809e3085cf90ee79b7181656f802a9d272a217] | committer: Michael Niedermayer

swr-test: improve output

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

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

 libswresample/swresample_test.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/libswresample/swresample_test.c b/libswresample/swresample_test.c
index f054a6f..be47492 100644
--- a/libswresample/swresample_test.c
+++ b/libswresample/swresample_test.c
@@ -266,10 +266,9 @@ int main(int argc, char **argv){
                                 sum_ab+= a*b;
                                 maxdiff= FFMAX(maxdiff, FFABS(a-b));
                             }
-                            x = sum_ab/sum_bb;
-                            sse= sum_aa + sum_bb*x*x - 2*x*sum_ab;
+                            sse= sum_aa + sum_bb - 2*sum_ab;
 
-                            fprintf(stderr, "[%f %f %f] len:%5d\n", sqrt(sse/out_count), x, maxdiff, out_count);
+                            fprintf(stderr, "[e:%f c:%f max:%f] len:%5d\n", sqrt(sse/out_count), sum_ab/(sqrt(sum_aa*sum_bb)), maxdiff, out_count);
                         }
 
                         flush_i++;
@@ -296,10 +295,9 @@ int main(int argc, char **argv){
                                     sum_ab+= a*b;
                                     maxdiff= FFMAX(maxdiff, FFABS(a-b));
                                 }
-                                x = sum_ab/sum_bb;
-                                sse= sum_aa + sum_bb*x*x - 2*x*sum_ab;
+                                sse= sum_aa + sum_bb - 2*sum_ab;
 
-                                fprintf(stderr, "[%f %f %f] len:%5d F:%3d\n", sqrt(sse/flush_count), x, maxdiff, flush_count, flush_i);
+                                fprintf(stderr, "[e:%f c:%f max:%f] len:%5d F:%3d\n", sqrt(sse/flush_count), sum_ab/(sqrt(sum_aa*sum_bb)), maxdiff, flush_count, flush_i);
                             }
                         }
 



More information about the ffmpeg-cvslog mailing list