Skip to content
Snippets Groups Projects
Commit 3bdc2fce authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

make the reference code use double instead of float where it is easy

Originally committed as revision 9827 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 86c624af
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,7 @@ FFTComplex *exptab; ...@@ -50,7 +50,7 @@ FFTComplex *exptab;
void fft_ref_init(int nbits, int inverse) void fft_ref_init(int nbits, int inverse)
{ {
int n, i; int n, i;
float c1, s1, alpha; double c1, s1, alpha;
n = 1 << nbits; n = 1 << nbits;
exptab = av_malloc((n / 2) * sizeof(FFTComplex)); exptab = av_malloc((n / 2) * sizeof(FFTComplex));
...@@ -69,7 +69,7 @@ void fft_ref_init(int nbits, int inverse) ...@@ -69,7 +69,7 @@ void fft_ref_init(int nbits, int inverse)
void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits)
{ {
int n, i, j, k, n2; int n, i, j, k, n2;
float tmp_re, tmp_im, s, c; double tmp_re, tmp_im, s, c;
FFTComplex *q; FFTComplex *q;
n = 1 << nbits; n = 1 << nbits;
...@@ -98,7 +98,7 @@ void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits) ...@@ -98,7 +98,7 @@ void fft_ref(FFTComplex *tabr, FFTComplex *tab, int nbits)
void imdct_ref(float *out, float *in, int n) void imdct_ref(float *out, float *in, int n)
{ {
int k, i, a; int k, i, a;
float sum, f; double sum, f;
for(i=0;i<n;i++) { for(i=0;i<n;i++) {
sum = 0; sum = 0;
...@@ -115,7 +115,7 @@ void imdct_ref(float *out, float *in, int n) ...@@ -115,7 +115,7 @@ void imdct_ref(float *out, float *in, int n)
void mdct_ref(float *output, float *input, int n) void mdct_ref(float *output, float *input, int n)
{ {
int k, i; int k, i;
float a, s; double a, s;
/* do it by hand */ /* do it by hand */
for(k=0;k<n/2;k++) { for(k=0;k<n/2;k++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment