summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-03-26 10:48:01 -0700
committerDmitry Kovalev <dkovalev@google.com>2014-03-26 10:50:34 -0700
commit63f86c149a63c749a3b4061cb948f8e96e9d415c (patch)
tree75e438a31786a0567a21ff62826bd7807894f875 /vp9
parent2ec04d1f84aba18359eb28e0f781994aecba3527 (diff)
downloadlibvpx-63f86c149a63c749a3b4061cb948f8e96e9d415c.tar
libvpx-63f86c149a63c749a3b4061cb948f8e96e9d415c.tar.gz
libvpx-63f86c149a63c749a3b4061cb948f8e96e9d415c.tar.bz2
libvpx-63f86c149a63c749a3b4061cb948f8e96e9d415c.zip
Removing prev_mi_8x8 from MACROBLOCKD.
Change-Id: I32beb5f18c10b5771146c55933b5555487f53633
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_blockd.h1
-rw-r--r--vp9/common/vp9_mvref_common.c11
-rw-r--r--vp9/decoder/vp9_decodeframe.c1
-rw-r--r--vp9/encoder/vp9_encodeframe.c21
4 files changed, 17 insertions, 17 deletions
diff --git a/vp9/common/vp9_blockd.h b/vp9/common/vp9_blockd.h
index ca5a0c2b7..b3f2ec594 100644
--- a/vp9/common/vp9_blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -208,7 +208,6 @@ typedef struct macroblockd {
// A NULL indicates that the 8x8 is not part of the image
MODE_INFO **mi_8x8;
- MODE_INFO **prev_mi_8x8;
int up_available;
int left_available;
diff --git a/vp9/common/vp9_mvref_common.c b/vp9/common/vp9_mvref_common.c
index 9f2c2dfac..c043e6c5b 100644
--- a/vp9/common/vp9_mvref_common.c
+++ b/vp9/common/vp9_mvref_common.c
@@ -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) {
const int *ref_sign_bias = cm->ref_frame_sign_bias;
int i, refmv_count = 0;
- const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi ?
- xd->prev_mi_8x8[0] : NULL;
+ const MODE_INFO *prev_mi = cm->coding_use_prev_mi && cm->prev_mi
+ ? 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 MB_MODE_INFO *const prev_mbmi = cm->coding_use_prev_mi && prev_mi ?
- &prev_mi->mbmi : NULL;
+
int different_ref_found = 0;
int context_counter = 0;
diff --git a/vp9/decoder/vp9_decodeframe.c b/vp9/decoder/vp9_decodeframe.c
index 134749fe6..a2bd6541f 100644
--- a/vp9/decoder/vp9_decodeframe.c
+++ b/vp9/decoder/vp9_decodeframe.c
@@ -302,7 +302,6 @@ static void set_offsets(VP9_COMMON *const cm, MACROBLOCKD *const xd,
int x, y;
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]->mbmi.sb_type = bsize;
for (y = 0; y < y_mis; ++y)
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index ed9e27cf8..36442a234 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -164,7 +164,6 @@ static INLINE void set_modeinfo_offsets(VP9_COMMON *const cm,
int mi_col) {
const int idx_str = xd->mode_info_stride * mi_row + mi_col;
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;
}
@@ -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
// what they chose.
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 *max_block_size) {
- VP9_COMMON * const cm = &cpi->common;
+ VP9_COMMON *const cm = &cpi->common;
MACROBLOCKD *const xd = &cpi->mb.e_mbd;
- MODE_INFO ** mi_8x8 = xd->mi_8x8;
- MODE_INFO ** prev_mi_8x8 = xd->prev_mi_8x8;
+ MODE_INFO **mi_8x8 = xd->mi_8x8;
const int left_in_image = xd->left_available && mi_8x8[-1];
const int above_in_image = xd->up_available &&
mi_8x8[-xd->mode_info_stride];
- MODE_INFO ** above_sb64_mi_8x8;
- MODE_INFO ** left_sb64_mi_8x8;
+ MODE_INFO **above_sb64_mi_8x8;
+ MODE_INFO **left_sb64_mi_8x8;
- int row8x8_remaining = tile->mi_row_end - row;
- int col8x8_remaining = tile->mi_col_end - col;
+ int row8x8_remaining = tile->mi_row_end - mi_row;
+ int col8x8_remaining = tile->mi_col_end - mi_col;
int bh, bw;
BLOCK_SIZE min_size = BLOCK_4X4;
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.
// Find the min and max partition used in previous frame at this location
if (cm->frame_type != KEY_FRAME) {
- get_sb_partition_size_range(cpi, prev_mi_8x8,
- &min_size, &max_size);
+ MODE_INFO **const prev_mi =
+ &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
if (left_in_image) {