Commit 2f5b7ad6 authored by James Zern's avatar James Zern
Browse files

vp9_read_mode_info: limit scope of function params

replace VP9D_COMP usage with the (slightly) more targeted
VP9_COMMON/MACROBLCKD structures.

Change-Id: I09f6c4a5b0bcc20222210831b5b4c1582eced300
parent a06cadba
......@@ -666,10 +666,9 @@ void vp9_prepare_read_mode_info(VP9D_COMP* pbi, vp9_reader *r) {
}
}
void vp9_read_mode_info(VP9D_COMP* pbi, int mi_row, int mi_col, vp9_reader *r) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
MODE_INFO *mi = xd->mi_8x8[0];
void vp9_read_mode_info(VP9_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col, vp9_reader *r) {
MODE_INFO *const mi = xd->mi_8x8[0];
const BLOCK_SIZE bsize = mi->mbmi.sb_type;
const int bw = 1 << mi_width_log2(bsize);
const int bh = 1 << mi_height_log2(bsize);
......
......@@ -14,8 +14,9 @@
#include "vp9/decoder/vp9_onyxd_int.h"
#include "vp9/decoder/vp9_dboolhuff.h"
void vp9_prepare_read_mode_info(VP9D_COMP* pbi, vp9_reader *r);
void vp9_prepare_read_mode_info(VP9D_COMP *pbi, vp9_reader *r);
void vp9_read_mode_info(VP9D_COMP* pbi, int mi_row, int mi_col, vp9_reader *r);
void vp9_read_mode_info(VP9_COMMON *cm, MACROBLOCKD *xd,
int mi_row, int mi_col, vp9_reader *r);
#endif // VP9_DECODER_VP9_DECODEMV_H_
......@@ -225,6 +225,7 @@ static void set_ref(VP9D_COMP *pbi, int i, int mi_row, int mi_col) {
static void decode_modes_b(VP9D_COMP *pbi, int tile_col,
int mi_row, int mi_col,
vp9_reader *r, BLOCK_SIZE bsize, int index) {
VP9_COMMON *const cm = &pbi->common;
MACROBLOCKD *const xd = &pbi->mb;
const int less8x8 = bsize < BLOCK_8X8;
MB_MODE_INFO *mbmi;
......@@ -235,7 +236,7 @@ static void decode_modes_b(VP9D_COMP *pbi, int tile_col,
return;
set_offsets(pbi, bsize, tile_col, mi_row, mi_col);
vp9_read_mode_info(pbi, mi_row, mi_col, r);
vp9_read_mode_info(cm, xd, mi_row, mi_col, r);
if (less8x8)
bsize = BLOCK_8X8;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment