aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-11-30 12:56:02 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-11-30 12:56:02 +0100
commit0b5adc35200888ca87e68823ac73905b7eb4279e (patch)
treeaf24b5a562dddcf7dfcb4f1627c8e8ef1e875d0b /libavcodec
parent6b0ab561d019c12471920ae136c746d3a54878e8 (diff)
downloadffmpeg-0b5adc35200888ca87e68823ac73905b7eb4279e.tar.gz
avcodec/adxenc: fix rounding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/adxenc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/adxenc.c b/libavcodec/adxenc.c
index aee444e42c..4387ffbbbd 100644
--- a/libavcodec/adxenc.c
+++ b/libavcodec/adxenc.c
@@ -81,7 +81,7 @@ static void adx_encode(ADXContext *c, uint8_t *adx, const int16_t *wav,
for (i = 0, j = 0; j < 32; i += channels, j++) {
d = ((wav[i] << COEFF_BITS) - c->coeff[0] * s1 - c->coeff[1] * s2) >> COEFF_BITS;
- d = av_clip(d / scale, -8, 7);
+ d = av_clip(ROUNDED_DIV(d, scale), -8, 7);
put_sbits(&pb, 4, d);