X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmdct_template.c;h=e0ad9f1e5312991a23f9fefc6f600870d60a0820;hb=aea0f06db74c1f924429d3cf9ff9f803d00feaf5;hp=04396b46d6c96999a6797540001f3fcb0a91fc31;hpb=c14f8125a8930ed6b2d4fc138273ee9dc17c05f6;p=ffmpeg diff --git a/libavcodec/mdct_template.c b/libavcodec/mdct_template.c index 04396b46d6c..e0ad9f1e531 100644 --- a/libavcodec/mdct_template.c +++ b/libavcodec/mdct_template.c @@ -33,12 +33,12 @@ */ #if FFT_FLOAT -# define RSCALE(x) (x) +# define RSCALE(x, y) ((x) + (y)) #else #if FFT_FIXED_32 -# define RSCALE(x) (((x) + 32) >> 6) +# define RSCALE(x, y) ((int)((x) + (unsigned)(y) + 32) >> 6) #else /* FFT_FIXED_32 */ -# define RSCALE(x) ((x) >> 1) +# define RSCALE(x, y) ((int)((x) + (unsigned)(y)) >> 1) #endif /* FFT_FIXED_32 */ #endif @@ -181,13 +181,13 @@ void ff_mdct_calc_c(FFTContext *s, FFTSample *out, const FFTSample *input) /* pre rotation */ for(i=0;i