Commit 8b0de734 authored by Mans Rullgard's avatar Mans Rullgard

g723.1: deobfuscate "(x << 4) - x" to "15 * x"

The compiler performs this optimisation.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent fddc5b9b
...@@ -914,7 +914,7 @@ static void gain_scale(G723_1_Context *p, int16_t * buf, int energy) ...@@ -914,7 +914,7 @@ static void gain_scale(G723_1_Context *p, int16_t * buf, int energy)
} }
for (i = 0; i < SUBFRAME_LEN; i++) { 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)) + buf[i] = av_clip_int16((buf[i] * (p->pf_gain + (p->pf_gain >> 4)) +
(1 << 10)) >> 11); (1 << 10)) >> 11);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment