[x265] [PATCH 2 of 8] asm: interp_4tap_horiz_pp_2x8_sse3
dtyx265 at gmail.com
dtyx265 at gmail.com
Fri Apr 17 18:47:58 CEST 2015
# HG changeset patch
# User David T Yuen <dtyx265 at gmail.com>
# Date 1429287024 25200
# Node ID 3d43e6ad9a958794a2809fe46e949539c28523ce
# Parent 34b0ec5fbc8695afd640821f8a9aba0e30a4253a
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.83x 1104.89 2026.66
chroma_hpp[ 2x8] 1.84x 1102.43 2025.46
32-bit
./test/TestBench --testbench interp | grep "chroma_hpp\[ 2x8\]"
chroma_hpp[ 2x8] 1.93x 1252.42 2419.18
chroma_hpp[ 2x8] 1.93x 1252.46 2417.46
diff -r 34b0ec5fbc86 -r 3d43e6ad9a95 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Fri Apr 17 09:04:59 2015 -0700
+++ b/source/common/x86/asm-primitives.cpp Fri Apr 17 09:10:24 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 34b0ec5fbc86 -r 3d43e6ad9a95 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Fri Apr 17 09:04:59 2015 -0700
+++ b/source/common/x86/ipfilter8.asm Fri Apr 17 09:10:24 2015 -0700
@@ -361,6 +361,33 @@
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, 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 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 34b0ec5fbc86 -r 3d43e6ad9a95 source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h Fri Apr 17 09:04:59 2015 -0700
+++ b/source/common/x86/ipfilter8.h Fri Apr 17 09:10:24 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