summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_aq_cyclicrefresh.c
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2015-03-10 16:08:17 -0700
committerAlex Converse <aconverse@google.com>2015-03-12 16:19:49 -0700
commit1bfacd3529d1297f3af3796f5801f47c0b4c03cb (patch)
treec75ab6137b4e68206a8a4e599265c3fe8307dcad /vp9/encoder/vp9_aq_cyclicrefresh.c
parent791bf5657f330cbbd48668bf3924b990e9a820a0 (diff)
downloadlibvpx-1bfacd3529d1297f3af3796f5801f47c0b4c03cb.tar
libvpx-1bfacd3529d1297f3af3796f5801f47c0b4c03cb.tar.gz
libvpx-1bfacd3529d1297f3af3796f5801f47c0b4c03cb.tar.bz2
libvpx-1bfacd3529d1297f3af3796f5801f47c0b4c03cb.zip
Reconcile active_map and cyclic refresh
Change-Id: Id7f8654aeeb20caa402bc822521b1d72c658f4f9
Diffstat (limited to 'vp9/encoder/vp9_aq_cyclicrefresh.c')
-rw-r--r--vp9/encoder/vp9_aq_cyclicrefresh.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_aq_cyclicrefresh.c b/vp9/encoder/vp9_aq_cyclicrefresh.c
index 44a6f9877..253f2a82d 100644
--- a/vp9/encoder/vp9_aq_cyclicrefresh.c
+++ b/vp9/encoder/vp9_aq_cyclicrefresh.c
@@ -214,14 +214,14 @@ void vp9_cyclic_refresh_update_segment(VP9_COMP *const cpi,
// If this block is labeled for refresh, check if we should reset the
// segment_id.
- if (mbmi->segment_id != CR_SEGMENT_ID_BASE)
+ if (cyclic_refresh_segment_id_boosted(mbmi->segment_id))
mbmi->segment_id = refresh_this_block;
// Update the cyclic refresh map, to be used for setting segmentation map
// for the next frame. If the block will be refreshed this frame, mark it
// as clean. The magnitude of the -ve influences how long before we consider
// it for refresh again.
- if (mbmi->segment_id != CR_SEGMENT_ID_BASE) {
+ if (cyclic_refresh_segment_id_boosted(mbmi->segment_id)) {
new_map_value = -cr->time_for_refresh;
} else if (refresh_this_block) {
// Else if it is accepted as candidate for refresh, and has not already
@@ -252,10 +252,11 @@ void vp9_cyclic_refresh_postencode(VP9_COMP *const cpi) {
int mi_row, mi_col;
cr->actual_num_seg_blocks = 0;
for (mi_row = 0; mi_row < cm->mi_rows; mi_row++)
- for (mi_col = 0; mi_col < cm->mi_cols; mi_col++) {
- if (seg_map[mi_row * cm->mi_cols + mi_col] != CR_SEGMENT_ID_BASE)
- cr->actual_num_seg_blocks++;
- }
+ for (mi_col = 0; mi_col < cm->mi_cols; mi_col++) {
+ if (cyclic_refresh_segment_id_boosted(
+ seg_map[mi_row * cm->mi_cols + mi_col]))
+ cr->actual_num_seg_blocks++;
+ }
}
// Set golden frame update interval, for non-svc 1 pass CBR mode.