From dcd2a6ca36a42b39867c39720344422161893178 Mon Sep 17 00:00:00 2001 From: Christophe Gisquet Date: Sun, 1 Jun 2014 14:12:58 +0000 Subject: [PATCH] x86: hevc_mc: remove unneeded shift The immediate value may be 0. Signed-off-by: Michael Niedermayer --- libavcodec/x86/hevc_mc.asm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/x86/hevc_mc.asm b/libavcodec/x86/hevc_mc.asm index 0c1a431bf1..5cf37d0194 100644 --- a/libavcodec/x86/hevc_mc.asm +++ b/libavcodec/x86/hevc_mc.asm @@ -379,8 +379,10 @@ QPEL_TABLE 10, 4, w, sse4 pmaddwd m3, %4 paddd m1, m3 %endif +%if %1 != 8 psrad m0, %1-8 psrad m1, %1-8 +%endif packssdw m0, m1 %endif %endmacro @@ -408,7 +410,9 @@ QPEL_TABLE 10, 4, w, sse4 paddd m0, m2 paddd m4, m6 paddd m0, m4 +%if %2 != 8 psrad m0, %2-8 +%endif %if %1 > 4 pmaddwd m1, [rfilterq + %3q*8 ] pmaddwd m3, [rfilterq + %3q*8+16] @@ -417,7 +421,9 @@ QPEL_TABLE 10, 4, w, sse4 paddd m1, m3 paddd m5, m7 paddd m1, m5 +%if %2 != 8 psrad m1, %2-8 +%endif %endif p%4 m0, m1 %endif @@ -449,7 +455,9 @@ QPEL_TABLE 10, 4, w, sse4 paddd m0, m2 paddd m4, m6 paddd m0, m4 +%if %2 != 8 psrad m0, %2-8 +%endif %if %1 > 4 pmaddwd m1, m12 pmaddwd m3, m13 @@ -458,9 +466,11 @@ QPEL_TABLE 10, 4, w, sse4 paddd m1, m3 paddd m5, m7 paddd m1, m5 +%if %2 != 8 psrad m1, %2-8 %endif %endif +%endif %endmacro %macro BI_COMPUTE 7 ; width, bitd, src1l, src1h, scr2l, scr2h, pw