diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-09-29 04:52:22 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-09-29 04:52:22 +0200 |
commit | da343ff4324b4ceb305aa6359cea1580e758d36c (patch) | |
tree | 18620b458cca083344d0915b6be79b562db9ed4e /libswresample | |
parent | f9a2d0c3feccab94a86c92396f3e36110dc2227b (diff) | |
download | ffmpeg-streaming-da343ff4324b4ceb305aa6359cea1580e758d36c.zip ffmpeg-streaming-da343ff4324b4ceb305aa6359cea1580e758d36c.tar.gz |
swr_test: dont test samples that have not been written
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample')
-rw-r--r-- | libswresample/swresample_test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/swresample_test.c b/libswresample/swresample_test.c index b634151..e8683cd 100644 --- a/libswresample/swresample_test.c +++ b/libswresample/swresample_test.c @@ -123,7 +123,7 @@ int main(int argc, char **argv){ double sum_aa= 0; double sum_bb= 0; double sum_ab= 0; - for(i=0; i<SAMPLES; i++){ + for(i=0; i<out_count; i++){ double a= get(array_in , ch + i*in_ch_count, in_sample_fmt); double b= get(array_out, ch + i*in_ch_count, in_sample_fmt); sum_a += a; @@ -136,7 +136,7 @@ int main(int argc, char **argv){ x = sum_ab/sum_bb; sse= sum_aa + sum_bb*x*x - 2*x*sum_ab; - fprintf(stderr, "[%f %f %f] len:%5d\n", sqrt(sse/SAMPLES), x, maxdiff, out_count); + fprintf(stderr, "[%f %f %f] len:%5d\n", sqrt(sse/out_count), x, maxdiff, out_count); } fprintf(stderr, "\n"); } |