diff options
author | Jingning Han <jingning@google.com> | 2015-09-17 09:50:19 -0700 |
---|---|---|
committer | Jingning Han <jingning@google.com> | 2015-09-17 09:51:45 -0700 |
commit | c3bf8375726cc844434440cbdbe36c3576329166 (patch) | |
tree | 7c27d6687085e2e04c188545c53c829ab0b42e65 /vp10/encoder/encodeframe.c | |
parent | 3c8e04e93928b978dc6df84cf0f77939d7a2e64b (diff) | |
download | libvpx-c3bf8375726cc844434440cbdbe36c3576329166.tar libvpx-c3bf8375726cc844434440cbdbe36c3576329166.tar.gz libvpx-c3bf8375726cc844434440cbdbe36c3576329166.tar.bz2 libvpx-c3bf8375726cc844434440cbdbe36c3576329166.zip |
Refactor mbmi_ext structure
This commit removes mbmi_ext_base pointer from MACROBLOCK struct.
Its use case can be fully covered by cpi->mbmi_ext_base pointer.
Change-Id: I155351609336cf5b6145ed13c21b105052727f30
Diffstat (limited to 'vp10/encoder/encodeframe.c')
-rw-r--r-- | vp10/encoder/encodeframe.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/vp10/encoder/encodeframe.c b/vp10/encoder/encodeframe.c index ddea8cd87..c3b6265e3 100644 --- a/vp10/encoder/encodeframe.c +++ b/vp10/encoder/encodeframe.c @@ -170,15 +170,16 @@ static BLOCK_SIZE get_rd_var_based_fixed_partition(VP10_COMP *cpi, // Lighter version of set_offsets that only sets the mode info // pointers. -static INLINE void set_mode_info_offsets(VP10_COMMON *const cm, +static INLINE void set_mode_info_offsets(VP10_COMP *const cpi, MACROBLOCK *const x, MACROBLOCKD *const xd, int mi_row, int mi_col) { + VP10_COMMON *const cm = &cpi->common; const int idx_str = xd->mi_stride * mi_row + mi_col; xd->mi = cm->mi_grid_visible + idx_str; xd->mi[0] = cm->mi + idx_str; - x->mbmi_ext = x->mbmi_ext_base + (mi_row * cm->mi_cols + mi_col); + x->mbmi_ext = cpi->mbmi_ext_base + (mi_row * cm->mi_cols + mi_col); } static void set_offsets(VP10_COMP *cpi, const TileInfo *const tile, @@ -193,7 +194,7 @@ static void set_offsets(VP10_COMP *cpi, const TileInfo *const tile, set_skip_context(xd, mi_row, mi_col); - set_mode_info_offsets(cm, x, xd, mi_row, mi_col); + set_mode_info_offsets(cpi, x, xd, mi_row, mi_col); mbmi = &xd->mi[0]->mbmi; @@ -244,7 +245,7 @@ static void set_block_size(VP10_COMP * const cpi, int mi_row, int mi_col, BLOCK_SIZE bsize) { if (cpi->common.mi_cols > mi_col && cpi->common.mi_rows > mi_row) { - set_mode_info_offsets(&cpi->common, x, xd, mi_row, mi_col); + set_mode_info_offsets(cpi, x, xd, mi_row, mi_col); xd->mi[0]->mbmi.sb_type = bsize; } } |