Commit 3dffa270 authored by David Barker's avatar David Barker Committed by Cheng Chen

Fix interaction of loopfilter-level + obu

When obu is enabled, we should only apply look filtering after
the frame is fully decoded. This was not working correctly with
the combination of loopfilter-level + obu; move an 'if' condition
around in order to fix this.

Change-Id: I0f06d81663ea1d91f4e4b251b1eaf4bda70a8770
parent 472cd036
......@@ -2971,21 +2971,22 @@ static const uint8_t *decode_tiles(AV1Decoder *pbi, const uint8_t *data,
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level, 0, 0, 0, 0);
#else
#if CONFIG_LOOPFILTER_LEVEL
if (cm->lf.filter_level[0] || cm->lf.filter_level[1]) {
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level[0], cm->lf.filter_level[1], 0, 0);
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level_u, cm->lf.filter_level_u, 1, 0);
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level_v, cm->lf.filter_level_v, 2, 0);
}
#else
#if CONFIG_OBU
if (endTile == cm->tile_rows * cm->tile_cols - 1)
#endif
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level, 0, 0);
#if CONFIG_LOOPFILTER_LEVEL
if (cm->lf.filter_level[0] || cm->lf.filter_level[1]) {
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level[0], cm->lf.filter_level[1], 0,
0);
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level_u, cm->lf.filter_level_u, 1, 0);
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level_v, cm->lf.filter_level_v, 2, 0);
}
#else
av1_loop_filter_frame(get_frame_new_buffer(cm), cm, &pbi->mb,
cm->lf.filter_level, 0, 0);
#endif // CONFIG_LOOPFILTER_LEVEL
#endif // CONFIG_LPF_SB
#endif // CONFIG_INTRABC
......
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