[x265] [PATCH] csp support for blockcopy_ps

praveen at multicorewareinc.com praveen at multicorewareinc.com
Tue Nov 19 14:42:46 CET 2013


# HG changeset patch
# User Praveen Tiwari
# Date 1384868531 -19800
# Node ID 8c402f58e89f4c79b362b768187c3ad656aebc9f
# Parent  a70a22101a122464f26d32f28b29254299b37d68
csp support for blockcopy_ps

diff -r a70a22101a12 -r 8c402f58e89f source/common/pixel.cpp
--- a/source/common/pixel.cpp	Tue Nov 19 18:27:42 2013 +0530
+++ b/source/common/pixel.cpp	Tue Nov 19 19:12:11 2013 +0530
@@ -837,7 +837,7 @@
 #define CHROMA(W, H) \
     p.chroma_copy_pp[CSP_I420][CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
     p.chroma_copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
-    p.chroma_copy_ps[CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>;\
+    p.chroma_copy_ps[CSP_I420][CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H>;\
     p.chroma_sub_ps[CSP_I420][CHROMA_ ## W ## x ## H] = pixel_sub_ps_c<W, H>;
 
 #define LUMA(W, H) \
diff -r a70a22101a12 -r 8c402f58e89f source/common/primitives.h
--- a/source/common/primitives.h	Tue Nov 19 18:27:42 2013 +0530
+++ b/source/common/primitives.h	Tue Nov 19 19:12:11 2013 +0530
@@ -247,7 +247,7 @@
     copy_sp_t       luma_copy_sp[NUM_LUMA_PARTITIONS];
     copy_sp_t       chroma_copy_sp[NUM_CHROMA_PARTITIONS];
     copy_ps_t       luma_copy_ps[NUM_LUMA_PARTITIONS];
-    copy_ps_t       chroma_copy_ps[NUM_CHROMA_PARTITIONS];
+    copy_ps_t       chroma_copy_ps[NUM_CSP][NUM_CHROMA_PARTITIONS];
 
     pixel_sub_ps_t  luma_sub_ps[NUM_LUMA_PARTITIONS];
     pixel_sub_ps_t  chroma_sub_ps[NUM_CSP][NUM_CHROMA_PARTITIONS];
diff -r a70a22101a12 -r 8c402f58e89f source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp	Tue Nov 19 18:27:42 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp	Tue Nov 19 19:12:11 2013 +0530
@@ -140,8 +140,7 @@
     p.chroma_hpp[CHROMA_ ## W ## x ## H] = x265_interp_4tap_horiz_pp_ ## W ## x ## H ## cpu; \
     p.chroma_hps[CHROMA_ ## W ## x ## H] = x265_interp_4tap_horiz_ps_ ## W ## x ## H ## cpu; \
     p.chroma_vpp[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_pp_ ## W ## x ## H ## cpu; \
-    p.chroma_vps[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_ps_ ## W ## x ## H ## cpu; \
-    p.chroma_copy_ps[CHROMA_ ## W ## x ## H] = x265_blockcopy_ps_ ## W ## x ## H ## cpu; 
+    p.chroma_vps[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_ps_ ## W ## x ## H ## cpu;
 
 #define SETUP_CHROMA_SP_FUNC_DEF(W, H, cpu) \
     p.chroma_vsp[CHROMA_ ## W ## x ## H] = x265_interp_4tap_vert_sp_ ## W ## x ## H ## cpu;
diff -r a70a22101a12 -r 8c402f58e89f source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp	Tue Nov 19 18:27:42 2013 +0530
+++ b/source/test/pixelharness.cpp	Tue Nov 19 19:12:11 2013 +0530
@@ -786,12 +786,15 @@
         }
     }
 
-    if (opt.chroma_copy_ps[part])
+    for(int i = 0; i < NUM_CSP; i++)
     {
-        if (!check_block_copy_ps(ref.chroma_copy_ps[part], opt.chroma_copy_ps[part]))
+        if (opt.chroma_copy_ps[i][part])
         {
-            printf("chroma_copy_ps[%s] failed\n", chromaPartStr[part]);
-            return false;
+            if (!check_block_copy_ps(ref.chroma_copy_ps[i][part], opt.chroma_copy_ps[i][part]))
+            {
+                 printf("chroma_copy_ps[%s][%s] failed\n", colorSpaceNames[i], chromaPartStr[part]);
+                 return false;
+            }
         }
     }
 
@@ -1085,10 +1088,13 @@
         REPORT_SPEEDUP(opt.luma_copy_ps[part], ref.luma_copy_ps[part], sbuf1, 64, pbuf1, 128);
     }
 
-    if (opt.chroma_copy_ps[part])
+    for (int i = 0; i < NUM_CSP; i++)
     {
-        printf("ccpy_ps[%s]", chromaPartStr[part]);
-        REPORT_SPEEDUP(opt.chroma_copy_ps[part], ref.chroma_copy_ps[part], sbuf1, 64, pbuf1, 128);
+        if (opt.chroma_copy_ps[i][part])
+        {
+            printf("ccpy_ps[%s][%s]", colorSpaceNames[i], chromaPartStr[part]);
+            REPORT_SPEEDUP(opt.chroma_copy_ps[i][part], ref.chroma_copy_ps[i][part], sbuf1, 64, pbuf1, 128);
+        }
     }
 
     if (opt.luma_sub_ps[part])


More information about the x265-devel mailing list