[FFmpeg-cvslog] ra144: factor division out

Michael Niedermayer git at videolan.org
Sun Sep 23 21:15:47 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Sep 23 18:30:41 2012 +0200| [127b70e423407a65a2c92fcbbc1db7263af3e0eb] | committer: Michael Niedermayer

ra144: factor division out

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=127b70e423407a65a2c92fcbbc1db7263af3e0eb
---

 libavcodec/ra144.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/ra144.c b/libavcodec/ra144.c
index c54be50..aa68378 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;



More information about the ffmpeg-cvslog mailing list