changeset 5442:f5d2349dccd7 libavcodec

making reference models have the same API
author mhoffman
date Wed, 01 Aug 2007 20:44:08 +0000
parents 7b8fd76dba47
children 40c87c0f754b
files fft-test.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/fft-test.c	Wed Aug 01 20:37:41 2007 +0000
+++ b/fft-test.c	Wed Aug 01 20:44:08 2007 +0000
@@ -95,8 +95,9 @@
     }
 }
 
-void imdct_ref(float *out, float *in, int n)
+void imdct_ref(float *out, float *in, int nbits)
 {
+    int n = 1<<nbits;
     int k, i, a;
     double sum, f;
 
@@ -112,8 +113,9 @@
 }
 
 /* NOTE: no normalisation by 1 / N is done */
-void mdct_ref(float *output, float *input, int n)
+void mdct_ref(float *output, float *input, int nbits)
 {
+    int n = 1<<nbits;
     int k, i;
     double a, s;
 
@@ -246,11 +248,11 @@
 
     if (do_mdct) {
         if (do_inverse) {
-            imdct_ref((float *)tab_ref, (float *)tab1, fft_size);
+            imdct_ref((float *)tab_ref, (float *)tab1, fft_nbits);
             ff_imdct_calc(m, tab2, (float *)tab1, tabtmp);
             check_diff((float *)tab_ref, tab2, fft_size);
         } else {
-            mdct_ref((float *)tab_ref, (float *)tab1, fft_size);
+            mdct_ref((float *)tab_ref, (float *)tab1, fft_nbits);
 
             ff_mdct_calc(m, tab2, (float *)tab1, tabtmp);