[FFmpeg-devel] [PATCH 2/6] x86: hevc_mc: remove unneeded shift
Christophe Gisquet
christophe.gisquet at gmail.com
Sun Jun 1 16:12:58 CEST 2014
The immediate value may be 0.
---
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 0c1a431..5cf37d0 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,8 +421,10 @@ 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
%endmacro
@@ -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
--
1.8.0.msysgit.0
More information about the ffmpeg-devel
mailing list