ref: 1bf0beb5fc00d2fd7a80bd1de0f135e45404d941
parent: 89ffda0ddf6c8abc044b308cf36dcec883b36977
author: Yunqing Wang <[email protected]>
date: Fri Sep 12 11:58:17 EDT 2014
Refactor encode_superblock function The code covers both x->skip=0 & x->skip=1 cases. Change-Id: I09745c10e5994dc700ae4c01b4b62979cdaf3306
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -3617,16 +3617,8 @@
vp9_build_inter_predictors_sbuv(xd, mi_row, mi_col, 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 && !seg_skip)
- cm->counts.skip[vp9_get_skip_context(xd)][1]++;
- reset_skip_context(xd, MAX(bsize, BLOCK_8X8));
- }
+ vp9_encode_sb(x, MAX(bsize, BLOCK_8X8));
+ vp9_tokenize_sb(cpi, t, !output_enabled, MAX(bsize, BLOCK_8X8));
}
if (output_enabled) {
--- a/vp9/encoder/vp9_encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -563,6 +563,11 @@
struct encode_b_args arg = {x, &ctx, &mbmi->skip};
int plane;
+ mbmi->skip = 1;
+
+ if (x->skip)
+ return;
+
for (plane = 0; plane < MAX_MB_PLANE; ++plane) {
if (!x->skip_recode)
vp9_subtract_plane(x, bsize, plane);