From: Anton Mitrofanov Date: Fri, 28 Aug 2009 22:07:12 +0000 (-0700) Subject: Fix bug in intra analysis in B-frames X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=3db6c9da402858abfcbe4aaf676a1b1f89e7f093;p=x264.git Fix bug in intra analysis in B-frames i8x8/i4x4 never got analysed when fast_intra was toggled and RD was off; up to a 2-3% quality improvement in non-RD mode. With this bug dating back to r369, this is probably the second-oldest bug ever fixed in x264. --- diff --git a/encoder/analyse.c b/encoder/analyse.c index 552ad5f6..a2e64fe4 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -2669,7 +2669,7 @@ int x264_macroblock_analyse( x264_t *h ) const unsigned int flags = h->param.analyse.inter; int i_type; int i_partition; - int i_satd_inter = 0; // shut up uninitialized warning + int i_satd_inter; h->mb.b_skip_mc = 0; if( x264_mb_analyse_load_costs( h, &analysis ) ) @@ -2814,9 +2814,10 @@ int x264_macroblock_analyse( x264_t *h ) } } + i_satd_inter = i_cost; + if( analysis.i_mbrd ) { - i_satd_inter = i_cost; x264_mb_analyse_b_rd( h, &analysis, i_satd_inter ); i_type = B_SKIP; i_cost = i_bskip_cost;