aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2012-08-10 00:13:46 +0100
committerMans Rullgard <mans@mansr.com>2012-08-10 12:18:38 +0100
commite141cf2c5794cd9884f2806b7766a1e0bb47ebe5 (patch)
treef4df7ba2e63c95e3e825fee8bf98343ec8695fd9 /libavcodec
parente2b7c5783d34fa36a265c1e475de71ba3dd49a19 (diff)
downloadffmpeg-e141cf2c5794cd9884f2806b7766a1e0bb47ebe5.tar.gz
g723.1: deobfuscate an expression
(x << 2) - x is just an optimisation of 3 * x the compiler is perfectly capable of doing on its own. Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/g723_1.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libavcodec/g723_1.c b/libavcodec/g723_1.c
index bf753ab182..c337deb881 100644
--- a/libavcodec/g723_1.c
+++ b/libavcodec/g723_1.c
@@ -974,8 +974,7 @@ static void formant_postfilter(G723_1_Context *p, int16_t *lpc, int16_t *buf)
if (temp) {
temp = (auto_corr[0] >> 2) / temp;
}
- p->reflection_coef = ((p->reflection_coef << 2) - p->reflection_coef +
- temp + 2) >> 2;
+ p->reflection_coef = (3 * p->reflection_coef + temp + 2) >> 2;
temp = (p->reflection_coef * 0xffffc >> 3) & 0xfffc;
/* Compensation filter */