[x265] [PATCH] csp support for blockcopy_sp
praveen at multicorewareinc.com
praveen at multicorewareinc.com
Tue Nov 19 15:59:42 CET 2013
# HG changeset patch
# User Praveen Tiwari
# Date 1384873169 -19800
# Node ID 7b50f202dc9dc07399c722c5f5dac88299974083
# Parent 3354bed68a35e8e7af5c66bd13cffc574228246f
csp support for blockcopy_sp
diff -r 3354bed68a35 -r 7b50f202dc9d source/common/pixel.cpp
--- a/source/common/pixel.cpp Tue Nov 19 19:32:00 2013 +0530
+++ b/source/common/pixel.cpp Tue Nov 19 20:29:29 2013 +0530
@@ -836,7 +836,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_sp[CSP_I420][CHROMA_ ## W ## x ## H] = blockcopy_sp_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>;
diff -r 3354bed68a35 -r 7b50f202dc9d source/common/primitives.h
--- a/source/common/primitives.h Tue Nov 19 19:32:00 2013 +0530
+++ b/source/common/primitives.h Tue Nov 19 20:29:29 2013 +0530
@@ -245,7 +245,7 @@
copy_pp_t luma_copy_pp[NUM_LUMA_PARTITIONS];
copy_pp_t chroma_copy_pp[NUM_CSP][NUM_CHROMA_PARTITIONS];
copy_sp_t luma_copy_sp[NUM_LUMA_PARTITIONS];
- copy_sp_t chroma_copy_sp[NUM_CHROMA_PARTITIONS];
+ copy_sp_t chroma_copy_sp[NUM_CSP][NUM_CHROMA_PARTITIONS];
copy_ps_t luma_copy_ps[NUM_LUMA_PARTITIONS];
copy_ps_t chroma_copy_ps[NUM_CSP][NUM_CHROMA_PARTITIONS];
diff -r 3354bed68a35 -r 7b50f202dc9d source/common/x86/asm-primitives.cpp
--- a/source/common/x86/asm-primitives.cpp Tue Nov 19 19:32:00 2013 +0530
+++ b/source/common/x86/asm-primitives.cpp Tue Nov 19 20:29:29 2013 +0530
@@ -500,27 +500,27 @@
// until all partitions are coded and commit smaller patches, easier to
// review.
- p.chroma_copy_sp[CHROMA_4x2] = x265_blockcopy_sp_4x2_sse2;
- p.chroma_copy_sp[CHROMA_4x4] = x265_blockcopy_sp_4x4_sse2;
- p.chroma_copy_sp[CHROMA_4x8] = x265_blockcopy_sp_4x8_sse2;
- p.chroma_copy_sp[CHROMA_4x16] = x265_blockcopy_sp_4x16_sse2;
- p.chroma_copy_sp[CHROMA_8x2] = x265_blockcopy_sp_8x2_sse2;
- p.chroma_copy_sp[CHROMA_8x4] = x265_blockcopy_sp_8x4_sse2;
- p.chroma_copy_sp[CHROMA_8x6] = x265_blockcopy_sp_8x6_sse2;
- p.chroma_copy_sp[CHROMA_8x8] = x265_blockcopy_sp_8x8_sse2;
- p.chroma_copy_sp[CHROMA_8x16] = x265_blockcopy_sp_8x16_sse2;
- p.chroma_copy_sp[CHROMA_12x16] = x265_blockcopy_sp_12x16_sse2;
- p.chroma_copy_sp[CHROMA_16x4] = x265_blockcopy_sp_16x4_sse2;
- p.chroma_copy_sp[CHROMA_16x8] = x265_blockcopy_sp_16x8_sse2;
- p.chroma_copy_sp[CHROMA_16x12] = x265_blockcopy_sp_16x12_sse2;
- p.chroma_copy_sp[CHROMA_16x16] = x265_blockcopy_sp_16x16_sse2;
- p.chroma_copy_sp[CHROMA_16x32] = x265_blockcopy_sp_16x32_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_4x2] = x265_blockcopy_sp_4x2_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_4x4] = x265_blockcopy_sp_4x4_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_4x8] = x265_blockcopy_sp_4x8_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_4x16] = x265_blockcopy_sp_4x16_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_8x2] = x265_blockcopy_sp_8x2_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_8x4] = x265_blockcopy_sp_8x4_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_8x6] = x265_blockcopy_sp_8x6_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_8x8] = x265_blockcopy_sp_8x8_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_8x16] = x265_blockcopy_sp_8x16_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_12x16] = x265_blockcopy_sp_12x16_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_16x4] = x265_blockcopy_sp_16x4_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_16x8] = x265_blockcopy_sp_16x8_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_16x12] = x265_blockcopy_sp_16x12_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_16x16] = x265_blockcopy_sp_16x16_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_16x32] = x265_blockcopy_sp_16x32_sse2;
p.luma_copy_sp[LUMA_16x64] = x265_blockcopy_sp_16x64_sse2;
- p.chroma_copy_sp[CHROMA_24x32] = x265_blockcopy_sp_24x32_sse2;
- p.chroma_copy_sp[CHROMA_32x8] = x265_blockcopy_sp_32x8_sse2;
- p.chroma_copy_sp[CHROMA_32x16] = x265_blockcopy_sp_32x16_sse2;
- p.chroma_copy_sp[CHROMA_32x24] = x265_blockcopy_sp_32x24_sse2;
- p.chroma_copy_sp[CHROMA_32x32] = x265_blockcopy_sp_32x32_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_24x32] = x265_blockcopy_sp_24x32_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_32x8] = x265_blockcopy_sp_32x8_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_32x16] = x265_blockcopy_sp_32x16_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_32x24] = x265_blockcopy_sp_32x24_sse2;
+ p.chroma_copy_sp[CSP_I420][CHROMA_32x32] = x265_blockcopy_sp_32x32_sse2;
p.luma_copy_sp[LUMA_32x64] = x265_blockcopy_sp_32x64_sse2;
p.luma_copy_sp[LUMA_48x64] = x265_blockcopy_sp_48x64_sse2;
p.luma_copy_sp[LUMA_64x16] = x265_blockcopy_sp_64x16_sse2;
@@ -620,9 +620,9 @@
CHROMA_FILTERS(_sse4);
LUMA_FILTERS(_sse4);
HEVC_SATD(sse4);
- p.chroma_copy_sp[CHROMA_2x4] = x265_blockcopy_sp_2x4_sse4;
- p.chroma_copy_sp[CHROMA_2x8] = x265_blockcopy_sp_2x8_sse4;
- p.chroma_copy_sp[CHROMA_6x8] = x265_blockcopy_sp_6x8_sse4;
+ p.chroma_copy_sp[CSP_I420][CHROMA_2x4] = x265_blockcopy_sp_2x4_sse4;
+ p.chroma_copy_sp[CSP_I420][CHROMA_2x8] = x265_blockcopy_sp_2x8_sse4;
+ p.chroma_copy_sp[CSP_I420][CHROMA_6x8] = x265_blockcopy_sp_6x8_sse4;
p.chroma_vsp[CHROMA_2x4] = x265_interp_4tap_vert_sp_2x4_sse4;
p.chroma_vsp[CHROMA_2x8] = x265_interp_4tap_vert_sp_2x8_sse4;
diff -r 3354bed68a35 -r 7b50f202dc9d source/test/pixelharness.cpp
--- a/source/test/pixelharness.cpp Tue Nov 19 19:32:00 2013 +0530
+++ b/source/test/pixelharness.cpp Tue Nov 19 20:29:29 2013 +0530
@@ -768,12 +768,15 @@
}
}
- if (opt.chroma_copy_sp[part])
+ for(int i = 0; i < NUM_CSP; i++)
{
- if (!check_block_copy_sp(ref.chroma_copy_sp[part], opt.chroma_copy_sp[part]))
+ if (opt.chroma_copy_sp[i][part])
{
- printf("chroma_copy_sp[%s] failed\n", chromaPartStr[part]);
- return false;
+ if (!check_block_copy_sp(ref.chroma_copy_sp[i][part], opt.chroma_copy_sp[i][part]))
+ {
+ printf("chroma_copy_sp[%s][%s] failed\n", colorSpaceNames[i], chromaPartStr[part]);
+ return false;
+ }
}
}
@@ -1076,10 +1079,13 @@
REPORT_SPEEDUP(opt.luma_copy_sp[part], ref.luma_copy_sp[part], pbuf1, 64, sbuf3, 128);
}
- if (opt.chroma_copy_sp[part])
+ for (int i = 0; i < NUM_CSP; i++)
{
- printf("ccpy_sp[%s]", chromaPartStr[part]);
- REPORT_SPEEDUP(opt.chroma_copy_sp[part], ref.chroma_copy_sp[part], pbuf1, 64, sbuf3, 128);
+ if (opt.chroma_copy_sp[i][part])
+ {
+ printf("ccpy_sp[%s][%s]", colorSpaceNames[i], chromaPartStr[part]);
+ REPORT_SPEEDUP(opt.chroma_copy_sp[i][part], ref.chroma_copy_sp[i][part], pbuf1, 64, sbuf3, 128);
+ }
}
if (opt.luma_copy_ps[part])
More information about the x265-devel
mailing list