[x265] [PATCH 5 of 8] asm: interp_4tap_horiz_pp_4x4_sse3

dtyx265 at gmail.com dtyx265 at gmail.com
Thu Apr 16 22:35:54 CEST 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1429215381 25200
# Node ID f476d7556132462c92264e98254e59143a6ae85e
# Parent  b1f1c0780d756f1680dbedde1e1e3a27e3c067c5
asm: interp_4tap_horiz_pp_4x4_sse3

This replaces c code.

64-bit

./test/TestBench --testbench interp | grep "chroma_hpp\[  4x4\]"
chroma_hpp[  4x4]	2.20x 	 865.00   	 1902.48
chroma_hpp[  4x4]	2.20x 	 865.00   	 1900.67

32-bit

./test/TestBench --testbench interp | grep "chroma_hpp\[  4x4\]"
chroma_hpp[  4x4]	2.57x 	 937.48   	 2412.42
chroma_hpp[  4x4]	2.57x 	 937.49   	 2413.04

diff -r b1f1c0780d75 -r f476d7556132 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Thu Apr 16 13:06:57 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Thu Apr 16 13:16:21 2015 -0700
@@ -1359,8 +1359,10 @@
         p.chroma[X265_CSP_I420].pu[CHROMA_420_2x4].filter_hpp = x265_interp_4tap_horiz_pp_2x4_sse3;
         p.chroma[X265_CSP_I420].pu[CHROMA_420_2x8].filter_hpp = x265_interp_4tap_horiz_pp_2x8_sse3;
         p.chroma[X265_CSP_I420].pu[CHROMA_420_4x2].filter_hpp = x265_interp_4tap_horiz_pp_4x2_sse3;
+        p.chroma[X265_CSP_I420].pu[CHROMA_420_4x4].filter_hpp = x265_interp_4tap_horiz_pp_4x4_sse3;
         p.chroma[X265_CSP_I422].pu[CHROMA_422_2x8].filter_hpp = x265_interp_4tap_horiz_pp_2x8_sse3;
         p.chroma[X265_CSP_I422].pu[CHROMA_422_2x16].filter_hpp = x265_interp_4tap_horiz_pp_2x16_sse3;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_4x4].filter_hpp = x265_interp_4tap_horiz_pp_4x4_sse3;
     }
     if (cpuMask & X265_CPU_SSSE3)
     {
diff -r b1f1c0780d75 -r f476d7556132 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm	Thu Apr 16 13:06:57 2015 -0700
+++ b/source/common/x86/ipfilter8.asm	Thu Apr 16 13:16:21 2015 -0700
@@ -471,6 +471,27 @@
 
 RET
 
+;-----------------------------------------------------------------------------
+; void interp_4tap_horiz_pp_4x4(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+INIT_XMM sse3
+cglobal interp_4tap_horiz_pp_4x4, 4, 6, 7, src, srcstride, dst, dststride
+mov         r4d,        r4m
+
+%ifdef PIC
+lea         r5,         [tabw_ChromaCoeff]
+movddup     m4,         [r5 + r4 * 8]
+%else
+movddup     m4,         [tabw_ChromaCoeff + r4 * 8]
+%endif
+
+FILTER_H4_w4_2_sse2
+lea         srcq,       [srcq + srcstrideq * 2]
+lea         dstq,       [dstq + dststrideq * 2]
+FILTER_H4_w4_2_sse2
+
+RET
+
 %macro FILTER_H4_w2_2 3
     movh        %2, [srcq - 1]
     pshufb      %2, %2, Tm0
diff -r b1f1c0780d75 -r f476d7556132 source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h	Thu Apr 16 13:06:57 2015 -0700
+++ b/source/common/x86/ipfilter8.h	Thu Apr 16 13:16:21 2015 -0700
@@ -767,6 +767,7 @@
 void x265_interp_4tap_horiz_pp_2x8_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
 void x265_interp_4tap_horiz_pp_2x16_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
 void x265_interp_4tap_horiz_pp_4x2_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
+void x265_interp_4tap_horiz_pp_4x4_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
 #undef LUMA_FILTERS
 #undef LUMA_SP_FILTERS
 #undef LUMA_SS_FILTERS


More information about the x265-devel mailing list