Removing prev_mi_8x8 from MACROBLOCKD.
Change-Id: I32beb5f18c10b5771146c55933b5555487f53633
This commit is contained in:
parent
2ec04d1f84
commit
63f86c149a
@ -208,7 +208,6 @@ typedef struct macroblockd {
|
|||||||
|
|
||||||
// A NULL indicates that the 8x8 is not part of the image
|
// A NULL indicates that the 8x8 is not part of the image
|
||||||
MODE_INFO **mi_8x8;
|
MODE_INFO **mi_8x8;
|
||||||
MODE_INFO **prev_mi_8x8;
|
|
||||||
|
|
||||||
int up_available;
|
int up_available;
|
||||||
int left_available;
|
int left_available;
|
||||||
|
@ -193,11 +193,14 @@ static void find_mv_refs_idx(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
|||||||
int block, int mi_row, int mi_col) {
|
int block, int mi_row, int mi_col) {
|
||||||
const int *ref_sign_bias = cm->ref_frame_sign_bias;
|
const int *ref_sign_bias = cm->ref_frame_sign_bias;
|
||||||
int i, refmv_count = 0;
|
int i, refmv_count = 0;
|
||||||
const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi ?
|
const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi
|
||||||
xd->prev_mi_8x8[0] : NULL;
|
? cm->prev_mi_grid_visible[mi_row * xd->mode_info_stride + mi_col]
|
||||||
|
: NULL;
|
||||||
|
const MB_MODE_INFO *const prev_mbmi = prev_mi ? &prev_mi->mbmi : NULL;
|
||||||
|
|
||||||
|
|
||||||
const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type];
|
const POSITION *const mv_ref_search = mv_ref_blocks[mi->mbmi.sb_type];
|
||||||
const MB_MODE_INFO *const prev_mbmi = cm->coding_use_prev_mi && prev_mi ?
|
|
||||||
&prev_mi->mbmi : NULL;
|
|
||||||
int different_ref_found = 0;
|
int different_ref_found = 0;
|
||||||
int context_counter = 0;
|
int context_counter = 0;
|
||||||
|
|
||||||
|
@ -302,7 +302,6 @@ static void set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
|
|||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
xd->mi_8x8 = cm->mi_grid_visible + offset;
|
xd->mi_8x8 = cm->mi_grid_visible + offset;
|
||||||
xd->prev_mi_8x8 = cm->prev_mi_grid_visible + offset;
|
|
||||||
xd->mi_8x8[0] = &cm->mi[offset];
|
xd->mi_8x8[0] = &cm->mi[offset];
|
||||||
xd->mi_8x8[0]->mbmi.sb_type = bsize;
|
xd->mi_8x8[0]->mbmi.sb_type = bsize;
|
||||||
for (y = 0; y < y_mis; ++y)
|
for (y = 0; y < y_mis; ++y)
|
||||||
|
@ -164,7 +164,6 @@ static INLINE void set_modeinfo_offsets(VP9_COMMON *const cm,
|
|||||||
int mi_col) {
|
int mi_col) {
|
||||||
const int idx_str = xd->mode_info_stride * mi_row + mi_col;
|
const int idx_str = xd->mode_info_stride * mi_row + mi_col;
|
||||||
xd->mi_8x8 = cm->mi_grid_visible + idx_str;
|
xd->mi_8x8 = cm->mi_grid_visible + idx_str;
|
||||||
xd->prev_mi_8x8 = cm->prev_mi_grid_visible + idx_str;
|
|
||||||
xd->mi_8x8[0] = cm->mi + idx_str;
|
xd->mi_8x8[0] = cm->mi + idx_str;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1945,21 +1944,20 @@ static const BLOCK_SIZE next_square_size[BLOCK_SIZES] = {
|
|||||||
// Look at neighboring blocks and set a min and max partition size based on
|
// Look at neighboring blocks and set a min and max partition size based on
|
||||||
// what they chose.
|
// what they chose.
|
||||||
static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
|
static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
|
||||||
int row, int col,
|
int mi_row, int mi_col,
|
||||||
BLOCK_SIZE *min_block_size,
|
BLOCK_SIZE *min_block_size,
|
||||||
BLOCK_SIZE *max_block_size) {
|
BLOCK_SIZE *max_block_size) {
|
||||||
VP9_COMMON * const cm = &cpi->common;
|
VP9_COMMON *const cm = &cpi->common;
|
||||||
MACROBLOCKD *const xd = &cpi->mb.e_mbd;
|
MACROBLOCKD *const xd = &cpi->mb.e_mbd;
|
||||||
MODE_INFO ** mi_8x8 = xd->mi_8x8;
|
MODE_INFO **mi_8x8 = xd->mi_8x8;
|
||||||
MODE_INFO ** prev_mi_8x8 = xd->prev_mi_8x8;
|
|
||||||
const int left_in_image = xd->left_available && mi_8x8[-1];
|
const int left_in_image = xd->left_available && mi_8x8[-1];
|
||||||
const int above_in_image = xd->up_available &&
|
const int above_in_image = xd->up_available &&
|
||||||
mi_8x8[-xd->mode_info_stride];
|
mi_8x8[-xd->mode_info_stride];
|
||||||
MODE_INFO ** above_sb64_mi_8x8;
|
MODE_INFO **above_sb64_mi_8x8;
|
||||||
MODE_INFO ** left_sb64_mi_8x8;
|
MODE_INFO **left_sb64_mi_8x8;
|
||||||
|
|
||||||
int row8x8_remaining = tile->mi_row_end - row;
|
int row8x8_remaining = tile->mi_row_end - mi_row;
|
||||||
int col8x8_remaining = tile->mi_col_end - col;
|
int col8x8_remaining = tile->mi_col_end - mi_col;
|
||||||
int bh, bw;
|
int bh, bw;
|
||||||
BLOCK_SIZE min_size = BLOCK_4X4;
|
BLOCK_SIZE min_size = BLOCK_4X4;
|
||||||
BLOCK_SIZE max_size = BLOCK_64X64;
|
BLOCK_SIZE max_size = BLOCK_64X64;
|
||||||
@ -1973,8 +1971,9 @@ static void rd_auto_partition_range(VP9_COMP *cpi, const TileInfo *const tile,
|
|||||||
// passed in values for min and max as a starting point.
|
// passed in values for min and max as a starting point.
|
||||||
// Find the min and max partition used in previous frame at this location
|
// Find the min and max partition used in previous frame at this location
|
||||||
if (cm->frame_type != KEY_FRAME) {
|
if (cm->frame_type != KEY_FRAME) {
|
||||||
get_sb_partition_size_range(cpi, prev_mi_8x8,
|
MODE_INFO **const prev_mi =
|
||||||
&min_size, &max_size);
|
&cm->prev_mi_grid_visible[mi_row * xd->mode_info_stride + mi_col];
|
||||||
|
get_sb_partition_size_range(cpi, prev_mi, &min_size, &max_size);
|
||||||
}
|
}
|
||||||
// Find the min and max partition sizes used in the left SB64
|
// Find the min and max partition sizes used in the left SB64
|
||||||
if (left_in_image) {
|
if (left_in_image) {
|
||||||
|
Loading…
Reference in New Issue
Block a user