summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Paniconi <marpan@google.com>2014-03-25 10:33:02 -0700
committerMarco Paniconi <marpan@google.com>2014-03-25 16:40:48 -0700
commiteeed7e2953c79ce60b865578ae3ed94760a5c4a5 (patch)
tree8f64e3aca3ec2e42d1f91974fd8d6ed4ee512d3d
parentca6151f132d318d6dabe454483fe8f8895449211 (diff)
downloadlibvpx-eeed7e2953c79ce60b865578ae3ed94760a5c4a5.tar
libvpx-eeed7e2953c79ce60b865578ae3ed94760a5c4a5.tar.gz
libvpx-eeed7e2953c79ce60b865578ae3ed94760a5c4a5.tar.bz2
libvpx-eeed7e2953c79ce60b865578ae3ed94760a5c4a5.zip
Fix to cylcic refresh: use correct/chosen mode for update_segment.
Fix so that vp9_update_segment_aq() will use the correct (i..e, chosen) encoding mode (from ctx struct) in update_state. Change-Id: Icc4b66f3935fad5ec4516a4d57e843d12c365e64
-rw-r--r--vp9/encoder/vp9_encodeframe.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 1604ba9ae..90d138969 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -896,22 +896,17 @@ static void update_state(VP9_COMP *cpi, PICK_MODE_CONTEXT *ctx,
assert(mi->mbmi.sb_type == bsize);
- // For in frame adaptive Q copy over the chosen segment id into the
- // mode innfo context for the chosen mode / partition.
- if ((cpi->oxcf.aq_mode == COMPLEXITY_AQ ||
- cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) &&
+ *mi_addr = *mi;
+
+ // For in frame adaptive Q, check for reseting the segment_id and updating
+ // the cyclic refresh map.
+ if ((cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ) && seg->enabled &&
output_enabled) {
- // Check for reseting segment_id and update cyclic map.
- if (cpi->oxcf.aq_mode == CYCLIC_REFRESH_AQ && seg->enabled) {
- vp9_update_segment_aq(cpi, &xd->mi_8x8[0]->mbmi,
- mi_row, mi_col, bsize, 1);
- vp9_init_plane_quantizers(cpi, x);
- }
- mi->mbmi.segment_id = xd->mi_8x8[0]->mbmi.segment_id;
+ vp9_update_segment_aq(cpi, &xd->mi_8x8[0]->mbmi,
+ mi_row, mi_col, bsize, 1);
+ vp9_init_plane_quantizers(cpi, x);
}
- *mi_addr = *mi;
-
max_plane = is_inter_block(mbmi) ? MAX_MB_PLANE : 1;
for (i = 0; i < max_plane; ++i) {
p[i].coeff = ctx->coeff_pbuf[i][1];