summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_encodeframe.c
diff options
context:
space:
mode:
authorYunqing Wang <yunqingwang@google.com>2014-11-13 13:38:23 -0800
committerYunqing Wang <yunqingwang@google.com>2014-11-13 15:05:46 -0800
commit8ee605f188e97835b28c549f2423c74079d7c466 (patch)
treefd65fefc55b26377c32284ee1aaeb1a658393654 /vp9/encoder/vp9_encodeframe.c
parent7621a19aa53c7b26b4bf4ba30f2c7f65f8503f9d (diff)
downloadlibvpx-8ee605f188e97835b28c549f2423c74079d7c466.tar
libvpx-8ee605f188e97835b28c549f2423c74079d7c466.tar.gz
libvpx-8ee605f188e97835b28c549f2423c74079d7c466.tar.bz2
libvpx-8ee605f188e97835b28c549f2423c74079d7c466.zip
vp9_ethread: modify the cyclic refresh struct
Two members in struct CYCLIC_REFRESH int64_t projected_rate_sb; int64_t projected_dist_sb; are updated at the superblock level, which makes them shared data in the multi-thread situation, and requires extra work to handle them. However, those values are updated and used immediately, and therefore can be removed. This patch cleaned up the code and removed the two members. Change-Id: I2c6ee4552bf49fb63ce590cdb47f9723974fffb1
Diffstat (limited to 'vp9/encoder/vp9_encodeframe.c')
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 7660299d0..a977a4a79 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -641,11 +641,8 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
// Else for cyclic refresh mode update the segment map, set the segment id
// and then update the quantizer.
if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) {
-
- vp9_cyclic_refresh_set_rate_and_dist_sb(cpi->cyclic_refresh,
- ctx->rate, ctx->dist);
vp9_cyclic_refresh_update_segment(cpi, &xd->mi[0].src_mi->mbmi,
- mi_row, mi_col, bsize, 1);
+ mi_row, mi_col, bsize, 1, ctx->rate);
}
}
@@ -1310,10 +1307,9 @@ static void update_state_rt(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
: cm->last_frame_seg_map;
mbmi->segment_id = vp9_get_segment_id(cm, map, bsize, mi_row, mi_col);
} else {
- vp9_cyclic_refresh_set_rate_and_dist_sb(cpi->cyclic_refresh,
- ctx->rate, ctx->dist);
// Setting segmentation map for cyclic_refresh
- vp9_cyclic_refresh_update_segment(cpi, mbmi, mi_row, mi_col, bsize, 1);
+ vp9_cyclic_refresh_update_segment(cpi, mbmi, mi_row, mi_col, bsize, 1,
+ ctx->rate);
}
vp9_init_plane_quantizers(cpi, x);
}