ref: 9b935f99926d346d1034217dadf62b6545655472
parent: 7f8cbda333647b3b4fb8186b9e5ce54840a2c481
author: Jingning Han <jingning@google.com>
date: Fri Apr 26 17:52:53 EDT 2013
Add forward probability model update for partition Enable forward model update for partition syntax coding. Change-Id: If47b423b6d12f34614c57f25d235dc9ba688efc5
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -475,7 +475,7 @@
} else {
nmv_context *const nmvc = &pbi->common.fc.nmvc;
MACROBLOCKD *const xd = &pbi->mb;
- int i;
+ int i, j;
if (cm->mcomp_filter_type == SWITCHABLE)
read_switchable_interp_probs(pbi, r);
@@ -508,6 +508,11 @@
if (vp9_read_bit(r))
for (i = 0; i < VP9_I32X32_MODES - 1; ++i)
cm->fc.sb_ymode_prob[i] = vp9_read_prob(r);
+
+ for (j = 0; j < NUM_PARTITION_CONTEXTS; ++j)
+ if (vp9_read_bit(r))
+ for (i = 0; i < PARTITION_TYPES - 1; ++i)
+ cm->fc.partition_prob[j][i] = vp9_read_prob(r);
read_nmvprobs(r, nmvc, xd->allow_high_precision_mv);
}
--- a/vp9/encoder/vp9_bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -2257,6 +2257,14 @@
}
update_mbintra_mode_probs(cpi, &header_bc);
+ for (i = 0; i < NUM_PARTITION_CONTEXTS; ++i) {
+ vp9_prob Pnew[PARTITION_TYPES - 1];
+ unsigned int bct[PARTITION_TYPES - 1][2];
+ update_mode(&header_bc, PARTITION_TYPES, vp9_partition_encodings,
+ vp9_partition_tree, Pnew, pc->fc.partition_prob[i], bct,
+ (unsigned int *)cpi->partition_count[i]);
+ }
+
vp9_write_nmv_probs(cpi, xd->allow_high_precision_mv, &header_bc);
}
--
⑨