Mercurial > libavcodec.hg
changeset 9943:2cd0d1447bd3 libavcodec
Fix declarations of complex numbers
Complex numbers must be declared using a base type of float, double,
or long double.
author | mru |
---|---|
date | Thu, 09 Jul 2009 10:16:00 +0000 |
parents | f91d6810f983 |
children | c5ca5e520fe1 |
files | iirfilter.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/iirfilter.c Wed Jul 08 23:14:47 2009 +0000 +++ b/iirfilter.c Thu Jul 09 10:16:00 2009 +0000 @@ -56,7 +56,7 @@ 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 @@ 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);