From 6c0b21c0751471082895f8fe45198407ee62b7fa Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Mon, 2 Jul 2012 11:13:18 -0700 Subject: [PATCH] Use 8x8 transform for all 16x16 intra prediction modes in keyframes. Also use the 8x8 transform in the RD loop. Change-Id: If1a25aa15d3f64e05c9a31875e309d8cd5bc812d --- vp8/decoder/decodframe.c | 4 ++-- vp8/encoder/encodeframe.c | 4 ++-- vp8/encoder/rdopt.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/vp8/decoder/decodframe.c b/vp8/decoder/decodframe.c index 4d6ebbe..50b6cf9 100644 --- a/vp8/decoder/decodframe.c +++ b/vp8/decoder/decodframe.c @@ -233,8 +233,8 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd, if(pbi->common.frame_type == KEY_FRAME) { if( pbi->common.txfm_mode==ALLOW_8X8 && - (xd->mode_info_context->mbmi.mode == DC_PRED - ||xd->mode_info_context->mbmi.mode == TM_PRED)) + xd->mode_info_context->mbmi.mode != I8X8_PRED && + xd->mode_info_context->mbmi.mode != B_PRED) xd->mode_info_context->mbmi.txfm_size = TX_8X8; else xd->mode_info_context->mbmi.txfm_size = TX_4X4; diff --git a/vp8/encoder/encodeframe.c b/vp8/encoder/encodeframe.c index 3e55190..8b1ed0b 100644 --- a/vp8/encoder/encodeframe.c +++ b/vp8/encoder/encodeframe.c @@ -1598,8 +1598,8 @@ void vp8cx_encode_intra_macro_block(VP8_COMP *cpi, /* test code: set transform size based on mode selection */ if(cpi->common.txfm_mode == ALLOW_8X8 - && ( x->e_mbd.mode_info_context->mbmi.mode == DC_PRED - || x->e_mbd.mode_info_context->mbmi.mode == TM_PRED)) + && x->e_mbd.mode_info_context->mbmi.mode != I8X8_PRED + && x->e_mbd.mode_info_context->mbmi.mode != B_PRED) { x->e_mbd.mode_info_context->mbmi.txfm_size = TX_8X8; cpi->t8x8_count++; diff --git a/vp8/encoder/rdopt.c b/vp8/encoder/rdopt.c index e24e33e..47f13ce 100644 --- a/vp8/encoder/rdopt.c +++ b/vp8/encoder/rdopt.c @@ -1093,7 +1093,7 @@ static int rd_pick_intra16x16mby_mode(VP8_COMP *cpi, } #endif - macro_block_yrd(x, &ratey, &distortion, IF_RTCD(&cpi->rtcd)); + macro_block_yrd_8x8(x, &ratey, &distortion, IF_RTCD(&cpi->rtcd)); // FIXME add compoundmode cost // FIXME add rate for mode2 rate = ratey + x->mbmode_cost[x->e_mbd.frame_type] -- 2.7.4