ref: 575e81f7c9c39ea0e5d4a61485a5f88073784dc9
parent: 48f0168e955f8f79c99a02681b45ccab122721c4
author: Alex Converse <[email protected]>
date: Mon Sep 14 07:43:38 EDT 2015
CR: Don't attempt to read qindex_delta for segments CR is unaware of. Found by the remoting VideoEncoderVpxTest.Vp9LossyUnchangedFrame unit test under asan. Change-Id: Icac63051bf37c7355e661837b57c257d58c764fc
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -232,10 +232,12 @@
// 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) {
+ } 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),