X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fmdct_template.c;h=e0ad9f1e5312991a23f9fefc6f600870d60a0820;hb=dad42bc5a134f60164eab2dfb0892b761603e1e1;hp=04396b46d6c96999a6797540001f3fcb0a91fc31;hpb=672e704e4a409f5174f253f7a463653dd7e9cb7c;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