[x265] [PATCH] fix compile warning in pixel.cpp for 422 primitive setup
ashok at multicorewareinc.com
ashok at multicorewareinc.com
Wed Apr 16 14:14:41 CEST 2014
# HG changeset patch
# User Ashok Kumar Mishra<ashok at multicorewareinc.com>
# Date 1397649973 -19800
# Wed Apr 16 17:36:13 2014 +0530
# Node ID 24e8bac645a311067176d5bdadd21801a4f5aef5
# Parent 0b696c7f46f261f66ecebbe3280b17c01165f3d0
fix compile warning in pixel.cpp for 422 primitive setup
diff -r 0b696c7f46f2 -r 24e8bac645a3 source/Lib/TLibCommon/TComYuv.cpp
--- a/source/Lib/TLibCommon/TComYuv.cpp Tue Apr 15 14:07:33 2014 -0500
+++ b/source/Lib/TLibCommon/TComYuv.cpp Wed Apr 16 17:36:13 2014 +0530
@@ -201,7 +201,7 @@
void TComYuv::copyPartToPartChroma(ShortYuv* dstPicYuv, uint32_t partIdx, uint32_t lumaSize, uint32_t chromaId, const bool splitIntoSubTUs)
{
- int part = splitIntoSubTUs ? NUM_CHROMA_PARTITIONS : partitionFromSizes(lumaSize, lumaSize);
+ int part = splitIntoSubTUs ? NUM_CHROMA_PARTITIONS422 : partitionFromSizes(lumaSize, lumaSize);
assert(lumaSize != 4);
diff -r 0b696c7f46f2 -r 24e8bac645a3 source/common/ipfilter.cpp
--- a/source/common/ipfilter.cpp Tue Apr 15 14:07:33 2014 -0500
+++ b/source/common/ipfilter.cpp Wed Apr 16 17:36:13 2014 +0530
@@ -381,20 +381,12 @@
p.chroma[X265_CSP_I420].filter_vss[CHROMA_ ## W ## x ## H] = interp_vert_ss_c<4, W, H>;
#define CHROMA_422(W, H) \
- p.chroma[X265_CSP_I422].filter_hpp[CHROMA_ ## W ## x ## H] = interp_horiz_pp_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_hps[CHROMA_ ## W ## x ## H] = interp_horiz_ps_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vpp[CHROMA_ ## W ## x ## H] = interp_vert_pp_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vps[CHROMA_ ## W ## x ## H] = interp_vert_ps_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vsp[CHROMA_ ## W ## x ## H] = interp_vert_sp_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vss[CHROMA_ ## W ## x ## H] = interp_vert_ss_c<4, W, H * 2>;
-
-#define CHROMA_422_X(W, H) \
- p.chroma[X265_CSP_I422].filter_hpp[0] = interp_horiz_pp_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_hps[0] = interp_horiz_ps_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vpp[0] = interp_vert_pp_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vps[0] = interp_vert_ps_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vsp[0] = interp_vert_sp_c<4, W, H * 2>; \
- p.chroma[X265_CSP_I422].filter_vss[0] = interp_vert_ss_c<4, W, H * 2>;
+ p.chroma[X265_CSP_I422].filter_hpp[CHROMA422_ ## W ## x ## H] = interp_horiz_pp_c<4, W, H>; \
+ p.chroma[X265_CSP_I422].filter_hps[CHROMA422_ ## W ## x ## H] = interp_horiz_ps_c<4, W, H>; \
+ p.chroma[X265_CSP_I422].filter_vpp[CHROMA422_ ## W ## x ## H] = interp_vert_pp_c<4, W, H>; \
+ p.chroma[X265_CSP_I422].filter_vps[CHROMA422_ ## W ## x ## H] = interp_vert_ps_c<4, W, H>; \
+ p.chroma[X265_CSP_I422].filter_vsp[CHROMA422_ ## W ## x ## H] = interp_vert_sp_c<4, W, H>; \
+ p.chroma[X265_CSP_I422].filter_vss[CHROMA422_ ## W ## x ## H] = interp_vert_ss_c<4, W, H>;
#define CHROMA_444(W, H) \
p.chroma[X265_CSP_I444].filter_hpp[LUMA_ ## W ## x ## H] = interp_horiz_pp_c<4, W, H>; \
@@ -465,31 +457,30 @@
LUMA(16, 64);
CHROMA_420(8, 32);
- CHROMA_422_X(4, 4);
+ CHROMA_422(4, 8);
CHROMA_422(4, 4);
- CHROMA_422(2, 4);
- CHROMA_422(4, 2);
+ CHROMA_422(2, 8);
+ CHROMA_422(8, 16);
CHROMA_422(8, 8);
+ CHROMA_422(4, 16);
+ CHROMA_422(8, 12);
+ CHROMA_422(6, 16);
CHROMA_422(8, 4);
- CHROMA_422(4, 8);
- CHROMA_422(8, 6);
- CHROMA_422(6, 8);
- CHROMA_422(8, 2);
- CHROMA_422(2, 8);
+ CHROMA_422(2, 16);
+ CHROMA_422(16, 32);
CHROMA_422(16, 16);
+ CHROMA_422(8, 32);
+ CHROMA_422(16, 24);
+ CHROMA_422(12, 32);
CHROMA_422(16, 8);
- CHROMA_422(8, 16);
- CHROMA_422(16, 12);
- CHROMA_422(12, 16);
- CHROMA_422(16, 4);
- CHROMA_422(4, 16);
+ CHROMA_422(4, 32);
+ CHROMA_422(32, 64);
CHROMA_422(32, 32);
+ CHROMA_422(16, 64);
+ CHROMA_422(32, 48);
+ CHROMA_422(24, 64);
CHROMA_422(32, 16);
- CHROMA_422(16, 32);
- CHROMA_422(32, 24);
- CHROMA_422(24, 32);
- CHROMA_422(32, 8);
- CHROMA_422(8, 32);
+ CHROMA_422(8, 64);
CHROMA_444(4, 4);
CHROMA_444(8, 8);
diff -r 0b696c7f46f2 -r 24e8bac645a3 source/common/pixel.cpp
--- a/source/common/pixel.cpp Tue Apr 15 14:07:33 2014 -0500
+++ b/source/common/pixel.cpp Wed Apr 16 17:36:13 2014 +0530
@@ -938,20 +938,22 @@
p.chroma[X265_CSP_I420].add_ps[CHROMA_ ## W ## x ## H] = pixel_add_ps_c<W, H>;
#define CHROMA_422(W, H) \
- p.chroma[X265_CSP_I422].addAvg[CHROMA_ ## W ## x ## H] = addAvg<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_pp[CHROMA_ ## W ## x ## H] = blockcopy_pp_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_sp[CHROMA_ ## W ## x ## H] = blockcopy_sp_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_ps[CHROMA_ ## W ## x ## H] = blockcopy_ps_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_ss[CHROMA_ ## W ## x ## H] = blockcopy_ss_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].sub_ps[CHROMA_ ## W ## x ## H] = pixel_sub_ps_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].add_ps[CHROMA_ ## W ## x ## H] = pixel_add_ps_c<W, H * 2>;
+ p.chroma[X265_CSP_I422].addAvg [CHROMA422_ ## W ## x ## H] = addAvg<W, H>; \
+ p.chroma[X265_CSP_I422].copy_pp[CHROMA422_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_sp[CHROMA422_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_ps[CHROMA422_ ## W ## x ## H] = blockcopy_ps_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_ss[CHROMA422_ ## W ## x ## H] = blockcopy_ss_c<W, H>; \
+ p.chroma[X265_CSP_I422].sub_ps [CHROMA422_ ## W ## x ## H] = pixel_sub_ps_c<W, H>; \
+ p.chroma[X265_CSP_I422].add_ps [CHROMA422_ ## W ## x ## H] = pixel_add_ps_c<W, H>;
#define CHROMA_422_X(W, H) \
- p.chroma[X265_CSP_I422].addAvg[0] = addAvg<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_pp[0] = blockcopy_pp_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_sp[0] = blockcopy_sp_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_ps[0] = blockcopy_ps_c<W, H * 2>; \
- p.chroma[X265_CSP_I422].copy_ss[0] = blockcopy_ss_c<W, H * 2>;
+ p.chroma[X265_CSP_I422].addAvg [CHROMA422X_ ## W ## x ## H] = addAvg<W, H>; \
+ p.chroma[X265_CSP_I422].copy_pp[CHROMA422X_ ## W ## x ## H] = blockcopy_pp_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_sp[CHROMA422X_ ## W ## x ## H] = blockcopy_sp_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_ps[CHROMA422X_ ## W ## x ## H] = blockcopy_ps_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_ss[CHROMA422X_ ## W ## x ## H] = blockcopy_ss_c<W, H>; \
+ p.chroma[X265_CSP_I422].copy_sp[NUM_CHROMA_PARTITIONS422] = blockcopy_sp_c<W, (H >> 1)>; \
+ p.chroma[X265_CSP_I422].copy_ps[NUM_CHROMA_PARTITIONS422] = blockcopy_ps_c<W, (H >> 1)>;
#define CHROMA_444(W, H) \
p.chroma[X265_CSP_I444].addAvg[LUMA_ ## W ## x ## H] = addAvg<W, H>; \
@@ -1021,31 +1023,31 @@
LUMA(16, 64);
CHROMA_420(8, 32);
- CHROMA_422_X(4, 4);
+ CHROMA_422_X(4, 8);
+ CHROMA_422(4, 8);
CHROMA_422(4, 4);
- CHROMA_422(4, 2);
- CHROMA_422(2, 4);
+ CHROMA_422(2, 8);
+ CHROMA_422(8, 16);
CHROMA_422(8, 8);
+ CHROMA_422(4, 16);
+ CHROMA_422(8, 12);
+ CHROMA_422(6, 16);
CHROMA_422(8, 4);
- CHROMA_422(4, 8);
- CHROMA_422(8, 6);
- CHROMA_422(6, 8);
- CHROMA_422(8, 2);
- CHROMA_422(2, 8);
+ CHROMA_422(2, 16);
+ CHROMA_422(16, 32);
CHROMA_422(16, 16);
+ CHROMA_422(8, 32);
+ CHROMA_422(16, 24);
+ CHROMA_422(12, 32);
CHROMA_422(16, 8);
- CHROMA_422(8, 16);
- CHROMA_422(16, 12);
- CHROMA_422(12, 16);
- CHROMA_422(16, 4);
- CHROMA_422(4, 16);
+ CHROMA_422(4, 32);
+ CHROMA_422(32, 64);
CHROMA_422(32, 32);
+ CHROMA_422(16, 64);
+ CHROMA_422(32, 48);
+ CHROMA_422(24, 64);
CHROMA_422(32, 16);
- CHROMA_422(16, 32);
- CHROMA_422(32, 24);
- CHROMA_422(24, 32);
- CHROMA_422(32, 8);
- CHROMA_422(8, 32);
+ CHROMA_422(8, 64);
CHROMA_444(4, 4);
CHROMA_444(8, 8);
diff -r 0b696c7f46f2 -r 24e8bac645a3 source/common/primitives.h
--- a/source/common/primitives.h Tue Apr 15 14:07:33 2014 -0500
+++ b/source/common/primitives.h Wed Apr 16 17:36:13 2014 +0530
@@ -58,6 +58,17 @@
NUM_CHROMA_PARTITIONS
};
+enum Chroma422Partitions
+{
+ CHROMA422X_4x8,
+ CHROMA422_4x8, CHROMA422_4x4, CHROMA422_2x8,
+ CHROMA422_8x16, CHROMA422_8x8, CHROMA422_4x16, CHROMA422_8x12, CHROMA422_6x16, CHROMA422_8x4, CHROMA422_2x16,
+ CHROMA422_16x32, CHROMA422_16x16, CHROMA422_8x32, CHROMA422_16x24, CHROMA422_12x32, CHROMA422_16x8, CHROMA422_4x32,
+ CHROMA422_32x64, CHROMA422_32x32, CHROMA422_16x64, CHROMA422_32x48, CHROMA422_24x64, CHROMA422_32x16, CHROMA422_8x64,
+ NUM_CHROMA_PARTITIONS422
+};
+
+
enum SquareBlocks // Routines can be indexed using log2n(width)-2
{
BLOCK_4x4,
@@ -245,8 +256,8 @@
filter_pp_t filter_hpp[NUM_LUMA_PARTITIONS];
filter_hps_t filter_hps[NUM_LUMA_PARTITIONS];
copy_pp_t copy_pp[NUM_LUMA_PARTITIONS];
- copy_sp_t copy_sp[NUM_LUMA_PARTITIONS];
- copy_ps_t copy_ps[NUM_LUMA_PARTITIONS];
+ copy_sp_t copy_sp[NUM_LUMA_PARTITIONS + 1];
+ copy_ps_t copy_ps[NUM_LUMA_PARTITIONS + 1];
copy_ss_t copy_ss[NUM_LUMA_PARTITIONS];
pixel_sub_ps_t sub_ps[NUM_LUMA_PARTITIONS];
pixel_add_ps_t add_ps[NUM_LUMA_PARTITIONS];
diff -r 0b696c7f46f2 -r 24e8bac645a3 source/common/shortyuv.cpp
--- a/source/common/shortyuv.cpp Tue Apr 15 14:07:33 2014 -0500
+++ b/source/common/shortyuv.cpp Wed Apr 16 17:36:13 2014 +0530
@@ -211,7 +211,7 @@
void ShortYuv::copyPartToPartYuvChroma(TComYuv* dstPicYuv, uint32_t partIdx, uint32_t lumaSize, uint32_t chromaId, const bool splitIntoSubTUs)
{
- int part = splitIntoSubTUs ? NUM_CHROMA_PARTITIONS : partitionFromSizes(lumaSize, lumaSize);
+ int part = splitIntoSubTUs ? NUM_CHROMA_PARTITIONS422 : partitionFromSizes(lumaSize, lumaSize);
if (chromaId == 1)
{
More information about the x265-devel
mailing list