Commit 9dccdf24 authored by Cheng Chen's avatar Cheng Chen

Clamp current_delta_lf_from_base in ext_delta_q

BUG=aomedia:829

Change-Id: I78347e12b4efa05ebd424ba25de7767437495b42
parent aaf262f9
......@@ -1142,10 +1142,12 @@ static void read_intra_frame_mode_info(AV1_COMMON *const cm,
xd->prev_delta_lf_from_base = xd->current_delta_lf_from_base;
}
#else
mbmi->current_delta_lf_from_base = xd->current_delta_lf_from_base =
const int current_delta_lf_from_base =
xd->prev_delta_lf_from_base +
read_delta_lflevel(cm, xd, r, mbmi, mi_col, mi_row) *
cm->delta_lf_res;
mbmi->current_delta_lf_from_base = xd->current_delta_lf_from_base =
clamp(current_delta_lf_from_base, 0, MAX_LOOP_FILTER);
xd->prev_delta_lf_from_base = xd->current_delta_lf_from_base;
#endif // CONFIG_LOOPFILTER_LEVEL
}
......@@ -2897,10 +2899,12 @@ static void read_inter_frame_mode_info(AV1Decoder *const pbi,
xd->prev_delta_lf_from_base = xd->current_delta_lf_from_base;
}
#else
mbmi->current_delta_lf_from_base = xd->current_delta_lf_from_base =
const int current_delta_lf_from_base =
xd->prev_delta_lf_from_base +
read_delta_lflevel(cm, xd, r, mbmi, mi_col, mi_row) *
cm->delta_lf_res;
mbmi->current_delta_lf_from_base = xd->current_delta_lf_from_base =
clamp(current_delta_lf_from_base, 0, MAX_LOOP_FILTER);
xd->prev_delta_lf_from_base = xd->current_delta_lf_from_base;
#endif // CONFIG_LOOPFILTER_LEVEL
}
......
......@@ -4730,7 +4730,8 @@ static void encode_rd_sb_row(AV1_COMP *cpi, ThreadData *td,
for (j = 0; j < AOMMIN(cm->mib_size, cm->mi_rows - mi_row); j++) {
for (k = 0; k < AOMMIN(cm->mib_size, cm->mi_cols - mi_col); k++) {
cm->mi[(mi_row + j) * cm->mi_stride + (mi_col + k)]
.mbmi.current_delta_lf_from_base = current_delta_lf_from_base;
.mbmi.current_delta_lf_from_base =
clamp(current_delta_lf_from_base, 0, MAX_LOOP_FILTER);
#if CONFIG_LOOPFILTER_LEVEL
for (int lf_id = 0; lf_id < FRAME_LF_COUNT; ++lf_id) {
cm->mi[(mi_row + j) * cm->mi_stride + (mi_col + k)]
......
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