summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorJingning Han <jingning@google.com>2013-09-23 17:06:27 -0700
committerYaowu Xu <yaowu@google.com>2013-10-28 16:31:21 -0700
commit4beb889f99a4fb58bd4ca340cfddf9819a7fe5b8 (patch)
tree2e6e59fc97c1522b0c763b6eb27a31e07fb00657 /vp9
parenta7b7f94ae8c4208d447413f466f5ff8b177695bf (diff)
downloadlibvpx-4beb889f99a4fb58bd4ca340cfddf9819a7fe5b8.tar.gz
Remove redundant mode update in sub8x8 decoding
The probability model used to code prediction mode is conditioned on the immediate above and left 8x8 blocks' prediction modes. When the above/left block is coded in sub8x8 mode, we use the prediction mode of the bottom-right sub8x8 block as the reference to generate the context. This commit moves the update of mbmi.mode out of the sub8x8 decoding loop, hence removing redundant update steps and keeping the bottom- right block's mode for the decoding process of next blocks. Change-Id: I1e8d749684d201c1a1151697621efa5d569218b6
Diffstat (limited to 'vp9')
-rw-r--r--vp9/decoder/vp9_decodemv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/vp9/decoder/vp9_decodemv.c b/vp9/decoder/vp9_decodemv.c
index 84a29b17a..dc12876b1 100644
--- a/vp9/decoder/vp9_decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -493,11 +493,12 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
const int num_4x4_w = num_4x4_blocks_wide_lookup[bsize]; // 1 or 2
const int num_4x4_h = num_4x4_blocks_high_lookup[bsize]; // 1 or 2
int idx, idy;
+ int b_mode;
for (idy = 0; idy < 2; idy += num_4x4_h) {
for (idx = 0; idx < 2; idx += num_4x4_w) {
int_mv blockmv, secondmv;
const int j = idy * 2 + idx;
- const int b_mode = read_inter_mode(cm, r, inter_mode_ctx);
+ b_mode = read_inter_mode(cm, r, inter_mode_ctx);
if (b_mode == NEARESTMV || b_mode == NEARMV) {
vp9_append_sub8x8_mvs_for_idx(cm, xd, &nearest, &nearby, j, 0,
@@ -544,10 +545,10 @@ static void read_inter_block_mode_info(VP9D_COMP *pbi, MODE_INFO *mi,
mi->bmi[j + 2] = mi->bmi[j];
if (num_4x4_w == 2)
mi->bmi[j + 1] = mi->bmi[j];
- mi->mbmi.mode = b_mode;
}
}
+ mi->mbmi.mode = b_mode;
mv0->as_int = mi->bmi[3].as_mv[0].as_int;
mv1->as_int = mi->bmi[3].as_mv[1].as_int;
} else {