summaryrefslogtreecommitdiff
path: root/vp9/decoder
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2013-06-06 15:33:57 -0700
committerJingning Han <jingning@google.com>2013-06-07 14:19:40 -0700
commit78b8190cc71a7d4110aafde39e49a24cdb8168ea (patch)
treebdcc07ebab341511f8e0f6f6dcb5beb07d09ed2f /vp9/decoder
parent6462afe0889215041099e064954f0c52df929b11 (diff)
downloadlibvpx-78b8190cc71a7d4110aafde39e49a24cdb8168ea.tar
libvpx-78b8190cc71a7d4110aafde39e49a24cdb8168ea.tar.gz
libvpx-78b8190cc71a7d4110aafde39e49a24cdb8168ea.tar.bz2
libvpx-78b8190cc71a7d4110aafde39e49a24cdb8168ea.zip
Handle partition type coding of boundary blocks
The partition types of blocks sitting on the frame boundary are constrained by the block size and the position of each sub-block relative to the frame. Hence we use truncated probability models to handle the coding of such information. 100 frames run: yt 0.138% Change-Id: I85d9b45665c15280069c0234ea6f778af586d87d
Diffstat (limited to 'vp9/decoder')
-rw-r--r--vp9/decoder/vp9_decodframe.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c
index aacdad528..1d9233c88 100644
--- a/vp9/decoder/vp9_decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -469,12 +469,21 @@ static void decode_modes_sb(VP9D_COMP *pbi, int mi_row, int mi_col,
if (bsize >= BLOCK_SIZE_SB8X8) {
int pl;
+ int idx = check_bsize_coverage(pc, xd, mi_row, mi_col, bsize);
// read the partition information
xd->left_seg_context = pc->left_seg_context + (mi_row & MI_MASK);
xd->above_seg_context = pc->above_seg_context + mi_col;
pl = partition_plane_context(xd, bsize);
- partition = treed_read(r, vp9_partition_tree,
- pc->fc.partition_prob[pc->frame_type][pl]);
+
+ if (idx == 0)
+ partition = treed_read(r, vp9_partition_tree,
+ pc->fc.partition_prob[pc->frame_type][pl]);
+ else if (idx > 0 &&
+ !vp9_read(r, pc->fc.partition_prob[pc->frame_type][pl][idx]))
+ partition = (idx == 1) ? PARTITION_HORZ : PARTITION_VERT;
+ else
+ partition = PARTITION_SPLIT;
+
pc->fc.partition_counts[pl][partition]++;
}