Index: source/libvpx/vp9/encoder/vp9_block.h |
=================================================================== |
--- source/libvpx/vp9/encoder/vp9_block.h (revision 177019) |
+++ source/libvpx/vp9/encoder/vp9_block.h (working copy) |
@@ -8,7 +8,6 @@ |
* be found in the AUTHORS file in the root of the source tree. |
*/ |
- |
#ifndef VP9_ENCODER_VP9_BLOCK_H_ |
#define VP9_ENCODER_VP9_BLOCK_H_ |
@@ -26,32 +25,35 @@ |
typedef struct block { |
// 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries |
- short *src_diff; |
- short *coeff; |
+ int16_t *src_diff; |
+ int16_t *coeff; |
// 16 Y blocks, 4 U blocks, 4 V blocks each with 16 entries |
- short *quant; |
- short *quant_fast; // fast quant deprecated for now |
- unsigned char *quant_shift; |
- short *zbin; |
- short *zbin_8x8; |
- short *zbin_16x16; |
- short *zrun_zbin_boost; |
- short *zrun_zbin_boost_8x8; |
- short *zrun_zbin_boost_16x16; |
- short *round; |
+ int16_t *quant; |
+ int16_t *quant_fast; // fast quant deprecated for now |
+ uint8_t *quant_shift; |
+ int16_t *zbin; |
+ int16_t *zbin_8x8; |
+ int16_t *zbin_16x16; |
+ int16_t *zbin_32x32; |
+ int16_t *zrun_zbin_boost; |
+ int16_t *zrun_zbin_boost_8x8; |
+ int16_t *zrun_zbin_boost_16x16; |
+ int16_t *zrun_zbin_boost_32x32; |
+ int16_t *round; |
// Zbin Over Quant value |
short zbin_extra; |
- unsigned char **base_src; |
- unsigned char **base_second_src; |
+ uint8_t **base_src; |
+ uint8_t **base_second_src; |
int src; |
int src_stride; |
int eob_max_offset; |
int eob_max_offset_8x8; |
int eob_max_offset_16x16; |
+ int eob_max_offset_32x32; |
} BLOCK; |
typedef struct { |
@@ -68,9 +70,10 @@ |
typedef struct { |
MODE_INFO mic; |
PARTITION_INFO partition_info; |
+ int skip; |
int_mv best_ref_mv; |
int_mv second_best_ref_mv; |
- int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REFS]; |
+ int_mv ref_mvs[MAX_REF_FRAMES][MAX_MV_REF_CANDIDATES]; |
int rate; |
int distortion; |
int64_t intra_error; |
@@ -83,18 +86,20 @@ |
int64_t txfm_rd_diff[NB_TXFM_MODES]; |
} PICK_MODE_CONTEXT; |
+typedef struct superblock { |
+ DECLARE_ALIGNED(16, int16_t, src_diff[32*32+16*16*2]); |
+ DECLARE_ALIGNED(16, int16_t, coeff[32*32+16*16*2]); |
+} SUPERBLOCK; |
+ |
typedef struct macroblock { |
- DECLARE_ALIGNED(16, short, src_diff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y |
- DECLARE_ALIGNED(16, short, coeff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y |
-#if !CONFIG_SUPERBLOCKS |
- DECLARE_ALIGNED(16, unsigned char, thismb[256]); // 16x16 Y |
- |
- unsigned char *thismb_ptr; |
-#endif |
+ DECLARE_ALIGNED(16, int16_t, src_diff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y |
+ DECLARE_ALIGNED(16, int16_t, coeff[400]); // 16x16 Y 8x8 U 8x8 V 4x4 2nd Y |
// 16 Y blocks, 4 U blocks, 4 V blocks, |
// 1 DC 2nd order block each with 16 entries |
BLOCK block[25]; |
+ SUPERBLOCK sb_coeff_data; |
+ |
YV12_BUFFER_CONFIG src; |
MACROBLOCKD e_mbd; |
@@ -115,6 +120,8 @@ |
int *mb_norm_activity_ptr; |
signed int act_zbin_adj; |
+ int mv_best_ref_index[MAX_REF_FRAMES]; |
+ |
int nmvjointcost[MV_JOINTS]; |
int nmvcosts[2][MV_VALS]; |
int *nmvcost[2]; |
@@ -153,34 +160,29 @@ |
unsigned char *active_ptr; |
- unsigned int token_costs[TX_SIZE_MAX][BLOCK_TYPES][COEF_BANDS] |
- [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; |
- unsigned int hybrid_token_costs[TX_SIZE_MAX][BLOCK_TYPES][COEF_BANDS] |
- [PREV_COEF_CONTEXTS][MAX_ENTROPY_TOKENS]; |
+ vp9_coeff_count token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4]; |
+ vp9_coeff_count hybrid_token_costs[TX_SIZE_MAX_SB][BLOCK_TYPES_4X4]; |
int optimize; |
// Structure to hold context for each of the 4 MBs within a SB: |
// when encoded as 4 independent MBs: |
- PICK_MODE_CONTEXT mb_context[4]; |
-#if CONFIG_SUPERBLOCKS |
+ PICK_MODE_CONTEXT mb_context[4][4]; |
// when 4 MBs share coding parameters: |
- PICK_MODE_CONTEXT sb_context[4]; |
-#endif |
+ PICK_MODE_CONTEXT sb32_context[4]; |
+ PICK_MODE_CONTEXT sb64_context; |
- void (*vp9_short_fdct4x4)(short *input, short *output, int pitch); |
- void (*vp9_short_fdct8x4)(short *input, short *output, int pitch); |
- void (*short_walsh4x4)(short *input, short *output, int pitch); |
+ void (*vp9_short_fdct4x4)(int16_t *input, int16_t *output, int pitch); |
+ void (*vp9_short_fdct8x4)(int16_t *input, int16_t *output, int pitch); |
+ void (*short_walsh4x4)(int16_t *input, int16_t *output, int pitch); |
void (*quantize_b_4x4)(BLOCK *b, BLOCKD *d); |
void (*quantize_b_4x4_pair)(BLOCK *b1, BLOCK *b2, BLOCKD *d0, BLOCKD *d1); |
- void (*vp9_short_fdct8x8)(short *input, short *output, int pitch); |
- void (*vp9_short_fdct16x16)(short *input, short *output, int pitch); |
- void (*short_fhaar2x2)(short *input, short *output, int pitch); |
+ void (*vp9_short_fdct8x8)(int16_t *input, int16_t *output, int pitch); |
+ void (*vp9_short_fdct16x16)(int16_t *input, int16_t *output, int pitch); |
+ void (*short_fhaar2x2)(int16_t *input, int16_t *output, int pitch); |
void (*quantize_b_16x16)(BLOCK *b, BLOCKD *d); |
void (*quantize_b_8x8)(BLOCK *b, BLOCKD *d); |
void (*quantize_b_2x2)(BLOCK *b, BLOCKD *d); |
- |
} MACROBLOCK; |
- |
-#endif |
+#endif // VP9_ENCODER_VP9_BLOCK_H_ |