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:
Mans Rullgard 2012-08-11 01:54:15 +01:00
parent fddc5b9bea
commit 8b0de73464

View File

@ -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);
}