From: Loren Merritt Date: Thu, 3 Nov 2005 22:57:52 +0000 (+0000) Subject: if p16x16 RD decides to code a MB as p_skip, then don't check smaller partitions. X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=1e80b69b3717e019f6cbab071582f9812b85fa4d;p=x264.git if p16x16 RD decides to code a MB as p_skip, then don't check smaller partitions. git-svn-id: svn://svn.videolan.org/x264/trunk@361 df754926-b1dd-0310-bc7b-ec298dee348c --- diff --git a/encoder/analyse.c b/encoder/analyse.c index 1869a145..cdf785a4 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -1686,6 +1686,10 @@ void x264_macroblock_analyse( x264_t *h ) x264_mb_analyse_load_costs( h, &analysis ); x264_mb_analyse_inter_p16x16( h, &analysis ); + + if( analysis.b_mbrd && h->mb.i_type == P_SKIP ) + return; + if( flags & X264_ANALYSE_PSUB16x16 ) { if( h->param.analyse.b_mixed_references ) diff --git a/encoder/rdo.c b/encoder/rdo.c index 988b4d4e..c596271e 100644 --- a/encoder/rdo.c +++ b/encoder/rdo.c @@ -49,8 +49,6 @@ static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) { - // backup mb_type because x264_macroblock_encode may change it to skip - int i_type_bak = h->mb.i_type; int b_transform_bak = h->mb.b_transform_8x8; int i_ssd; int i_bits; @@ -82,7 +80,7 @@ static int x264_rd_cost_mb( x264_t *h, int i_lambda2 ) x264_macroblock_size_cavlc( h, &bs_tmp ); i_bits = bs_tmp.i_bits_encoded * i_lambda2; } - h->mb.i_type = i_type_bak; + h->mb.b_transform_8x8 = b_transform_bak; return i_ssd + i_bits;