diff options
Diffstat (limited to 'vp9/common')
-rw-r--r-- | vp9/common/vp9_blockd.h | 11 | ||||
-rw-r--r-- | vp9/common/vp9_mbpitch.c | 8 |
2 files changed, 18 insertions, 1 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h index ade8dced5..175571648 100644 --- a/vp9/common/vp9_blockd.h +++ b/vp9/common/vp9_blockd.h @@ -215,6 +215,14 @@ typedef enum { BLOCK_SIZE_SB64X64 = 2, } BLOCK_SIZE_TYPE; +typedef enum { + BLOCK_4X4_LG2 = 0, + BLOCK_8X8_LG2 = 2, + BLOCK_16X16_LG2 = 4, + BLOCK_32X32_LG2 = 6, + BLOCK_64X64_LG2 = 8 +} BLOCK_SIZE_LG2; + typedef struct { MB_PREDICTION_MODE mode, uv_mode; #if CONFIG_COMP_INTERINTRA_PRED @@ -299,6 +307,9 @@ struct mb_plane { DECLARE_ALIGNED(16, int16_t, qcoeff[64 * 64]); DECLARE_ALIGNED(16, int16_t, dqcoeff[64 * 64]); DECLARE_ALIGNED(16, uint16_t, eobs[256]); + PLANE_TYPE plane_type; + int subsampling_x; + int subsampling_y; }; #define BLOCK_OFFSET(x, i, n) ((x) + (i) * (n)) diff --git a/vp9/common/vp9_mbpitch.c b/vp9/common/vp9_mbpitch.c index b357c9ac9..aba950e9a 100644 --- a/vp9/common/vp9_mbpitch.c +++ b/vp9/common/vp9_mbpitch.c @@ -70,7 +70,7 @@ static void setup_macroblock(MACROBLOCKD *mb, BLOCKSET bs) { } void vp9_setup_block_dptrs(MACROBLOCKD *mb) { - int r, c; + int r, c, i; BLOCKD *blockd = mb->block; for (r = 0; r < 4; r++) { @@ -99,6 +99,12 @@ void vp9_setup_block_dptrs(MACROBLOCKD *mb) { blockd[to].predictor = &mb->predictor[from]; } } + + for (i = 0; i < MAX_MB_PLANE; i++) { + mb->plane[i].plane_type = i ? PLANE_TYPE_UV : PLANE_TYPE_Y_WITH_DC; + mb->plane[i].subsampling_x = !!i; + mb->plane[i].subsampling_y = !!i; + } } void vp9_build_block_doffsets(MACROBLOCKD *mb) { |