summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2015-12-02 17:15:41 -0800
committerMarco <marpan@google.com>2015-12-04 09:24:28 -0800
commit6490fc71a75679d0a7d4cb20c15c7e8020c0050e (patch)
tree6ad32d501b22e22922217874ba8c015f38defa77 /vp9
parent623e988addfa8add7a21c69aa893ba42f7d5236e (diff)
downloadlibvpx-6490fc71a75679d0a7d4cb20c15c7e8020c0050e.tar
libvpx-6490fc71a75679d0a7d4cb20c15c7e8020c0050e.tar.gz
libvpx-6490fc71a75679d0a7d4cb20c15c7e8020c0050e.tar.bz2
libvpx-6490fc71a75679d0a7d4cb20c15c7e8020c0050e.zip
Non-rd partition: Use force split on 16x16 for low resolutions.
For low resolutions, whem 4x4downsample is used for variance, use the same force split (that is used for 8x8downsample) for 16x16 blocks. No change in metrics. Small improvement visually. Change-Id: I915b9895902d0b9a41e75d37fee1bf3714d2366d
Diffstat (limited to 'vp9')
-rw-r--r--vp9/encoder/vp9_encodeframe.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index e9b62bbc5..17ba95652 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -401,7 +401,6 @@ static int set_vt_partitioning(VP9_COMP *cpi,
variance_node vt;
const int block_width = num_8x8_blocks_wide_lookup[bsize];
const int block_height = num_8x8_blocks_high_lookup[bsize];
- const int low_res = (cm->width <= 352 && cm->height <= 288);
assert(block_height == block_width);
tree_to_node(data, bsize, &vt);
@@ -414,7 +413,7 @@ static int set_vt_partitioning(VP9_COMP *cpi,
// No check for vert/horiz split as too few samples for variance.
if (bsize == bsize_min) {
// Variance already computed to set the force_split.
- if (low_res || cm->frame_type == KEY_FRAME)
+ if (cm->frame_type == KEY_FRAME)
get_variance(&vt.part_variances->none);
if (mi_col + block_width / 2 < cm->mi_cols &&
mi_row + block_height / 2 < cm->mi_rows &&
@@ -425,7 +424,7 @@ static int set_vt_partitioning(VP9_COMP *cpi,
return 0;
} else if (bsize > bsize_min) {
// Variance already computed to set the force_split.
- if (low_res || cm->frame_type == KEY_FRAME)
+ if (cm->frame_type == KEY_FRAME)
get_variance(&vt.part_variances->none);
// For key frame: take split for bsize above 32X32 or very high variance.
if (cm->frame_type == KEY_FRAME &&
@@ -897,6 +896,14 @@ static int choose_partitioning(VP9_COMP *cpi,
for (m = 0; m < 4; m++)
fill_variance_tree(&vtemp->split[m], BLOCK_8X8);
fill_variance_tree(vtemp, BLOCK_16X16);
+ // If variance of this 16x16 block is above the threshold, force block
+ // to split. This also forces a split on the upper levels.
+ get_variance(&vtemp->part_variances.none);
+ if (vtemp->part_variances.none.variance > thresholds[2]) {
+ force_split[5 + i2 + j] = 1;
+ force_split[i + 1] = 1;
+ force_split[0] = 1;
+ }
}
}
fill_variance_tree(&vt.split[i], BLOCK_32X32);