[x265] [PATCH] 16bpp: assembly code for pixelavg_pp

dnyaneshwar at multicorewareinc.com dnyaneshwar at multicorewareinc.com
Mon Dec 2 09:08:29 CET 2013


# HG changeset patch
# User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
# Date 1385969704 -19800
#      Mon Dec 02 13:05:04 2013 +0530
# Node ID 2b0753d97e2e73155d642b6b6e97ff441eb15b5f
# Parent  0a85121531fcff9cef495ccc51b4fd6f6006ed1f
16bpp: assembly code for pixelavg_pp

diff -r 0a85121531fc -r 2b0753d97e2e source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Mon Dec 02 01:04:33 2013 -0600
+++ b/source/common/x86/asm-primitives.cpp	Mon Dec 02 13:05:04 2013 +0530
@@ -143,6 +143,7 @@
 #define PIXEL_AVG(cpu) \
     p.pixelavg_pp[LUMA_64x64] = x265_pixel_avg_64x64_ ## cpu; \
     p.pixelavg_pp[LUMA_64x48] = x265_pixel_avg_64x48_ ## cpu; \
+    p.pixelavg_pp[LUMA_64x32] = x265_pixel_avg_64x32_ ## cpu; \
     p.pixelavg_pp[LUMA_64x16] = x265_pixel_avg_64x16_ ## cpu; \
     p.pixelavg_pp[LUMA_48x64] = x265_pixel_avg_48x64_ ## cpu; \
     p.pixelavg_pp[LUMA_32x64] = x265_pixel_avg_32x64_ ## cpu; \
@@ -509,12 +510,8 @@
         p.sse_ss[LUMA_16x16] = x265_pixel_ssd_ss_16x16_sse2;
 
         p.ssim_4x4x2_core = x265_pixel_ssim_4x4x2_core_sse2;
-        PIXEL_AVG_W4(sse2);
-        p.pixelavg_pp[LUMA_8x16]  = x265_pixel_avg_8x16_sse2;
-        p.pixelavg_pp[LUMA_8x8]   = x265_pixel_avg_8x8_sse2;
-        p.pixelavg_pp[LUMA_8x4]   = x265_pixel_avg_8x4_sse2;
-        p.pixelavg_pp[LUMA_16x16] = x265_pixel_avg_16x16_sse2;
-        p.pixelavg_pp[LUMA_16x8]  = x265_pixel_avg_16x8_sse2;
+        PIXEL_AVG(sse2);
+        PIXEL_AVG_W4(mmx2);
         LUMA_VAR(_sse2);
     }
     if (cpuMask & X265_CPU_SSSE3)
diff -r 0a85121531fc -r 2b0753d97e2e source/common/x86/mc-a.asm
--- a/source/common/x86/mc-a.asm	Mon Dec 02 01:04:33 2013 -0600
+++ b/source/common/x86/mc-a.asm	Mon Dec 02 13:05:04 2013 +0530
@@ -255,7 +255,12 @@
 INIT_XMM sse2
 AVG_WEIGHT 4,  8
 AVG_WEIGHT 8,  8
+AVG_WEIGHT 12, 8
 AVG_WEIGHT 16, 8
+AVG_WEIGHT 24, 8
+AVG_WEIGHT 32, 8
+AVG_WEIGHT 48, 8
+AVG_WEIGHT 64, 8
 %else ;!HIGH_BIT_DEPTH
 INIT_XMM sse2
 AVG_WEIGHT 8,  7
@@ -707,13 +712,39 @@
 AVGH 4, 2
 
 AVG_FUNC 8, movq, movq
+AVGH 8, 32
 AVGH 8, 16
 AVGH 8,  8
 AVGH 8,  4
 
 AVG_FUNC 16, movq, movq
+AVGH 16, 64
+AVGH 16, 32
 AVGH 16, 16
+AVGH 16, 12
 AVGH 16,  8
+AVGH 16,  4
+
+AVG_FUNC 24, movq, movq
+AVGH 24, 32
+
+AVG_FUNC 32, movq, movq
+AVGH 32, 32
+AVGH 32, 24
+AVGH 32, 16
+AVGH 32, 8
+
+AVG_FUNC 48, movq, movq
+AVGH 48, 64
+
+AVG_FUNC 64, movq, movq
+AVGH 64, 64
+AVGH 64, 48
+AVGH 64, 32
+AVGH 64, 16
+
+AVG_FUNC 12, movq, movq, movq
+AVGH 12, 16
 
 INIT_XMM sse2
 AVG_FUNC 4, movq, movq
@@ -723,13 +754,40 @@
 AVGH  4, 2
 
 AVG_FUNC 8, movdqu, movdqa
+AVGH 8, 32
 AVGH  8, 16
 AVGH  8,  8
 AVGH  8,  4
 
 AVG_FUNC 16, movdqu, movdqa
+AVGH  16, 64
+AVGH  16, 32
 AVGH  16, 16
+AVGH  16, 12
 AVGH  16,  8
+AVGH  16,  4
+
+AVG_FUNC 24, movdqu, movdqa
+AVGH 24, 32
+
+AVG_FUNC 32, movdqu, movdqa
+AVGH 32, 64
+AVGH 32, 32
+AVGH 32, 24
+AVGH 32, 16
+AVGH 32, 8
+
+AVG_FUNC 48, movdqu, movdqa
+AVGH 48, 64
+
+AVG_FUNC 64, movdqu, movdqa
+AVGH 64, 64
+AVGH 64, 48
+AVGH 64, 32
+AVGH 64, 16
+
+AVG_FUNC 12, movdqu, movdqa, movq
+AVGH 12, 16
 
 %else ;!HIGH_BIT_DEPTH
 
diff -r 0a85121531fc -r 2b0753d97e2e source/common/x86/pixel.h
--- a/source/common/x86/pixel.h	Mon Dec 02 01:04:33 2013 -0600
+++ b/source/common/x86/pixel.h	Mon Dec 02 13:05:04 2013 +0530
@@ -251,6 +251,7 @@
     void func ## _ssse3 args;
 DECL_SUF(x265_pixel_avg_64x64, (pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t, int))
 DECL_SUF(x265_pixel_avg_64x48, (pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t, int))
+DECL_SUF(x265_pixel_avg_64x32, (pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t, int))
 DECL_SUF(x265_pixel_avg_64x16, (pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t, int))
 DECL_SUF(x265_pixel_avg_48x64, (pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t, int))
 DECL_SUF(x265_pixel_avg_32x64, (pixel *, intptr_t, pixel *, intptr_t, pixel *, intptr_t, int))


More information about the x265-devel mailing list