mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-30 22:50:48 +00:00
g723.1: deobfuscate "(x << 4) - x" to "15 * x"
The compiler performs this optimisation. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
fddc5b9bea
commit
8b0de73464
@ -914,7 +914,7 @@ static void gain_scale(G723_1_Context *p, int16_t * buf, int energy)
|
||||
}
|
||||
|
||||
for (i = 0; i < SUBFRAME_LEN; i++) {
|
||||
p->pf_gain = ((p->pf_gain << 4) - p->pf_gain + gain + (1 << 3)) >> 4;
|
||||
p->pf_gain = (15 * p->pf_gain + gain + (1 << 3)) >> 4;
|
||||
buf[i] = av_clip_int16((buf[i] * (p->pf_gain + (p->pf_gain >> 4)) +
|
||||
(1 << 10)) >> 11);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user