diff options
author | Ramiro Polla <ramiro.polla@gmail.com> | 2010-10-31 21:20:20 +0000 |
---|---|---|
committer | Ramiro Polla <ramiro.polla@gmail.com> | 2010-10-31 21:20:20 +0000 |
commit | eed299b897ee99738572aec66a64f2920c6aa472 (patch) | |
tree | db522147883ee39ffa5c02e7fe4664763d277b70 /libavcodec/x86/motion_est_mmx.c | |
parent | 0d0778b060011970fee40f67269d0c25284dd89a (diff) | |
download | ffmpeg-eed299b897ee99738572aec66a64f2920c6aa472.tar.gz |
sad16_sse2: merge 2 asm blocks
Originally committed as revision 25617 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/x86/motion_est_mmx.c')
-rw-r--r-- | libavcodec/x86/motion_est_mmx.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/libavcodec/x86/motion_est_mmx.c b/libavcodec/x86/motion_est_mmx.c index 2dc1925c55..e1314aef4b 100644 --- a/libavcodec/x86/motion_est_mmx.c +++ b/libavcodec/x86/motion_est_mmx.c @@ -98,23 +98,20 @@ static int sad16_sse2(void *v, uint8_t *blk2, uint8_t *blk1, int stride, int h) ASMALIGN(4) "1: \n\t" "movdqu (%1), %%xmm0 \n\t" - "movdqu (%1, %3), %%xmm1 \n\t" + "movdqu (%1, %4), %%xmm1 \n\t" "psadbw (%2), %%xmm0 \n\t" - "psadbw (%2, %3), %%xmm1 \n\t" + "psadbw (%2, %4), %%xmm1 \n\t" "paddw %%xmm0, %%xmm2 \n\t" "paddw %%xmm1, %%xmm2 \n\t" - "lea (%1,%3,2), %1 \n\t" - "lea (%2,%3,2), %2 \n\t" + "lea (%1,%4,2), %1 \n\t" + "lea (%2,%4,2), %2 \n\t" "sub $2, %0 \n\t" " jg 1b \n\t" - : "+r" (h), "+r" (blk1), "+r" (blk2) - : "r" ((x86_reg)stride) - ); - __asm__ volatile( "movhlps %%xmm2, %%xmm0 \n\t" "paddw %%xmm0, %%xmm2 \n\t" - "movd %%xmm2, %0 \n\t" - : "=r"(ret) + "movd %%xmm2, %3 \n\t" + : "+r" (h), "+r" (blk1), "+r" (blk2), "=r"(ret) + : "r" ((x86_reg)stride) ); return ret; } |