Commit 181b3363 authored by Måns Rullgård's avatar Måns Rullgård

Fix declarations of complex numbers

Complex numbers must be declared using a base type of float, double,
or long double.

Originally committed as revision 19390 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 0d73abb8
...@@ -56,7 +56,7 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type ...@@ -56,7 +56,7 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type
int i, j, size; int i, j, size;
FFIIRFilterCoeffs *c; FFIIRFilterCoeffs *c;
double wa; double wa;
complex p[MAXORDER + 1]; double complex p[MAXORDER + 1];
if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS) if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
return NULL; return NULL;
...@@ -78,7 +78,7 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type ...@@ -78,7 +78,7 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type
for(i = 1; i <= order; i++) for(i = 1; i <= order; i++)
p[i] = 0.0; p[i] = 0.0;
for(i = 0; i < order; i++){ for(i = 0; i < order; i++){
complex zp; double complex zp;
double th = (i + (order >> 1) + 0.5) * M_PI / order; double th = (i + (order >> 1) + 0.5) * M_PI / order;
zp = cexp(I*th) * wa; zp = cexp(I*th) * wa;
zp = (zp + 2.0) / (zp - 2.0); zp = (zp + 2.0) / (zp - 2.0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment