Commit d53fb0fd authored by hkuang's avatar hkuang

Fix clang ioc warning due to NULL mi pointer.

The warning only happens in VP9 encoder's first pass due to src_mi
is not set up yet. But it will not fail the encoder as left_mi and
above_mi are not used in the first_pass and they will be set up again
in the second pass.

Change-Id: I0713b4660d71e229e196654cb0970ba6b1574f28
parent f003f77b
......@@ -380,7 +380,8 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
xd->left_available = (mi_col > tile->mi_col_start);
if (xd->up_available) {
xd->above_mi = xd->mi[-xd->mi_stride];
xd->above_mbmi = &xd->above_mi->mbmi;
// above_mi may be NULL in VP9 encoder's first pass.
xd->above_mbmi = xd->above_mi ? &xd->above_mi->mbmi : NULL;
} else {
xd->above_mi = NULL;
xd->above_mbmi = NULL;
......@@ -388,7 +389,8 @@ static INLINE void set_mi_row_col(MACROBLOCKD *xd, const TileInfo *const tile,
if (xd->left_available) {
xd->left_mi = xd->mi[-1];
xd->left_mbmi = &xd->left_mi->mbmi;
// left_mi may be NULL in VP9 encoder's first pass.
xd->left_mbmi = xd->left_mi ? &xd->left_mi->mbmi : NULL;
} else {
xd->left_mi = NULL;
xd->left_mbmi = NULL;
......
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