[x265] [PATCH 2 of 8] asm: interp_4tap_horiz_pp_2x8_sse3

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


# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1429213579 25200
# Node ID a7e6c63f0ee15389340855f7b1c42eb14c6ae195
# Parent  080522d961cc55becc26dfd192e028a8782087eb
asm: interp_4tap_horiz_pp_2x8_sse3

This replaces c code.

64-bit

./test/TestBench --testbench interp | grep "chroma_hpp\[  2x8\]"
chroma_hpp[  2x8]	1.85x 	 1092.42  	 2024.98
chroma_hpp[  2x8]	1.85x 	 1092.44  	 2024.95

32-bit

./test/TestBench --testbench interp | grep "chroma_hpp\[  2x8\]"
chroma_hpp[  2x8]	2.02x 	 1209.99  	 2447.48
chroma_hpp[  2x8]	2.01x 	 1214.98  	 2447.42

diff -r 080522d961cc -r a7e6c63f0ee1 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Thu Apr 16 12:26:23 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp	Thu Apr 16 12:46:19 2015 -0700
@@ -1357,6 +1357,8 @@
     if (cpuMask & X265_CPU_SSE3)
     {
         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;
     }
     if (cpuMask & X265_CPU_SSSE3)
     {
diff -r 080522d961cc -r a7e6c63f0ee1 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm	Thu Apr 16 12:26:23 2015 -0700
+++ b/source/common/x86/ipfilter8.asm	Thu Apr 16 12:46:19 2015 -0700
@@ -360,6 +360,32 @@
 
 RET
 
+;-----------------------------------------------------------------------------
+; void interp_4tap_horiz_pp_2x8(pixel *src, intptr_t srcStride, pixel *dst, intptr_t dstStride, int coeffIdx)
+;-----------------------------------------------------------------------------
+INIT_XMM sse3
+cglobal interp_4tap_horiz_pp_2x8, 4, 6, 5, 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
+
+%assign x 1
+%rep 4
+FILTER_H4_w2_2_sse2
+%if x < 4
+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 080522d961cc -r a7e6c63f0ee1 source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h	Thu Apr 16 12:26:23 2015 -0700
+++ b/source/common/x86/ipfilter8.h	Thu Apr 16 12:46:19 2015 -0700
@@ -764,6 +764,7 @@
 void x265_filterPixelToShort_48x64_avx2(const pixel* src, intptr_t srcStride, int16_t* dst, intptr_t dstStride);
 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);
 #undef LUMA_FILTERS
 #undef LUMA_SP_FILTERS
 #undef LUMA_SS_FILTERS


More information about the x265-devel mailing list