mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
adpcm: use av_clip() in adpcm_ima_expand_nibble().
This commit is contained in:
parent
689be85a9a
commit
89f3aa8ce2
@ -150,8 +150,7 @@ static inline short adpcm_ima_expand_nibble(ADPCMChannelStatus *c, char nibble,
|
|||||||
|
|
||||||
step = ff_adpcm_step_table[c->step_index];
|
step = ff_adpcm_step_table[c->step_index];
|
||||||
step_index = c->step_index + ff_adpcm_index_table[(unsigned)nibble];
|
step_index = c->step_index + ff_adpcm_index_table[(unsigned)nibble];
|
||||||
if (step_index < 0) step_index = 0;
|
step_index = av_clip(step_index, 0, 88);
|
||||||
else if (step_index > 88) step_index = 88;
|
|
||||||
|
|
||||||
sign = nibble & 8;
|
sign = nibble & 8;
|
||||||
delta = nibble & 7;
|
delta = nibble & 7;
|
||||||
|
Loading…
Reference in New Issue
Block a user