From 7e1ce6a6acd83cf2d5b21df94d2134b1553635ef Mon Sep 17 00:00:00 2001 From: Christophe GISQUET Date: Sat, 3 Mar 2012 15:09:36 +0100 Subject: dsputil: remove shift parameter from scalarproduct_int16 There is only one caller, which does not need the shifting. Other use cases are situations where different roundings would be needed. The x86 and neon versions are modified accordingly. Signed-off-by: Ronald S. Bultje --- libavcodec/x86/dsputil_yasm.asm | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'libavcodec/x86') diff --git a/libavcodec/x86/dsputil_yasm.asm b/libavcodec/x86/dsputil_yasm.asm index 09940d147d..da08bdab50 100644 --- a/libavcodec/x86/dsputil_yasm.asm +++ b/libavcodec/x86/dsputil_yasm.asm @@ -35,13 +35,12 @@ pb_bswap32: db 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12 SECTION_TEXT %macro SCALARPRODUCT 1 -; int scalarproduct_int16(int16_t *v1, int16_t *v2, int order, int shift) -cglobal scalarproduct_int16_%1, 3,3,4, v1, v2, order, shift +; int scalarproduct_int16(int16_t *v1, int16_t *v2, int order) +cglobal scalarproduct_int16_%1, 3,3,3, v1, v2, order shl orderq, 1 add v1q, orderq add v2q, orderq neg orderq - movd m3, shiftm pxor m2, m2 .loop: movu m0, [v1q + orderq] @@ -55,10 +54,8 @@ cglobal scalarproduct_int16_%1, 3,3,4, v1, v2, order, shift %if mmsize == 16 movhlps m0, m2 paddd m2, m0 - psrad m2, m3 pshuflw m0, m2, 0x4e %else - psrad m2, m3 pshufw m0, m2, 0x4e %endif paddd m2, m0 -- cgit v1.2.3