[SCM] libav/experimental: simplify (d&a) and (d&~a) calculation, hint by skal

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:44:59 UTC 2013


The following commit has been merged in the experimental branch:
commit d3a9f79871296c5b16d7dacc463830908c833689
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Sat Sep 3 09:17:30 2005 +0000

    simplify (d&a) and (d&~a) calculation, hint by skal
    
    Originally committed as revision 4552 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/i386/h264dsp_mmx.c b/libavcodec/i386/h264dsp_mmx.c
index 47fcf93..cf2a445 100644
--- a/libavcodec/i386/h264dsp_mmx.c
+++ b/libavcodec/i386/h264dsp_mmx.c
@@ -162,11 +162,10 @@ void ff_h264_idct_add_mmx2(uint8_t *dst, int16_t *block, int stride)
         /* delta = (avg(q0, p1>>2) + (d&a))
          *       - (avg(p0, q1>>2) + (d&~a)) */\
         "pavgb   %%mm2, %%mm0  \n\t"\
-        "movq    %%mm5, %%mm6  \n\t"\
-        "pand    %%mm4, %%mm6  \n\t"\
-        "paddusb %%mm6, %%mm0  \n\t"\
+        "pand    %%mm5, %%mm4  \n\t"\
+        "paddusb %%mm4, %%mm0  \n\t"\
         "pavgb   %%mm1, %%mm3  \n\t"\
-        "pandn   %%mm5, %%mm4  \n\t"\
+        "pxor    %%mm5, %%mm4  \n\t"\
         "paddusb %%mm4, %%mm3  \n\t"\
         /* p0 += clip(delta, -tc0, tc0)
          * q0 -= clip(delta, -tc0, tc0) */\

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list