diff options
author | James Almer <jamrial@gmail.com> | 2015-04-05 15:26:49 -0300 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-04-05 22:46:40 +0200 |
commit | 43482bd1a55c093570d035a01b7d284a65e611ef (patch) | |
tree | 54ba974d9717da9cfe4a90a8ba25292d9e39f4cb | |
parent | be920e4820efe310956627074c4d04f963a327aa (diff) | |
download | ffmpeg-43482bd1a55c093570d035a01b7d284a65e611ef.tar.gz |
swr/resample: use av_clip functions
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libswresample/resample_template.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/resample_template.c b/libswresample/resample_template.c index 7e80ef995a..d71efd63c0 100644 --- a/libswresample/resample_template.c +++ b/libswresample/resample_template.c @@ -53,7 +53,7 @@ # 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) + (d) = av_clipl_int32(v) #elif defined(TEMPLATE_RESAMPLE_S16) @@ -66,7 +66,7 @@ # 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) + (d) = av_clip_int16(v) #endif |