1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-26 19:01:44 +02:00

avcodec/adxenc: Use av_clip_intp2()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2015-02-21 20:38:13 +01:00
parent 03f39fbb2a
commit d74c8d3ada

View File

@ -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(ROUNDED_DIV(d, scale), -8, 7);
d = av_clip_intp2(ROUNDED_DIV(d, scale), 3);
put_sbits(&pb, 4, d);