mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 11:19:55 +00:00
avcodec/adxenc: Use av_clip_intp2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
03f39fbb2a
commit
d74c8d3ada
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user