Commit 75b42a49 authored by Adrian Grange's avatar Adrian Grange Committed by Gerrit Code Review

Remove coding_use_prev_mi member from VP9_COMMON

This was shadowing the use of error_resilient_mode, but with
the opposite sense.

Change-Id: Ie4d30263a304fe4b3e94f0c7741db6888cc6afd8
parent bac9beff
......@@ -20,7 +20,7 @@ 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
const MODE_INFO *prev_mi = !cm->error_resilient_mode && cm->prev_mi
? cm->prev_mi_grid_visible[mi_row * xd->mi_stride + mi_col]
: NULL;
const MB_MODE_INFO *const prev_mbmi = prev_mi ? &prev_mi->mbmi : NULL;
......
......@@ -188,11 +188,6 @@ typedef struct VP9Common {
int error_resilient_mode;
int frame_parallel_decoding_mode;
// Flag indicates if prev_mi can be used in coding:
// 0: encoder assumes decoder does not have prev_mi
// 1: encoder assumes decoder has and uses prev_mi
unsigned int coding_use_prev_mi;
int log2_tile_cols, log2_tile_rows;
// Private data associated with the frame buffer callbacks.
......
......@@ -1233,11 +1233,9 @@ static size_t read_uncompressed_header(VP9Decoder *pbi,
}
if (!cm->error_resilient_mode) {
cm->coding_use_prev_mi = 1;
cm->refresh_frame_context = vp9_rb_read_bit(rb);
cm->frame_parallel_decoding_mode = vp9_rb_read_bit(rb);
} else {
cm->coding_use_prev_mi = 0;
cm->refresh_frame_context = 0;
cm->frame_parallel_decoding_mode = 1;
}
......@@ -1413,7 +1411,7 @@ void vp9_decode_frame(VP9Decoder *pbi,
init_macroblockd(cm, &pbi->mb);
if (cm->coding_use_prev_mi)
if (!cm->error_resilient_mode)
set_prev_mi(cm);
else
cm->prev_mi = NULL;
......
......@@ -2159,9 +2159,7 @@ static void encode_frame_to_data_rate(VP9_COMP *cpi,
(cpi->oxcf.frame_parallel_decoding_mode != 0);
// By default, encoder assumes decoder can use prev_mi.
cm->coding_use_prev_mi = 1;
if (cm->error_resilient_mode) {
cm->coding_use_prev_mi = 0;
cm->frame_parallel_decoding_mode = 1;
cm->reset_frame_context = 0;
cm->refresh_frame_context = 0;
......
......@@ -458,7 +458,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
vp9_setup_pred_block(xd, yv12_mb[ref_frame], yv12, mi_row, mi_col,
sf, sf);
if (cm->coding_use_prev_mi)
if (!cm->error_resilient_mode)
vp9_find_mv_refs(cm, xd, tile, xd->mi[0], ref_frame,
candidates, mi_row, mi_col);
else
......
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