Commit e20a29d3 authored by Debargha Mukherjee's avatar Debargha Mukherjee Committed by Gerrit Code Review
Browse files

Merge "Select segment based loopfilter strength for supertx blocks." into nextgenv2

parents 343fe016 44b91a0e
......@@ -240,8 +240,16 @@ static void update_sharpness(loop_filter_info_n *lfi, int sharpness_lvl) {
static uint8_t get_filter_level(const loop_filter_info_n *lfi_n,
const MB_MODE_INFO *mbmi) {
return lfi_n->lvl[mbmi->segment_id][mbmi->ref_frame[0]]
[mode_lf_lut[mbmi->mode]];
#if CONFIG_SUPERTX
const int segment_id = VPXMIN(mbmi->segment_id, mbmi->segment_id_supertx);
assert(IMPLIES(supertx_enabled(mbmi),
mbmi->segment_id_supertx != MAX_SEGMENTS));
assert(IMPLIES(supertx_enabled(mbmi),
mbmi->segment_id_supertx <= mbmi->segment_id));
#else
const int segment_id = mbmi->segment_id;
#endif // CONFIG_SUPERTX
return lfi_n->lvl[segment_id][mbmi->ref_frame[0]][mode_lf_lut[mbmi->mode]];
}
void vp10_loop_filter_init(VP10_COMMON *cm) {
......
......@@ -1309,6 +1309,8 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
}
#if CONFIG_SUPERTX
mbmi->segment_id_supertx = MAX_SEGMENTS;
if (supertx_enabled) {
xd->corrupted |= vp10_reader_has_error(r);
return;
......
......@@ -339,6 +339,10 @@ static void set_offsets(VP10_COMP *cpi, const TileInfo *const tile,
mbmi->segment_id = 0;
x->encode_breakout = cpi->encode_breakout;
}
#if CONFIG_SUPERTX
mbmi->segment_id_supertx = MAX_SEGMENTS;
#endif // CONFIG_SUPERTX
}
#if CONFIG_SUPERTX
......@@ -1329,6 +1333,7 @@ static void update_state_supertx(VP10_COMP *cpi, ThreadData *td,
: cm->last_frame_seg_map;
mi_addr->mbmi.segment_id = get_segment_id(cm, map, bsize, mi_row, mi_col);
}
mi_addr->mbmi.segment_id_supertx = MAX_SEGMENTS;
}
// Restore the coding context of the MB to that that was in place
......
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