1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

swresample/resample_template: Add () to protect the arguments of the OUT() macro

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-17 00:36:35 +01:00
parent 52d1929000
commit 0cb95f9082

View File

@ -52,8 +52,8 @@
# define FELEM2 int64_t
# define FELEM_MAX INT32_MAX
# define FELEM_MIN INT32_MIN
# define OUT(d, v) v = (v + (1<<(FILTER_SHIFT-1)))>>FILTER_SHIFT;\
d = (uint64_t)(v + 0x80000000) > 0xFFFFFFFF ? (v>>63) ^ 0x7FFFFFFF : v
# define OUT(d, v) (v) = ((v) + (1<<(FILTER_SHIFT-1)))>>FILTER_SHIFT;\
(d) = (uint64_t)((v) + 0x80000000) > 0xFFFFFFFF ? ((v)>>63) ^ 0x7FFFFFFF : (v)
#elif defined(TEMPLATE_RESAMPLE_S16)
@ -65,8 +65,8 @@
# define FELEML int64_t
# define FELEM_MAX INT16_MAX
# define FELEM_MIN INT16_MIN
# define OUT(d, v) v = (v + (1<<(FILTER_SHIFT-1)))>>FILTER_SHIFT;\
d = (unsigned)(v + 32768) > 65535 ? (v>>31) ^ 32767 : v
# define OUT(d, v) (v) = ((v) + (1<<(FILTER_SHIFT-1)))>>FILTER_SHIFT;\
(d) = (unsigned)((v) + 32768) > 65535 ? ((v)>>31) ^ 32767 : (v)
#endif