diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-11-30 12:56:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-11-30 12:56:02 +0100 |
commit | 0b5adc35200888ca87e68823ac73905b7eb4279e (patch) | |
tree | af24b5a562dddcf7dfcb4f1627c8e8ef1e875d0b /libavcodec | |
parent | 6b0ab561d019c12471920ae136c746d3a54878e8 (diff) | |
download | ffmpeg-0b5adc35200888ca87e68823ac73905b7eb4279e.tar.gz |
avcodec/adxenc: fix rounding
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/adxenc.c | 2 |
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); |