Merge "Change to prevent invalid memory access"

This commit is contained in:
Yaowu Xu
2013-09-24 10:37:17 -07:00
committed by Gerrit Code Review

View File

@@ -2351,11 +2351,11 @@ static void reset_skip_txfm_size_b(VP9_COMP *cpi, MODE_INFO **mi_8x8,
int mis, TX_SIZE max_tx_size, int bw, int bh, int mis, TX_SIZE max_tx_size, int bw, int bh,
int mi_row, int mi_col, BLOCK_SIZE bsize) { int mi_row, int mi_col, BLOCK_SIZE bsize) {
VP9_COMMON * const cm = &cpi->common; VP9_COMMON * const cm = &cpi->common;
MB_MODE_INFO * const mbmi = &mi_8x8[0]->mbmi;
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols) {
return; return;
} else {
MB_MODE_INFO * const mbmi = &mi_8x8[0]->mbmi;
if (mbmi->tx_size > max_tx_size) { if (mbmi->tx_size > max_tx_size) {
const int ymbs = MIN(bh, cm->mi_rows - mi_row); const int ymbs = MIN(bh, cm->mi_rows - mi_row);
const int xmbs = MIN(bw, cm->mi_cols - mi_col); const int xmbs = MIN(bw, cm->mi_cols - mi_col);
@@ -2365,6 +2365,7 @@ static void reset_skip_txfm_size_b(VP9_COMP *cpi, MODE_INFO **mi_8x8,
set_txfm_flag(mi_8x8, mis, ymbs, xmbs, max_tx_size); set_txfm_flag(mi_8x8, mis, ymbs, xmbs, max_tx_size);
} }
} }
}
static void reset_skip_txfm_size_sb(VP9_COMP *cpi, MODE_INFO **mi_8x8, static void reset_skip_txfm_size_sb(VP9_COMP *cpi, MODE_INFO **mi_8x8,
TX_SIZE max_tx_size, int mi_row, int mi_col, TX_SIZE max_tx_size, int mi_row, int mi_col,