summaryrefslogtreecommitdiff
path: root/vp9/encoder/vp9_speed_features.c
diff options
context:
space:
mode:
authorPaul Wilkins <paulwilkins@google.com>2015-05-30 00:56:19 +0100
committerpaulwilkins <paulwilkins@google.com>2015-06-09 14:50:44 +0100
commit4a28da58434d364337d9a6724e9ae79e0e264bd7 (patch)
tree20c15a3a27f23f1181e1793a8a4d2dfc3a2467e5 /vp9/encoder/vp9_speed_features.c
parentb19b16cfa1fe0275c82dadc78c4dcbb8a1f8da36 (diff)
downloadlibvpx-4a28da58434d364337d9a6724e9ae79e0e264bd7.tar
libvpx-4a28da58434d364337d9a6724e9ae79e0e264bd7.tar.gz
libvpx-4a28da58434d364337d9a6724e9ae79e0e264bd7.tar.bz2
libvpx-4a28da58434d364337d9a6724e9ae79e0e264bd7.zip
Enable more split modes for animated content.
For content that is identified as likely to contain some animation or graphics content, increase the availability of split modes for good quality speeds 1-3. On a problem test animation clip this improves metrics results by about 0.25 db and makes a noticeable difference visually. It also causes a small drop in file size (~0.5%) but a rise in encode time of about 5-6% at speed 2. For more normal content it should have no effect. Change-Id: Ic4cd9a8de065af9f9402f4477a17442aebf0e439
Diffstat (limited to 'vp9/encoder/vp9_speed_features.c')
-rw-r--r--vp9/encoder/vp9_speed_features.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c
index 39a4c818f..6c6c4ed30 100644
--- a/vp9/encoder/vp9_speed_features.c
+++ b/vp9/encoder/vp9_speed_features.c
@@ -41,9 +41,11 @@ static BLOCK_SIZE set_partition_min_limit(VP9_COMMON *const cm) {
}
}
-static void set_good_speed_feature_framesize_dependent(VP9_COMMON *cm,
+static void set_good_speed_feature_framesize_dependent(VP9_COMP *cpi,
SPEED_FEATURES *sf,
int speed) {
+ VP9_COMMON *const cm = &cpi->common;
+
if (speed >= 1) {
if (MIN(cm->width, cm->height) >= 720) {
sf->disable_split_mask = cm->show_frame ? DISABLE_ALL_SPLIT
@@ -85,6 +87,13 @@ static void set_good_speed_feature_framesize_dependent(VP9_COMMON *cm,
}
}
+ // If this is a two pass clip that fits the criteria for animated or
+ // graphics content then reset disable_split_mask for speeds 1-4.
+ if ((speed >= 1) && (cpi->oxcf.pass == 2) &&
+ (cpi->twopass.fr_content_type == FC_GRAPHICS_ANIMATION)) {
+ sf->disable_split_mask = DISABLE_COMPOUND_SPLIT;
+ }
+
if (speed >= 4) {
if (MIN(cm->width, cm->height) >= 720) {
sf->partition_search_breakout_dist_thr = (1 << 26);
@@ -382,7 +391,6 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf,
void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) {
SPEED_FEATURES *const sf = &cpi->sf;
- VP9_COMMON *const cm = &cpi->common;
const VP9EncoderConfig *const oxcf = &cpi->oxcf;
RD_OPT *const rd = &cpi->rd;
int i;
@@ -390,7 +398,7 @@ void vp9_set_speed_features_framesize_dependent(VP9_COMP *cpi) {
if (oxcf->mode == REALTIME) {
set_rt_speed_feature_framesize_dependent(cpi, sf, oxcf->speed);
} else if (oxcf->mode == GOOD) {
- set_good_speed_feature_framesize_dependent(cm, sf, oxcf->speed);
+ set_good_speed_feature_framesize_dependent(cpi, sf, oxcf->speed);
}
if (sf->disable_split_mask == DISABLE_ALL_SPLIT) {