From 55834d42cc7d2a5cdcfec8472fd4b88a1f720102 Mon Sep 17 00:00:00 2001 From: Yunqing Wang <yunqingwang@google.com> Date: Tue, 17 Jun 2014 16:59:28 -0700 Subject: [PATCH] Modify non-rd intra mode checking Speed 6 uses small tx size, namely 8x8. max_intra_bsize needs to be modified accordingly to ensure valid intra mode checking. Borg test on RTC set showed an overall PSNR gain of 0.335% in speed -6. This also changes speed -5 encoding by allowing DC_PRED checking for block32x32. Borg test on RTC set showed a slight PSNR gain of 0.145%, and no noticeable speed change. Change-Id: I1502978d8fbe265b3bb235db0f9c35ba0703cd45 --- vp9/encoder/vp9_pickmode.c | 2 +- vp9/encoder/vp9_speed_features.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/vp9/encoder/vp9_pickmode.c b/vp9/encoder/vp9_pickmode.c index 3f4fcd1e1a..9f39b8dd81 100644 --- a/vp9/encoder/vp9_pickmode.c +++ b/vp9/encoder/vp9_pickmode.c @@ -469,7 +469,7 @@ int64_t vp9_pick_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, // Perform intra prediction search, if the best SAD is above a certain // threshold. if (!x->skip && best_rd > inter_mode_thresh && - bsize < cpi->sf.max_intra_bsize) { + bsize <= cpi->sf.max_intra_bsize) { for (this_mode = DC_PRED; this_mode <= DC_PRED; ++this_mode) { vp9_predict_intra_block(xd, 0, b_width_log2(bsize), mbmi->tx_size, this_mode, diff --git a/vp9/encoder/vp9_speed_features.c b/vp9/encoder/vp9_speed_features.c index 6beb872343..83d900d429 100644 --- a/vp9/encoder/vp9_speed_features.c +++ b/vp9/encoder/vp9_speed_features.c @@ -270,6 +270,10 @@ static void set_rt_speed_feature(VP9_COMP *cpi, SPEED_FEATURES *sf, sf->source_var_thresh = 360; sf->tx_size_search_method = USE_TX_8X8; + // TODO(yunqingwang): max_intra_bsize is used to decide if DC_PRED mode + // is checked for a partition block. Later, we can try to allow large + // partitions to do intra mode checking. + sf->max_intra_bsize = BLOCK_8X8; } if (speed >= 7) { -- GitLab