From 3db6c9da402858abfcbe4aaf676a1b1f89e7f093 Mon Sep 17 00:00:00 2001 From: Anton Mitrofanov Date: Fri, 28 Aug 2009 15:07:12 -0700 Subject: [PATCH] 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. --- encoder/analyse.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; -- 2.47.3