From 9c9d6743d460da1bfb88af66bf43597ae6927af3 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 25 Jun 2012 11:23:09 -0700 Subject: [PATCH] Sign-extend input argument so it can be used in pointer arithmetic. Change-Id: I6cbd4de96f9dcc783cef170bfd7652f6cbee36a2 --- vp8/common/x86/idctllm_mmx.asm | 7 ++++++- vp8/decoder/x86/dequantize_mmx.asm | 23 +++++++++++++++++++++-- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/vp8/common/x86/idctllm_mmx.asm b/vp8/common/x86/idctllm_mmx.asm index 815ee8e..15e81ad 100644 --- a/vp8/common/x86/idctllm_mmx.asm +++ b/vp8/common/x86/idctllm_mmx.asm @@ -196,7 +196,12 @@ cglobal short_idct4x4llm_1_mmx,3,3,0,inp,out,pit ;void dc_only_idct_add_mmx(short input_dc, unsigned char *pred_ptr, unsigned char *dst_ptr, int pitch, int stride) -cglobal dc_only_idct_add_mmx, 5,5,0,in_dc,pred,dst,pit,stride +cglobal dc_only_idct_add_mmx, 4,5,0,in_dc,pred,dst,pit,stride +%if ARCH_X86_64 + movsxd strideq, dword stridem +%else + mov strideq, stridem +%endif pxor m0, m0 movh m5, in_dcq ; dc diff --git a/vp8/decoder/x86/dequantize_mmx.asm b/vp8/decoder/x86/dequantize_mmx.asm index cc5bd15..23080bf 100644 --- a/vp8/decoder/x86/dequantize_mmx.asm +++ b/vp8/decoder/x86/dequantize_mmx.asm @@ -44,7 +44,16 @@ cglobal dequantize_b_impl_mmx, 3,3,0,sq,dq,arg3 ;void dequant_idct_add_mmx(short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride) -cglobal dequant_idct_add_mmx, 6,6,0,inp,dq,pred,dest,pit,stride +cglobal dequant_idct_add_mmx, 4,6,0,inp,dq,pred,dest,pit,stride + +%if ARCH_X86_64 + movsxd strideq, dword stridem + movsxd pitq, dword pitm +%else + mov strideq, stridem + mov pitq, pitm +%endif + mova m0, [inpq+ 0] pmullw m0, [dqq] @@ -213,7 +222,17 @@ cglobal dequant_idct_add_mmx, 6,6,0,inp,dq,pred,dest,pit,stride ;void dequant_dc_idct_add_mmx(short *input, short *dq, unsigned char *pred, unsigned char *dest, int pitch, int stride, int Dc) -cglobal dequant_dc_idct_add_mmx, 7,7,0,inp,dq,pred,dest,pit,stride,Dc +cglobal dequant_dc_idct_add_mmx, 4,7,0,inp,dq,pred,dest,pit,stride,Dc + +%if ARCH_X86_64 + movsxd strideq, dword stridem + movsxd pitq, dword pitm +%else + mov strideq, stridem + mov pitq, pitm +%endif + + mov Dcq, Dcm mova m0, [inpq+ 0] pmullw m0, [dqq+ 0] -- 2.7.4