Commit 9b935f99 authored by Jingning Han's avatar Jingning Han Committed by Paul Wilkins
Browse files

Add forward probability model update for partition

Enable forward model update for partition syntax coding.

Change-Id: If47b423b6d12f34614c57f25d235dc9ba688efc5
parent 7f8cbda3
......@@ -475,7 +475,7 @@ static void mb_mode_mv_init(VP9D_COMP *pbi, vp9_reader *r) {
} 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);
......@@ -509,6 +509,11 @@ static void mb_mode_mv_init(VP9D_COMP *pbi, vp9_reader *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);
}
}
......
......@@ -2257,6 +2257,14 @@ void vp9_pack_bitstream(VP9_COMP *cpi, unsigned char *dest,
}
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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment