[libav-devel] [PATCH] dsputil: Fix error by not using redzone and register name

2013-01-27 Thread Derek Buitenhuis
From: Daniel Kang daniel.d.k...@gmail.com

Signed-off-by: Derek Buitenhuis derek.buitenh...@gmail.com
---
 libavcodec/x86/hpeldsp.asm   |6 +++---
 libavcodec/x86/mpeg4qpel.asm |6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/libavcodec/x86/hpeldsp.asm b/libavcodec/x86/hpeldsp.asm
index 8afd955..85594c1 100644
--- a/libavcodec/x86/hpeldsp.asm
+++ b/libavcodec/x86/hpeldsp.asm
@@ -312,8 +312,8 @@ PUT_NO_RND_PIXELS8_Y2_EXACT
 ; avg_pixels8(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 %macro AVG_PIXELS8 0
 cglobal avg_pixels8, 4,5
-movsxdifnidn r2, edx
-lea  r4, [r2+r2]
+movsxdifnidn r2, r2d
+lea  r4, [r2*2]
 .loop:
 mova m0, [r0]
 mova m1, [r0+r2]
@@ -343,7 +343,7 @@ AVG_PIXELS8
 ; avg_pixels8_x2(uint8_t *block, const uint8_t *pixels, int line_size, int h)
 %macro AVG_PIXELS8_X2 0
 cglobal avg_pixels8_x2, 4,5
-movsxdifnidn r2, edx
+movsxdifnidn r2, r2d
 lea  r4, [r2*2]
 .loop:
 mova m0, [r1]
diff --git a/libavcodec/x86/mpeg4qpel.asm b/libavcodec/x86/mpeg4qpel.asm
index a5525d2..6b5d203 100644
--- a/libavcodec/x86/mpeg4qpel.asm
+++ b/libavcodec/x86/mpeg4qpel.asm
@@ -168,7 +168,7 @@ INIT_MMX 3dnow
 PUT_NO_RND_PIXELS16_l2
 
 %macro MPEG4_QPEL16_H_LOWPASS 1
-cglobal %1_mpeg4_qpel16_h_lowpass, 5, 5, 0, 8
+cglobal %1_mpeg4_qpel16_h_lowpass, 5, 5, 0, 16
 movsxdifnidn r2, r2d
 movsxdifnidn r3, r3d
 pxor m7, m7
@@ -201,7 +201,7 @@ cglobal %1_mpeg4_qpel16_h_lowpass, 5, 5, 0, 8
 paddwm6, [PW_ROUND]
 paddwm0, m6
 psrawm0, 5
-mova[rsp-8], m0
+mova[rsp+8], m0
 mova m0, [r1+5]
 mova m5, m0
 mova m6, m0
@@ -225,7 +225,7 @@ cglobal %1_mpeg4_qpel16_h_lowpass, 5, 5, 0, 8
 paddwm1, [PW_ROUND]
 paddwm3, m1
 psrawm3, 5
-mova m1, [rsp-8]
+mova m1, [rsp+8]
 packuswb m1, m3
 OP_MOV [r0], m1, m4
 mova m1, [r1+9]
-- 
1.7.10.4

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] dsputil: Fix error by not using redzone and register name

2013-01-27 Thread Derek Buitenhuis
On 2013-01-27 4:28 PM, Derek Buitenhuis wrote:
 From: Daniel Kang daniel.d.k...@gmail.com
 
 Signed-off-by: Derek Buitenhuis derek.buitenh...@gmail.com
 ---
  libavcodec/x86/hpeldsp.asm   |6 +++---
  libavcodec/x86/mpeg4qpel.asm |6 +++---
  2 files changed, 6 insertions(+), 6 deletions(-)

I tested this on 64-bit MSVC 2012 and 64-bit MinGW-w64.

- Derek
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] dsputil: Fix error by not using redzone and register name

2013-01-27 Thread Ronald S. Bultje
Hi,

On Sun, Jan 27, 2013 at 1:28 PM, Derek Buitenhuis
derek.buitenh...@gmail.com wrote:
 From: Daniel Kang daniel.d.k...@gmail.com

 Signed-off-by: Derek Buitenhuis derek.buitenh...@gmail.com
 ---
  libavcodec/x86/hpeldsp.asm   |6 +++---
  libavcodec/x86/mpeg4qpel.asm |6 +++---
  2 files changed, 6 insertions(+), 6 deletions(-)

OK.

Ronald
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel