From 6910f178f1ca405157390abd6525d0bc81bcafb6 Mon Sep 17 00:00:00 2001 From: Jingning Han Date: Sat, 11 May 2013 15:19:56 -0700 Subject: Use consistent partition context setup in enc/dec Move set_partition_seg_context_ to common file. Use consistent context setup conditions for partition probability model update at encoder and decoder. Change-Id: I24b7ed3b1c48e3d2568191a46b70136b99b67b1a --- vp9/encoder/vp9_bitstream.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'vp9/encoder/vp9_bitstream.c') diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 0c3d225c8..9222133ce 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -915,12 +915,11 @@ static void write_modes_sb(VP9_COMP *cpi, MODE_INFO *m, vp9_writer *bc, } // update partition context - if ((partition == PARTITION_SPLIT) && (bsize > BLOCK_SIZE_MB16X16)) - return; - - xd->left_seg_context = cm->left_seg_context + (mi_row & MI_MASK); - xd->above_seg_context = cm->above_seg_context + mi_col; - update_partition_context(xd, subsize, bsize); + if (bsize > BLOCK_SIZE_SB8X8 && + (bsize == BLOCK_SIZE_MB16X16 || partition != PARTITION_SPLIT)) { + set_partition_seg_context(cm, xd, mi_row, mi_col); + update_partition_context(xd, subsize, bsize); + } } static void write_modes(VP9_COMP *cpi, vp9_writer* const bc, -- cgit v1.2.3