[x265] [PATCH 3 of 8] asm: interp_4tap_horiz_pp_2x16_sse3

dtyx265 at gmail.com dtyx265 at gmail.com
Fri Apr 17 18:47:59 CEST 2015


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1429287304 25200
# Node ID df614d8d2b7bdfd45748722c91d7d7eaecf5cb57
# Parent  3d43e6ad9a958794a2809fe46e949539c28523ce
asm: interp_4tap_horiz_pp_2x16_sse3

This replaces c code.

64-bit

./test/TestBench --testbench interp | grep "chroma_hpp\[ 2x16\]"
chroma_hpp[ 2x16]	2.35x 	 2122.49  	 4982.88

32-bit

/test/TestBench --testbench interp | grep "chroma_hpp\[ 2x16\]"
chroma_hpp[ 2x16]	2.20x 	 2262.45  	 4985.37

diff -r 3d43e6ad9a95 -r df614d8d2b7b source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 17 09:10:24 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 17 09:15:04 2015 -0700
@@ -1359,6 +1359,7 @@
         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_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;
     }
     if (cpuMask & X265_CPU_SSSE3)
     {
diff -r 3d43e6ad9a95 -r df614d8d2b7b source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm	Fri Apr 17 09:10:24 2015 -0700
+++ b/source/common/x86/ipfilter8.asm	Fri Apr 17 09:15:04 2015 -0700
@@ -388,6 +388,33 @@
 
 RET
 
+;-----------------------------------------------------------------------------
+; void interp_4tap_horiz_pp_2x16(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+INIT_XMM sse3
+cglobal interp_4tap_horiz_pp_2x16, 4, 6, 6, src, srcstride, dst, dststride
+mov         r4d,        r4m
+mova        m5,         [pw_32]
+
+%ifdef PIC
+lea         r5,         [tabw_ChromaCoeff]
+movddup     m4,         [r5 + r4 * 8]
+%else
+movddup     m4,         [tabw_ChromaCoeff + r4 * 8]
+%endif
+
+%assign x 1
+%rep 8
+FILTER_H4_w2_2_sse2
+%if x < 8
+lea         srcq,       [srcq + srcstrideq * 2]
+lea         dstq,       [dstq + dststrideq * 2]
+%endif
+%assign x x+1
+%endrep
+
+RET
+
 %macro FILTER_H4_w2_2 3
     movh        %2, [srcq - 1]
     pshufb      %2, %2, Tm0
diff -r 3d43e6ad9a95 -r df614d8d2b7b source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h	Fri Apr 17 09:10:24 2015 -0700
+++ b/source/common/x86/ipfilter8.h	Fri Apr 17 09:15:04 2015 -0700
@@ -765,6 +765,7 @@
 void x265_filterPixelToShort_24x32_avx2(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride);
 void x265_interp_4tap_horiz_pp_2x4_sse3(const pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx);
 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);
 #undef LUMA_FILTERS
 #undef LUMA_SP_FILTERS
 #undef LUMA_SS_FILTERS


More information about the x265-devel mailing list