summaryrefslogtreecommitdiff
path: root/libavcodec/dca_xll.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2015-04-18 03:40:17 -0300
committerJames Almer <jamrial@gmail.com>2015-04-18 14:14:24 -0300
commit979b77eec5db6965e3fb5d2a453437264a95cfa1 (patch)
tree76080e9fd22c6551a83230b3543ec97a8bddaea4 /libavcodec/dca_xll.c
parentb5564e041bdcd3c527c9ad67300313f9c84b0994 (diff)
downloadffmpeg-979b77eec5db6965e3fb5d2a453437264a95cfa1.tar.gz
dca_xll: use av_clip_intp2()
Reviewed-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/dca_xll.c')
-rw-r--r--libavcodec/dca_xll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dca_xll.c b/libavcodec/dca_xll.c
index 9e1085c394..98fd4c8eaa 100644
--- a/libavcodec/dca_xll.c
+++ b/libavcodec/dca_xll.c
@@ -393,7 +393,7 @@ static void dca_xll_inv_adapt_pred(int *samples, int nsamples, unsigned order,
for (; j < order; j++)
s += (int64_t) c[j] * prev[DCA_XLL_AORDER_MAX + i - 1 - j];
- samples[i] -= av_clip((s + 0x8000) >> 16, -0x1000000, 0xffffff);
+ samples[i] -= av_clip_intp2((s + 0x8000) >> 16, 24);
}
}
for (i = order; i < nsamples; i++) {
@@ -402,7 +402,7 @@ static void dca_xll_inv_adapt_pred(int *samples, int nsamples, unsigned order,
/* NOTE: Equations seem to imply addition, while the
* pseudocode seems to use subtraction.*/
- samples[i] -= av_clip((s + 0x8000) >> 16, -0x1000000, 0xffffff);
+ samples[i] -= av_clip_intp2((s + 0x8000) >> 16, 24);
}
}