[FFmpeg-devel] [PATCH] Fix declarations of complex numbers
Mans Rullgard
mans
Thu Jul 9 10:41:36 CEST 2009
Complex numbers must be declared using a base type of float, double,
or long double.
---
libavcodec/iirfilter.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavcodec/iirfilter.c b/libavcodec/iirfilter.c
index 62c2a61..1d9e9a0 100644
--- a/libavcodec/iirfilter.c
+++ b/libavcodec/iirfilter.c
@@ -56,7 +56,7 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type
int i, j, size;
FFIIRFilterCoeffs *c;
double wa;
- complex p[MAXORDER + 1];
+ double complex p[MAXORDER + 1];
if(filt_type != FF_FILTER_TYPE_BUTTERWORTH || filt_mode != FF_FILTER_MODE_LOWPASS)
return NULL;
@@ -78,7 +78,7 @@ struct FFIIRFilterCoeffs* ff_iir_filter_init_coeffs(enum IIRFilterType filt_type
for(i = 1; i <= order; i++)
p[i] = 0.0;
for(i = 0; i < order; i++){
- complex zp;
+ double complex zp;
double th = (i + (order >> 1) + 0.5) * M_PI / order;
zp = cexp(I*th) * wa;
zp = (zp + 2.0) / (zp - 2.0);
--
1.6.3.3
More information about the ffmpeg-devel
mailing list