[x265] [PATCH] asm: avx2 10bit code for chroma_p2s[16xN], [24xN], [32xN], reuse luma code

rajesh at multicorewareinc.com rajesh at multicorewareinc.com
Fri Apr 17 12:33:40 CEST 2015


# HG changeset patch
# User Rajesh Paulraj<rajesh at multicorewareinc.com>
# Date 1429266115 -19800
#      Fri Apr 17 15:51:55 2015 +0530
# Node ID d299770bebb21f7e1b9603b150087d38fdbf3f68
# Parent  d967fc6a12dcfb2984172d5fadb1f06148ab4eef
asm: avx2 10bit code for chroma_p2s[16xN],[24xN],[32xN], reuse luma code

diff -r d967fc6a12dc -r d299770bebb2 source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Fri Apr 17 11:19:20 2015 +0530
+++ b/source/common/x86/asm-primitives.cpp	Fri Apr 17 15:51:55 2015 +0530
@@ -1241,6 +1241,27 @@
         p.pu[LUMA_64x64].convert_p2s = x265_filterPixelToShort_64x64_avx2;
         p.pu[LUMA_24x32].convert_p2s = x265_filterPixelToShort_24x32_avx2;
         p.pu[LUMA_48x64].convert_p2s = x265_filterPixelToShort_48x64_avx2;
+
+        p.chroma[X265_CSP_I420].pu[CHROMA_420_16x4].p2s = x265_filterPixelToShort_16x4_avx2;
+        p.chroma[X265_CSP_I420].pu[CHROMA_420_16x8].p2s = x265_filterPixelToShort_16x8_avx2;
+        p.chroma[X265_CSP_I420].pu[CHROMA_420_16x12].p2s = x265_filterPixelToShort_16x12_avx2;
+        p.chroma[X265_CSP_I420].pu[CHROMA_420_16x16].p2s = x265_filterPixelToShort_16x16_avx2;
+        p.chroma[X265_CSP_I420].pu[CHROMA_420_16x32].p2s = x265_filterPixelToShort_16x32_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_16x8].p2s = x265_filterPixelToShort_16x8_avx2;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_16x16].p2s = x265_filterPixelToShort_16x16_avx2;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_16x24].p2s = x265_filterPixelToShort_16x24_avx2;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_16x32].p2s = x265_filterPixelToShort_16x32_avx2;
+        p.chroma[X265_CSP_I422].pu[CHROMA_422_16x64].p2s = x265_filterPixelToShort_16x64_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;
     }
 }
 #else // if HIGH_BIT_DEPTH
diff -r d967fc6a12dc -r d299770bebb2 source/common/x86/ipfilter8.h
--- a/source/common/x86/ipfilter8.h	Fri Apr 17 11:19:20 2015 +0530
+++ b/source/common/x86/ipfilter8.h	Fri Apr 17 15:51:55 2015 +0530
@@ -360,17 +360,43 @@
     SETUP_CHROMA_P2S_FUNC_DEF(2, 16, cpu) \
     SETUP_CHROMA_P2S_FUNC_DEF(6, 16, cpu);
 
+#define CHROMA_420_P2S_FILTERS_AVX2(cpu) \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 4, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 8, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 12, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 16, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 32, 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(16, 8, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 16, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 24, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 32, cpu); \
+    SETUP_CHROMA_P2S_FUNC_DEF(16, 64, 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_VERT_FILTERS(_sse2);
 CHROMA_420_HORIZ_FILTERS(_sse4);
 CHROMA_420_VERT_FILTERS_SSE4(_sse4);
 CHROMA_420_P2S_FILTERS_SSSE3(_ssse3);
 CHROMA_420_P2S_FILTERS_SSE4(_sse4);
+CHROMA_420_P2S_FILTERS_AVX2(_avx2);
 
 CHROMA_422_VERT_FILTERS(_sse2);
 CHROMA_422_HORIZ_FILTERS(_sse4);
 CHROMA_422_VERT_FILTERS_SSE4(_sse4);
 CHROMA_422_P2S_FILTERS_SSE4(_sse4);
 CHROMA_422_P2S_FILTERS_SSSE3(_ssse3);
+CHROMA_422_P2S_FILTERS_AVX2(_avx2);
 
 CHROMA_444_VERT_FILTERS(_sse2);
 CHROMA_444_HORIZ_FILTERS(_sse4);


More information about the x265-devel mailing list