@ -327,20 +327,20 @@ int main(int argc, char **argv)
case TRANSFORM_MDCT :
case TRANSFORM_MDCT :
if ( do_inverse ) {
if ( do_inverse ) {
imdct_ref ( ( float * ) tab_ref , ( float * ) tab1 , fft_nbits ) ;
imdct_ref ( ( float * ) tab_ref , ( float * ) tab1 , fft_nbits ) ;
ff_ imdct_calc( m , tab2 , ( float * ) tab1 ) ;
m - > imdct_calc ( m , tab2 , ( float * ) tab1 ) ;
err = check_diff ( ( float * ) tab_ref , tab2 , fft_size , scale ) ;
err = check_diff ( ( float * ) tab_ref , tab2 , fft_size , scale ) ;
} else {
} else {
mdct_ref ( ( float * ) tab_ref , ( float * ) tab1 , fft_nbits ) ;
mdct_ref ( ( float * ) tab_ref , ( float * ) tab1 , fft_nbits ) ;
ff_ mdct_calc( m , tab2 , ( float * ) tab1 ) ;
m - > mdct_calc ( m , tab2 , ( float * ) tab1 ) ;
err = check_diff ( ( float * ) tab_ref , tab2 , fft_size / 2 , scale ) ;
err = check_diff ( ( float * ) tab_ref , tab2 , fft_size / 2 , scale ) ;
}
}
break ;
break ;
case TRANSFORM_FFT :
case TRANSFORM_FFT :
memcpy ( tab , tab1 , fft_size * sizeof ( FFTComplex ) ) ;
memcpy ( tab , tab1 , fft_size * sizeof ( FFTComplex ) ) ;
ff_ fft_permute( s , tab ) ;
s - > fft_permute ( s , tab ) ;
ff_ fft_calc( s , tab ) ;
s - > fft_calc ( s , tab ) ;
fft_ref ( tab_ref , tab1 , fft_nbits ) ;
fft_ref ( tab_ref , tab1 , fft_nbits ) ;
err = check_diff ( ( float * ) tab_ref , ( float * ) tab , fft_size * 2 , 1.0 ) ;
err = check_diff ( ( float * ) tab_ref , ( float * ) tab , fft_size * 2 , 1.0 ) ;
@ -357,7 +357,7 @@ int main(int argc, char **argv)
memcpy ( tab2 , tab1 , fft_size * sizeof ( FFTSample ) ) ;
memcpy ( tab2 , tab1 , fft_size * sizeof ( FFTSample ) ) ;
tab2 [ 1 ] = tab1 [ fft_size_2 ] . re ;
tab2 [ 1 ] = tab1 [ fft_size_2 ] . re ;
ff_ rdft_calc( r , tab2 ) ;
r - > rdft_calc ( r , tab2 ) ;
fft_ref ( tab_ref , tab1 , fft_nbits ) ;
fft_ref ( tab_ref , tab1 , fft_nbits ) ;
for ( i = 0 ; i < fft_size ; i + + ) {
for ( i = 0 ; i < fft_size ; i + + ) {
tab [ i ] . re = tab2 [ i ] ;
tab [ i ] . re = tab2 [ i ] ;
@ -369,7 +369,7 @@ int main(int argc, char **argv)
tab2 [ i ] = tab1 [ i ] . re ;
tab2 [ i ] = tab1 [ i ] . re ;
tab1 [ i ] . im = 0 ;
tab1 [ i ] . im = 0 ;
}
}
ff_ rdft_calc( r , tab2 ) ;
r - > rdft_calc ( r , tab2 ) ;
fft_ref ( tab_ref , tab1 , fft_nbits ) ;
fft_ref ( tab_ref , tab1 , fft_nbits ) ;
tab_ref [ 0 ] . im = tab_ref [ fft_size_2 ] . re ;
tab_ref [ 0 ] . im = tab_ref [ fft_size_2 ] . re ;
err = check_diff ( ( float * ) tab_ref , ( float * ) tab2 , fft_size , 1.0 ) ;
err = check_diff ( ( float * ) tab_ref , ( float * ) tab2 , fft_size , 1.0 ) ;
@ -377,7 +377,7 @@ int main(int argc, char **argv)
break ;
break ;
case TRANSFORM_DCT :
case TRANSFORM_DCT :
memcpy ( tab , tab1 , fft_size * sizeof ( FFTComplex ) ) ;
memcpy ( tab , tab1 , fft_size * sizeof ( FFTComplex ) ) ;
ff_ dct_calc( d , tab ) ;
d - > dct_calc ( d , tab ) ;
if ( do_inverse ) {
if ( do_inverse ) {
idct_ref ( tab_ref , tab1 , fft_nbits ) ;
idct_ref ( tab_ref , tab1 , fft_nbits ) ;
} else {
} else {
@ -402,22 +402,22 @@ int main(int argc, char **argv)
switch ( transform ) {
switch ( transform ) {
case TRANSFORM_MDCT :
case TRANSFORM_MDCT :
if ( do_inverse ) {
if ( do_inverse ) {
ff_ imdct_calc( m , ( float * ) tab , ( float * ) tab1 ) ;
m - > imdct_calc ( m , ( float * ) tab , ( float * ) tab1 ) ;
} else {
} else {
ff_ mdct_calc( m , ( float * ) tab , ( float * ) tab1 ) ;
m - > mdct_calc ( m , ( float * ) tab , ( float * ) tab1 ) ;
}
}
break ;
break ;
case TRANSFORM_FFT :
case TRANSFORM_FFT :
memcpy ( tab , tab1 , fft_size * sizeof ( FFTComplex ) ) ;
memcpy ( tab , tab1 , fft_size * sizeof ( FFTComplex ) ) ;
ff_ fft_calc( s , tab ) ;
s - > fft_calc ( s , tab ) ;
break ;
break ;
case TRANSFORM_RDFT :
case TRANSFORM_RDFT :
memcpy ( tab2 , tab1 , fft_size * sizeof ( FFTSample ) ) ;
memcpy ( tab2 , tab1 , fft_size * sizeof ( FFTSample ) ) ;
ff_ rdft_calc( r , tab2 ) ;
r - > rdft_calc ( r , tab2 ) ;
break ;
break ;
case TRANSFORM_DCT :
case TRANSFORM_DCT :
memcpy ( tab2 , tab1 , fft_size * sizeof ( FFTSample ) ) ;
memcpy ( tab2 , tab1 , fft_size * sizeof ( FFTSample ) ) ;
ff_ dct_calc( d , tab2 ) ;
d - > dct_calc ( d , tab2 ) ;
break ;
break ;
}
}
}
}