summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco <marpan@google.com>2014-12-11 15:21:17 -0800
committerMarco <marpan@google.com>2014-12-11 15:36:16 -0800
commit7e99cd2a9b7ecc3cbb5ca83d5c8ec696f0ea7293 (patch)
tree4f2a00d2c794c4022440451d28a0f14291b915fc
parent811c74cdfa609bf3774e9c68c2c4e9efd5a190e5 (diff)
downloadlibvpx-7e99cd2a9b7ecc3cbb5ca83d5c8ec696f0ea7293.tar
libvpx-7e99cd2a9b7ecc3cbb5ca83d5c8ec696f0ea7293.tar.gz
libvpx-7e99cd2a9b7ecc3cbb5ca83d5c8ec696f0ea7293.tar.bz2
libvpx-7e99cd2a9b7ecc3cbb5ca83d5c8ec696f0ea7293.zip
Allow for 4x4 prediction blocks for key frame, speed 6.
For key frame under variance source partition: 4x4 prediction blocks may be selected when variance of 8x8 block is very high (threshold is set fairly high for now). Testing on some RTC clips shows this helps to reduce some ringing artifacts on key frame. Encoded key frame size increases about ~10%. Key frame PSNR increases about ~0.1-0.2dB. Change-Id: I56e203fac32ea6ef69897fb3ea269c59cb50d174
-rw-r--r--vp9/encoder/vp9_encodeframe.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/vp9/encoder/vp9_encodeframe.c b/vp9/encoder/vp9_encodeframe.c
index b09f238cc..2a69ea540 100644
--- a/vp9/encoder/vp9_encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -423,8 +423,9 @@ static int set_vt_partitioning(VP9_COMP *cpi,
if (cm->frame_type == KEY_FRAME) {
bsize_ref = BLOCK_8X8;
- // Choose lower thresholds for key frame variance to favor split.
- threshold_bsize_ref = threshold >> 1;
+ // Choose lower thresholds for key frame variance to favor split, but keep
+ // threshold for splitting to 4x4 block still fairly high for now.
+ threshold_bsize_ref = threshold << 2;
threshold_low = threshold >> 2;
}
@@ -646,8 +647,6 @@ static void choose_partitioning(VP9_COMP *cpi,
for (k = 0; k < 4; ++k) {
const int x8_idx = (k & 1);
const int y8_idx = (k >> 1);
- // TODO(marpan): Allow for setting 4x4 partition on key frame.
- /*
if (cm->frame_type == KEY_FRAME) {
if (!set_vt_partitioning(cpi, xd,
&vt.split[i].split[j].split[k],
@@ -660,12 +659,11 @@ static void choose_partitioning(VP9_COMP *cpi,
BLOCK_4X4);
}
} else {
- */
set_block_size(cpi, xd,
(mi_row + y32_idx + y16_idx + y8_idx),
(mi_col + x32_idx + x16_idx + x8_idx),
BLOCK_8X8);
- // }
+ }
}
}
}