From 2823173ee05e70a5cf20b442a2bbe9702b490ce6 Mon Sep 17 00:00:00 2001 From: Yaowu Xu Date: Mon, 19 Mar 2012 11:03:27 -0700 Subject: enable 8x8 transform for MBs in intra frames When ac_yquant>171, a key frame is enabled to use 8x8 transform. In such case, MBs with DC_PRED or TM_PRED are selected to use T8x8. This change helped the full STD-HD set by ~.1% or so, which is reasonable considering how often key frame occurs in these encodings. Change-Id: Id17009ef6327252177b19e6bf0d6628827febaf1 --- vp8/encoder/ratectrl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'vp8/encoder/ratectrl.c') diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c index 0a9f12a31..a57996612 100644 --- a/vp8/encoder/ratectrl.c +++ b/vp8/encoder/ratectrl.c @@ -241,9 +241,15 @@ void vp8_setup_key_frame(VP8_COMP *cpi) vpx_memset(cpi->common.fc.pre_mvc_hp, 0, sizeof(cpi->common.fc.pre_mvc_hp)); //initialize pre_mvc to all zero. #endif - cpi->common.txfm_mode = ONLY_4X4; + if( cpi->common.Width * cpi->common.Height > 640*360 + && vp8_ac_yquant(cpi->common.base_qindex) > 171) + cpi->common.txfm_mode = ALLOW_8X8; + else + cpi->common.txfm_mode = ONLY_4X4; + + //cpi->common.filter_level = 0; // Reset every key frame. cpi->common.filter_level = cpi->common.base_qindex * 3 / 8 ; @@ -280,7 +286,6 @@ void vp8_setup_inter_frame(VP8_COMP *cpi) { if(cpi->common.Width * cpi->common.Height > 640*360) - //||cpi->this_frame_target < 7 * cpi->common.MBs) cpi->common.txfm_mode = ALLOW_8X8; else cpi->common.txfm_mode = ONLY_4X4; -- cgit v1.2.3