[x265] [PATCH] asm: avx2 8bpp code for chroma_p2s[32xN], [24xN], reuse the luma code
rajesh at multicorewareinc.com
rajesh at multicorewareinc.com
Fri Apr 10 07:53:34 CEST 2015
# HG changeset patch
# User Rajesh Paulraj<rajesh at multicorewareinc.com>
# Date 1428644447 -19800
# Fri Apr 10 11:10:47 2015 +0530
# Node ID 8266eb67bfb9a49fd77df39d2c89742de7eb7234
# Parent 3ff907035681742e9c21e73ce287810b3d2c3584
asm: avx2 8bpp code for chroma_p2s[32xN],[24xN], reuse the luma code
diff -r 3ff907035681 -r 8266eb67bfb9 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Fri Apr 10 10:49:34 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp Fri Apr 10 11:10:47 2015 +0530
@@ -2072,6 +2072,17 @@
p.pu[LUMA_48x64].convert_p2s = x265_filterPixelToShort_48x64_avx2;
p.pu[LUMA_24x32].convert_p2s = x265_filterPixelToShort_24x32_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_24x32].p2s = x265_filterPixelToShort_24x32_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x8].p2s = x265_filterPixelToShort_32x8_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x16].p2s = x265_filterPixelToShort_32x16_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x24].p2s = x265_filterPixelToShort_32x24_avx2;
+ p.chroma[X265_CSP_I420].pu[CHROMA_420_32x32].p2s = x265_filterPixelToShort_32x32_avx2;
+ p.chroma[X265_CSP_I422].pu[CHROMA_422_24x64].p2s = x265_filterPixelToShort_24x64_avx2;
+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x16].p2s = x265_filterPixelToShort_32x16_avx2;
+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x32].p2s = x265_filterPixelToShort_32x32_avx2;
+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x48].p2s = x265_filterPixelToShort_32x48_avx2;
+ p.chroma[X265_CSP_I422].pu[CHROMA_422_32x64].p2s = x265_filterPixelToShort_32x64_avx2;
+
if ((cpuMask & X265_CPU_BMI1) && (cpuMask & X265_CPU_BMI2))
p.findPosLast = x265_findPosLast_x64;
}
diff -r 3ff907035681 -r 8266eb67bfb9 source/common/x86/ipfilter8.asm
--- a/source/common/x86/ipfilter8.asm Fri Apr 10 10:49:34 2015 +0530
+++ b/source/common/x86/ipfilter8.asm Fri Apr 10 11:10:47 2015 +0530
@@ -8241,6 +8241,7 @@
P2S_H_32xN_avx2 16
P2S_H_32xN_avx2 24
P2S_H_32xN_avx2 64
+P2S_H_32xN_avx2 48
;-----------------------------------------------------------------------------
; void filterPixelToShort(pixel *src, intptr_t srcStride, int16_t *dst, int16_t dstStride)
diff -r 3ff907035681 -r 8266eb67bfb9 source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h Fri Apr 10 10:49:34 2015 +0530
+++ b/source/common/x86/ipfilter8.h Fri Apr 10 11:10:47 2015 +0530
@@ -598,6 +598,20 @@
SETUP_CHROMA_P2S_FUNC_DEF(24, 64, cpu); \
SETUP_CHROMA_P2S_FUNC_DEF(32, 48, cpu);
+#define CHROMA_420_P2S_FILTERS_AVX2(cpu) \
+ SETUP_CHROMA_P2S_FUNC_DEF(24, 32, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 8, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 16, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 24, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 32, cpu);
+
+#define CHROMA_422_P2S_FILTERS_AVX2(cpu) \
+ SETUP_CHROMA_P2S_FUNC_DEF(24, 64, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 16, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 32, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 48, cpu); \
+ SETUP_CHROMA_P2S_FUNC_DEF(32, 64, cpu);
+
CHROMA_420_FILTERS(_sse4);
CHROMA_420_FILTERS(_avx2);
CHROMA_420_SP_FILTERS(_sse2);
@@ -610,6 +624,7 @@
CHROMA_420_SS_FILTERS_SSE4(_avx2);
CHROMA_420_P2S_FILTERS_SSE4(_sse4);
CHROMA_420_P2S_FILTERS_SSSE3(_ssse3);
+CHROMA_420_P2S_FILTERS_AVX2(_avx2);
CHROMA_422_FILTERS(_sse4);
CHROMA_422_FILTERS(_avx2);
@@ -619,6 +634,7 @@
CHROMA_422_SS_FILTERS_SSE4(_sse4);
CHROMA_422_P2S_FILTERS_SSE4(_sse4);
CHROMA_422_P2S_FILTERS_SSSE3(_ssse3);
+CHROMA_422_P2S_FILTERS_AVX2(_avx2);
CHROMA_444_FILTERS(_sse4);
CHROMA_444_SP_FILTERS(_sse4);
More information about the x265-devel
mailing list