summaryrefslogtreecommitdiffstats
path: root/libavcodec/i386
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2007-02-09 12:37:38 +0000
committerMichael Niedermayer <michaelni@gmx.at>2007-02-09 12:37:38 +0000
commit7c4fd7eb0c8d05041a879c5ad69319d6161a6bd8 (patch)
tree1d17b22ee315a18d4e7480688f44d386b3c3ee22 /libavcodec/i386
parent9301a0b4a9f640b24e6dcaa71ce1be53fdee7b48 (diff)
downloadffmpeg-streaming-7c4fd7eb0c8d05041a879c5ad69319d6161a6bd8.zip
ffmpeg-streaming-7c4fd7eb0c8d05041a879c5ad69319d6161a6bd8.tar.gz
factor out common subexprssion (gcc of course is too stupid to do this ...)
5% faster avg_h264_chroma_mc2_mmx2() 10% faster put_h264_chroma_mc2_mmx2() Originally committed as revision 7898 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/i386')
-rw-r--r--libavcodec/i386/dsputil_h264_template_mmx.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/i386/dsputil_h264_template_mmx.c b/libavcodec/i386/dsputil_h264_template_mmx.c
index 4eefc8b..f85c992 100644
--- a/libavcodec/i386/dsputil_h264_template_mmx.c
+++ b/libavcodec/i386/dsputil_h264_template_mmx.c
@@ -265,8 +265,9 @@ static void H264_CHROMA_MC4_TMPL(uint8_t *dst/*align 4*/, uint8_t *src/*align 1*
#ifdef H264_CHROMA_MC2_TMPL
static void H264_CHROMA_MC2_TMPL(uint8_t *dst/*align 2*/, uint8_t *src/*align 1*/, int stride, int h, int x, int y)
{
- int CD=((1<<16)-1)*x*y + 8*y;
- int AB=((8<<16)-8)*x + 64 - CD;
+ int tmp = ((1<<16)-1)*x + 8;
+ int CD= tmp*y;
+ int AB= (tmp<<3) - CD;
asm volatile(
/* mm5 = {A,B,A,B} */
/* mm6 = {C,D,C,D} */
OpenPOWER on IntegriCloud