summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-02-23 08:28:43 -0800
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-02-23 08:28:43 -0800
commit092f32cf784b3972296219aaa0f0e4ae8c69eb92 (patch)
tree9a1db1c1d008b1c7abe3c42ba254eff5067ff113
parent2aacc66b66a3813fb00a255755f662edf8dbabe5 (diff)
parentea53d6c15fde3760d232f0bf953b3fb5db5e4f57 (diff)
downloadlibvpx-092f32cf784b3972296219aaa0f0e4ae8c69eb92.tar
libvpx-092f32cf784b3972296219aaa0f0e4ae8c69eb92.tar.gz
libvpx-092f32cf784b3972296219aaa0f0e4ae8c69eb92.tar.bz2
libvpx-092f32cf784b3972296219aaa0f0e4ae8c69eb92.zip
Merge "Combining if-else branches from different conditions."
-rw-r--r--vp9/encoder/vp9_encodeframe.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index 28942f7d6..400a04716 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -2724,6 +2724,7 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
vp9_encode_intra_block_plane(x, MAX(bsize, BLOCK_8X8), plane);
if (output_enabled)
sum_intra_stats(&cm->counts, mi);
+ vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
} else {
int ref;
const int is_compound = has_second_ref(mbmi);
@@ -2733,19 +2734,17 @@ static void encode_superblock(VP9_COMP *cpi, TOKENEXTRA **t, int output_enabled,
setup_pre_planes(xd, ref, cfg, mi_row, mi_col, &xd->block_refs[ref]->sf);
}
vp9_build_inter_predictors_sb(xd, mi_row, mi_col, MAX(bsize, BLOCK_8X8));
- }
- if (!is_inter_block(mbmi)) {
- vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
- } else if (!x->skip) {
- mbmi->skip = 1;
- vp9_encode_sb(x, MAX(bsize, BLOCK_8X8));
- vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
- } else {
- mbmi->skip = 1;
- if (output_enabled)
- cm->counts.skip[vp9_get_skip_context(xd)][1]++;
- reset_skip_context(xd, MAX(bsize, BLOCK_8X8));
+ if (!x->skip) {
+ mbmi->skip = 1;
+ vp9_encode_sb(x, MAX(bsize, BLOCK_8X8));
+ vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
+ } else {
+ mbmi->skip = 1;
+ if (output_enabled)
+ cm->counts.skip[vp9_get_skip_context(xd)][1]++;
+ reset_skip_context(xd, MAX(bsize, BLOCK_8X8));
+ }
}
if (output_enabled) {