summaryrefslogtreecommitdiffstats
path: root/libswresample/resample.c
diff options
context:
space:
mode:
authorGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-23 14:48:40 -0800
committerGanesh Ajjanagadde <gajjanagadde@gmail.com>2015-12-24 11:29:52 -0800
commit26937fb416cd6fd42c7135b0e5332ba64154aff2 (patch)
treefa475fc0f67fabec0233b59fa1a6ecfc037618af /libswresample/resample.c
parent8cbb055760c725d0fb99fb759caabb5f4e37e340 (diff)
downloadffmpeg-streaming-26937fb416cd6fd42c7135b0e5332ba64154aff2.zip
ffmpeg-streaming-26937fb416cd6fd42c7135b0e5332ba64154aff2.tar.gz
swr/resample: use av_clip_int16 instead of av_clip
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc> Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
Diffstat (limited to 'libswresample/resample.c')
-rw-r--r--libswresample/resample.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswresample/resample.c b/libswresample/resample.c
index 34eb4c0..7888e57 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -202,7 +202,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
switch(c->format){
case AV_SAMPLE_FMT_S16P:
for(i=0;i<tap_count;i++)
- ((int16_t*)filter)[ph * alloc + i] = av_clip(lrintf(tab[i] * scale / norm), INT16_MIN, INT16_MAX);
+ ((int16_t*)filter)[ph * alloc + i] = av_clip_int16(lrintf(tab[i] * scale / norm));
if (tap_count % 2 == 0) {
for (i = 0; i < tap_count; i++)
((int16_t*)filter)[(phase_count-ph) * alloc + tap_count-1-i] = ((int16_t*)filter)[ph * alloc + i];
@@ -210,7 +210,7 @@ static int build_filter(ResampleContext *c, void *filter, double factor, int tap
else {
for (i = 1; i <= tap_count; i++)
((int16_t*)filter)[(phase_count-ph) * alloc + tap_count-i] =
- av_clip(lrintf(tab[i] * scale / (norm - tab[0] + tab[tap_count])), INT16_MIN, INT16_MAX);
+ av_clip_int16(lrintf(tab[i] * scale / (norm - tab[0] + tab[tap_count])));
}
break;
case AV_SAMPLE_FMT_S32P:
OpenPOWER on IntegriCloud