aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/takdec.c
diff options
context:
space:
mode:
authorPeter Meerwald <pmeerw@pmeerw.net>2015-02-20 01:35:35 +0100
committerLuca Barbato <lu_zero@gentoo.org>2015-02-21 00:54:40 +0100
commit9abc80f1ed673141326341e26a05c3e1f78576d0 (patch)
treeca91fca7b76eec0d98a2b420f0220ec0df13a239 /libavcodec/takdec.c
parent76ce9bd8e26dcb3652240a1072840ff4011d7cdc (diff)
downloadffmpeg-9abc80f1ed673141326341e26a05c3e1f78576d0.tar.gz
libavcodec: Make use of av_clip functions
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'libavcodec/takdec.c')
-rw-r--r--libavcodec/takdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/takdec.c b/libavcodec/takdec.c
index 16ccdba9b1..60e80d590a 100644
--- a/libavcodec/takdec.c
+++ b/libavcodec/takdec.c
@@ -487,7 +487,7 @@ static int decode_subframe(TAKDecContext *s, int32_t *decoded,
v += s->adsp.scalarproduct_int16(&s->residues[i], filter,
FFALIGN(filter_order, 16));
- v = (av_clip(v >> filter_quant, -8192, 8191) << dshift) - *decoded;
+ v = (av_clip_intp2(v >> filter_quant, 13) << dshift) - *decoded;
*decoded++ = v;
s->residues[filter_order + i] = v >> dshift;
}
@@ -657,7 +657,7 @@ static int decorrelate(TAKDecContext *s, int c1, int c2, int length)
v += s->adsp.scalarproduct_int16(&s->residues[i], filter,
FFALIGN(filter_order, 16));
- p1[i] = (av_clip(v >> 10, -8192, 8191) << dshift) - p1[i];
+ p1[i] = (av_clip_intp2(v >> 10, 13) << dshift) - p1[i];
}
emms_c();