Fix d207 intra prediction SSSE3 functions
authorYunqing Wang <yunqingwang@google.com>
Sat, 19 Oct 2013 00:00:18 +0000 (17:00 -0700)
committerYunqing Wang <yunqingwang@google.com>
Sat, 19 Oct 2013 00:00:18 +0000 (17:00 -0700)
This patch fixed a bug that caused 32bit PIC build mismatch. The
stack pointer was modified after "GET_GOT". Loading left pointer
from a hard-coded position gave wrong result.

Change-Id: Iea0aec6f917b12a6b3393ffc986bad74510248cc

vp9/common/vp9_rtcd_defs.sh
vp9/common/x86/vp9_intrapred_ssse3.asm

index d3f944c..6fa9e22 100644 (file)
@@ -31,7 +31,7 @@ forward_decls vp9_common_forward_decls
 # RECON
 #
 prototype void vp9_d207_predictor_4x4 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
-specialize vp9_d207_predictor_4x4
+specialize vp9_d207_predictor_4x4 $ssse3_x86inc
 
 prototype void vp9_d45_predictor_4x4 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
 specialize vp9_d45_predictor_4x4 $ssse3_x86inc
@@ -70,7 +70,7 @@ prototype void vp9_dc_128_predictor_4x4 "uint8_t *dst, ptrdiff_t y_stride, const
 specialize vp9_dc_128_predictor_4x4
 
 prototype void vp9_d207_predictor_8x8 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
-specialize vp9_d207_predictor_8x8
+specialize vp9_d207_predictor_8x8 $ssse3_x86inc
 
 prototype void vp9_d45_predictor_8x8 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
 specialize vp9_d45_predictor_8x8 $ssse3_x86inc
@@ -109,7 +109,7 @@ prototype void vp9_dc_128_predictor_8x8 "uint8_t *dst, ptrdiff_t y_stride, const
 specialize vp9_dc_128_predictor_8x8
 
 prototype void vp9_d207_predictor_16x16 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
-specialize vp9_d207_predictor_16x16
+specialize vp9_d207_predictor_16x16 $ssse3_x86inc
 
 prototype void vp9_d45_predictor_16x16 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
 specialize vp9_d45_predictor_16x16 $ssse3_x86inc
@@ -148,7 +148,7 @@ prototype void vp9_dc_128_predictor_16x16 "uint8_t *dst, ptrdiff_t y_stride, con
 specialize vp9_dc_128_predictor_16x16
 
 prototype void vp9_d207_predictor_32x32 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
-specialize vp9_d207_predictor_32x32
+specialize vp9_d207_predictor_32x32 $ssse3_x86inc
 
 prototype void vp9_d45_predictor_32x32 "uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left"
 specialize vp9_d45_predictor_32x32 $ssse3_x86inc
index 314d1a2..568e208 100644 (file)
@@ -790,9 +790,8 @@ cglobal d153_predictor_32x32, 4, 5, 8, dst, stride, above, left, goffset
   RET
 
 INIT_MMX ssse3
-cglobal d207_predictor_4x4, 2, 5, 4, dst, stride, unused, left, goffset
+cglobal d207_predictor_4x4, 4, 5, 4, dst, stride, unused, left, goffset
   GET_GOT     goffsetq
-  movifnidn        leftq, leftmp
   movd                m0, [leftq]                ; abcd [byte]
   pshufb              m1, m0, [GLOBAL(sh_b1233)] ; bcdd [byte]
   pshufb              m3, m0, [GLOBAL(sh_b2333)] ; cddd
@@ -813,9 +812,8 @@ cglobal d207_predictor_4x4, 2, 5, 4, dst, stride, unused, left, goffset
   RET
 
 INIT_XMM ssse3
-cglobal d207_predictor_8x8, 2, 5, 4, dst, stride, stride3, left, goffset
+cglobal d207_predictor_8x8, 4, 5, 4, dst, stride, stride3, left, goffset
   GET_GOT     goffsetq
-  movifnidn        leftq, leftmp
   movq                m3, [leftq]            ; abcdefgh [byte]
   lea           stride3q, [strideq*3]
 
@@ -848,10 +846,9 @@ cglobal d207_predictor_8x8, 2, 5, 4, dst, stride, stride3, left, goffset
   RET
 
 INIT_XMM ssse3
-cglobal d207_predictor_16x16, 2, 5, 5, dst, stride, stride3, left, goffset
+cglobal d207_predictor_16x16, 4, 5, 5, dst, stride, stride3, left, goffset
   GET_GOT     goffsetq
   lea           stride3q, [strideq*3]
-  movifnidn        leftq, leftmp
   mova                m0, [leftq]            ; abcdefghijklmnop [byte]
   pshufb              m1, m0, [GLOBAL(sh_b123456789abcdeff)] ; bcdefghijklmnopp
   pshufb              m2, m0, [GLOBAL(sh_b23456789abcdefff)]
@@ -896,10 +893,9 @@ cglobal d207_predictor_16x16, 2, 5, 5, dst, stride, stride3, left, goffset
   REP_RET
 
 INIT_XMM ssse3
-cglobal d207_predictor_32x32, 2, 5, 8, dst, stride, stride3, left, goffset
+cglobal d207_predictor_32x32, 4, 5, 8, dst, stride, stride3, left, goffset
   GET_GOT     goffsetq
   lea           stride3q, [strideq*3]
-  movifnidn        leftq, leftmp
   mova                m1, [leftq]              ;  0-15 [byte]
   mova                m2, [leftq+16]           ; 16-31 [byte]
   pshufb              m0, m2, [GLOBAL(sh_b23456789abcdefff)]