From 9abc80f1ed673141326341e26a05c3e1f78576d0 Mon Sep 17 00:00:00 2001 From: Peter Meerwald Date: Fri, 20 Feb 2015 01:35:35 +0100 Subject: libavcodec: Make use of av_clip functions Signed-off-by: Peter Meerwald Signed-off-by: Luca Barbato --- libavcodec/g726.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libavcodec/g726.c') diff --git a/libavcodec/g726.c b/libavcodec/g726.c index 62aeb797e8..9ad91f238e 100644 --- a/libavcodec/g726.c +++ b/libavcodec/g726.c @@ -218,7 +218,7 @@ static int16_t g726_decode(G726Context* c, int I) c->b[i] = 0; } else { /* This is a bit crazy, but it really is +255 not +256 */ - fa1 = av_clip((-c->a[0]*c->pk[0]*pk0)>>5, -256, 255); + fa1 = av_clip_intp2((-c->a[0]*c->pk[0]*pk0)>>5, 8); c->a[1] += 128*pk0*c->pk[1] + fa1 - (c->a[1]>>7); c->a[1] = av_clip(c->a[1], -12288, 12288); -- cgit v1.2.3