Merge "Fix chrome valgrind warning due to the use of mismatched bsize"

This commit is contained in:
Jingning Han 2014-07-13 11:07:44 -07:00 committed by Gerrit Code Review
commit 6ce515b9ff
3 changed files with 10 additions and 1 deletions

View File

@ -107,6 +107,13 @@ const TX_SIZE max_txsize_lookup[BLOCK_SIZES] = {
TX_32X32, TX_32X32, TX_32X32, TX_32X32 TX_32X32, TX_32X32, TX_32X32, TX_32X32
}; };
const BLOCK_SIZE txsize_to_bsize[TX_SIZES] = {
BLOCK_4X4, // TX_4X4
BLOCK_8X8, // TX_8X8
BLOCK_16X16, // TX_16X16
BLOCK_32X32, // TX_32X32
};
const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] = { const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES] = {
TX_4X4, // ONLY_4X4 TX_4X4, // ONLY_4X4
TX_8X8, // ALLOW_8X8 TX_8X8, // ALLOW_8X8

View File

@ -29,6 +29,7 @@ extern const int num_pels_log2_lookup[BLOCK_SIZES];
extern const PARTITION_TYPE partition_lookup[][BLOCK_SIZES]; extern const PARTITION_TYPE partition_lookup[][BLOCK_SIZES];
extern const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES]; extern const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES];
extern const TX_SIZE max_txsize_lookup[BLOCK_SIZES]; extern const TX_SIZE max_txsize_lookup[BLOCK_SIZES];
extern const BLOCK_SIZE txsize_to_bsize[TX_SIZES];
extern const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES]; extern const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES];
extern const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2]; extern const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2];

View File

@ -675,6 +675,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
int i, j; int i, j;
const int width = num_4x4_blocks_wide_lookup[bsize]; const int width = num_4x4_blocks_wide_lookup[bsize];
const int height = num_4x4_blocks_high_lookup[bsize]; const int height = num_4x4_blocks_high_lookup[bsize];
const BLOCK_SIZE bsize_tx = txsize_to_bsize[mbmi->tx_size];
int rate2 = 0; int rate2 = 0;
int64_t dist2 = 0; int64_t dist2 = 0;
@ -700,7 +701,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
src_stride, src_stride,
&pd->dst.buf[4 * (j * dst_stride + i)], &pd->dst.buf[4 * (j * dst_stride + i)],
dst_stride, i, j, 0); dst_stride, i, j, 0);
model_rd_for_sb_y(cpi, bsize, x, xd, &rate, &dist, &var_y, &sse_y); model_rd_for_sb_y(cpi, bsize_tx, x, xd, &rate, &dist, &var_y, &sse_y);
rate2 += rate; rate2 += rate;
dist2 += dist; dist2 += dist;
++block_idx; ++block_idx;