aboutsummaryrefslogtreecommitdiff
path: root/libavcodec/fft-test.c
diff options
context:
space:
mode:
authorMichael Niedermayer2007-07-29 09:58:36 +0000
committerMichael Niedermayer2007-07-29 09:58:36 +0000
commit86c624af1bc76af5d4d186d22589969ac4384558 (patch)
tree6b3787b747ae0ff861c0440925d3dc3025addfcc /libavcodec/fft-test.c
parent7919d10c61966adf55894cced07e467045014faf (diff)
print max and mse
Originally committed as revision 9826 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/fft-test.c')
-rw-r--r--libavcodec/fft-test.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/fft-test.c b/libavcodec/fft-test.c
index 725a814ca8..fd3346b9bd 100644
--- a/libavcodec/fft-test.c
+++ b/libavcodec/fft-test.c
@@ -144,13 +144,19 @@ int64_t gettime(void)
void check_diff(float *tab1, float *tab2, int n)
{
int i;
+ double max= 0;
+ double error= 0;
for(i=0;i<n;i++) {
- if (fabsf(tab1[i] - tab2[i]) >= 1e-3) {
+ double e= fabsf(tab1[i] - tab2[i]);
+ if (e >= 1e-3) {
av_log(NULL, AV_LOG_ERROR, "ERROR %d: %f %f\n",
i, tab1[i], tab2[i]);
}
+ error+= e*e;
+ if(e>max) max= e;
}
+ av_log(NULL, AV_LOG_INFO, "max:%f e:%g\n", max, sqrt(error)/n);
}