Commit 4a42047b authored by Jingning Han's avatar Jingning Han
Browse files

Fix segment_id assignment in update_state_rt for AQ mode

Properly obtain and buffer the segment_id in non-RD mode information
update process.

Change-Id: I43230001872f6a986d12c0d94e98fdec0db3be2c
parent 143b0955
......@@ -1405,7 +1405,7 @@ static int sb_has_motion(const VP9_COMMON *cm, MODE_INFO **prev_mi_8x8) {
return 0;
}
static void update_state_rt(VP9_COMP *cpi, const PICK_MODE_CONTEXT *ctx,
static void update_state_rt(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
int mi_row, int mi_col, int bsize) {
VP9_COMMON *const cm = &cpi->common;
MACROBLOCK *const x = &cpi->mb;
......@@ -1413,15 +1413,11 @@ static void update_state_rt(VP9_COMP *cpi, const PICK_MODE_CONTEXT *ctx,
MB_MODE_INFO *const mbmi = &xd->mi_8x8[0]->mbmi;
const struct segmentation *const seg = &cm->seg;
// TODO(jingning) We might need PICK_MODE_CONTEXT to buffer coding modes
// associated with variable block sizes. Otherwise, remove this ctx
// from argument list.
(void)ctx;
*(xd->mi_8x8[0]) = ctx->mic;
// Check for reseting segment_id and update cyclic map.
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && seg->enabled) {
// For in frame adaptive Q, check for reseting the segment_id and updating
// the cyclic refresh map.
if ((cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) && seg->enabled) {
vp9_cyclic_refresh_update_segment(cpi, &xd->mi_8x8[0]->mbmi,
mi_row, mi_col, bsize, 1);
vp9_init_plane_quantizers(cpi, x);
......@@ -1448,6 +1444,7 @@ static void encode_b_rt(VP9_COMP *cpi, const TileInfo *const tile,
if (x->ab_index > 0)
return;
}
set_offsets(cpi, tile, mi_row, mi_col, bsize);
update_state_rt(cpi, get_block_context(x, bsize), mi_row, mi_col, bsize);
......
......@@ -255,7 +255,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x,
mbmi->interp_filter = cpi->common.interp_filter == SWITCHABLE ?
EIGHTTAP : cpi->common.interp_filter;
mbmi->skip = 0;
mbmi->segment_id = 0;
mbmi->segment_id = segment_id;
xd->interp_kernel = vp9_get_interp_kernel(mbmi->interp_filter);
for (ref_frame = LAST_FRAME; ref_frame <= LAST_FRAME ; ++ref_frame) {
......
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