diff options
author | Mans Rullgard <mans@mansr.com> | 2012-08-11 01:54:15 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2012-08-13 01:03:25 +0100 |
commit | 8b0de73464fcb110dce2f5601e4e27b2cbd33d20 (patch) | |
tree | b148a1bc43e0c4d9165c8a00177ad2f0402dfd84 /libavcodec/g723_1.c | |
parent | fddc5b9bea39968ed1f45c667869428865de7626 (diff) | |
download | ffmpeg-8b0de73464fcb110dce2f5601e4e27b2cbd33d20.tar.gz |
g723.1: deobfuscate "(x << 4) - x" to "15 * x"
The compiler performs this optimisation.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/g723_1.c')
-rw-r--r-- | libavcodec/g723_1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c index 7d8a48e18a..d4158ffef7 100644 --- a/libavcodec/g723_1.c +++ b/libavcodec/g723_1.c @@ -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); } |