summaryrefslogtreecommitdiff
path: root/libavcodec/ra144.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-09-23 18:30:41 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-09-23 21:12:23 +0200
commit127b70e423407a65a2c92fcbbc1db7263af3e0eb (patch)
treefef8514bfc996f8f85a41e2c672c4ba50b3d9db2 /libavcodec/ra144.c
parent7200fecd9b3a097948c152e72a991723019001be (diff)
downloadffmpeg-127b70e423407a65a2c92fcbbc1db7263af3e0eb.tar.gz
ra144: factor division out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ra144.c')
-rw-r--r--libavcodec/ra144.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index c54be50cc4..aa683785c9 100644
--- a/libavcodec/ra144.c
+++ b/libavcodec/ra144.c
@@ -1566,8 +1566,9 @@ int ff_eval_refl(int *refl, const int16_t *coefs, AVCodecContext *avctx)
if (!b)
b = -2;
+ b = 0x1000000 / b;
for (j=0; j <= i; j++)
- bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * (0x1000000 / b)) >> 12;
+ bp1[j] = ((bp2[j] - ((refl[i+1] * bp2[i-j]) >> 12)) * b) >> 12;
if ((unsigned) bp1[i] + 0x1000 > 0x1fff)
return 1;