Commit d279cadb authored by Alex Converse's avatar Alex Converse

Port active map / cyclic refresh fixes to VP10.

Bring commits 575e81f7 and 3d6b8a66 to VP10. These changes predate
the creation of the active map cyclic refresh test.

BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1224

Change-Id: I3559b6933ffa5649926a4b214e45ed0fae523a25
parent f59bf76e
......@@ -125,11 +125,18 @@ VP9_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(5, 6));
#if CONFIG_VP10
#if CONFIG_EXT_PARTITION
INSTANTIATE_TEST_CASE_P(
DISABLED_VP10, ActiveMapRefreshTest,
DISABLED_VP10,
ActiveMapRefreshTest,
::testing::Combine(
::testing::Values(static_cast<const libvpx_test::CodecFactory *>(
&libvpx_test::kVP10)),
::testing::Values(::libvpx_test::kRealTime), ::testing::Range(5, 6)));
#else
VP10_INSTANTIATE_TEST_CASE(ActiveMapRefreshTest,
::testing::Values(::libvpx_test::kRealTime),
::testing::Range(5, 6));
#endif // CONFIG_EXT_PARTITION
#endif // CONFIG_VP10
} // namespace
......@@ -267,9 +267,17 @@ void vp10_cyclic_refresh_update_segment(VP10_COMP *const cpi,
// don't update the map for them. For cases where motion is non-zero or
// the reference frame isn't the previous frame, the previous value in
// the map for this spatial location is not entirely correct.
if (!is_inter_block(mbmi) || !skip)
if ((!is_inter_block(mbmi) || !skip) &&
mbmi->segment_id <= CR_SEGMENT_ID_BOOST2) {
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 &&
mbmi->segment_id <= CR_SEGMENT_ID_BOOST2) {
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]);
}
}
}
......
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