summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_bitstream.c
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2013-05-11 15:19:56 -0700
committerJingning Han <jingning@google.com>2013-05-11 15:22:13 -0700
commit6910f178f1ca405157390abd6525d0bc81bcafb6 (patch)
tree5ea9ee11a29074f087e61e2afddaeac459775235 /vp9/encoder/vp9_bitstream.c
parent4c2c350309d65b1e46454464c87040bc60a03b8b (diff)
downloadlibvpx-6910f178f1ca405157390abd6525d0bc81bcafb6.tar
libvpx-6910f178f1ca405157390abd6525d0bc81bcafb6.tar.gz
libvpx-6910f178f1ca405157390abd6525d0bc81bcafb6.tar.bz2
libvpx-6910f178f1ca405157390abd6525d0bc81bcafb6.zip
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
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r--vp9/encoder/vp9_bitstream.c11
1 files changed, 5 insertions, 6 deletions
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,