From 3d6b8a667f67b6c0f0689cb45a48b8510a64e0ce Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Thu, 3 Sep 2015 14:53:40 -0700 Subject: [PATCH] Prevent CR in screen mode from refreshing flat inter blocks forever. Take the minimum last_codec_q_map on inter skip. Change-Id: Ibb308526dd19793bb359f51ebd7b48d8692903fd --- vp9/encoder/vp9_aq_cyclicrefresh.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c index a96cf5c5b..ebef1a202 100644 --- a/vp9/encoder/vp9_aq_cyclicrefresh.c +++ b/vp9/encoder/vp9_aq_cyclicrefresh.c @@ -235,6 +235,12 @@ void vp9_cyclic_refresh_update_segment(VP9_COMP *const cpi, if (!is_inter_block(mbmi) || !skip) cr->last_coded_q_map[map_offset] = clamp( cm->base_qindex + cr->qindex_delta[mbmi->segment_id], 0, MAXQ); + else if (is_inter_block(mbmi) && skip) { + cr->last_coded_q_map[map_offset] = VPXMIN( + clamp(cm->base_qindex + cr->qindex_delta[mbmi->segment_id], + 0, MAXQ), + cr->last_coded_q_map[map_offset]); + } } } -- 2.40.0