diff options
author | Yaowu Xu <yaowu@google.com> | 2012-03-19 11:03:27 -0700 |
---|---|---|
committer | Yaowu Xu <yaowu@google.com> | 2012-03-21 12:25:44 -0700 |
commit | 2823173ee05e70a5cf20b442a2bbe9702b490ce6 (patch) | |
tree | cc1cab71481e84804cf099bc5af20c49098bdeed /vp8/encoder/ratectrl.c | |
parent | c88d335f7d204bd7529d386c8f30f77b6e81c0ad (diff) | |
download | libvpx-2823173ee05e70a5cf20b442a2bbe9702b490ce6.tar libvpx-2823173ee05e70a5cf20b442a2bbe9702b490ce6.tar.gz libvpx-2823173ee05e70a5cf20b442a2bbe9702b490ce6.tar.bz2 libvpx-2823173ee05e70a5cf20b442a2bbe9702b490ce6.zip |
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
Diffstat (limited to 'vp8/encoder/ratectrl.c')
-rw-r--r-- | vp8/encoder/ratectrl.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; |