From: Jason Garrett-Glaser Date: Thu, 4 Feb 2010 02:36:44 +0000 (-0800) Subject: Fix subpel iteration counts with B-frame analysis and subme 6/8 X-Git-Url: http://www.zmx.ovh/git.videolan.org/?a=commitdiff_plain;h=da9b9d33425f0492235129ae8937fa7edd64e0a6;p=x264.git Fix subpel iteration counts with B-frame analysis and subme 6/8 Since subme 6 means "like subme 5, except RD on P-frames", B-frame analysis shouldn't use the RD subpel counts at subme 6. Similarly with subme 8. Slightly faster (and very marginally worse) compression at subme 6 and 8. --- diff --git a/encoder/analyse.c b/encoder/analyse.c index 92d6584f..c15bf8f8 100644 --- a/encoder/analyse.c +++ b/encoder/analyse.c @@ -362,6 +362,8 @@ static void x264_mb_analyse_init( x264_t *h, x264_mb_analysis_t *a, int i_qp ) h->mb.i_me_method = h->param.analyse.i_me_method; h->mb.i_subpel_refine = h->param.analyse.i_subpel_refine; + if( h->sh.i_type == SLICE_TYPE_B && (h->mb.i_subpel_refine == 6 || h->mb.i_subpel_refine == 8) ) + h->mb.i_subpel_refine--; h->mb.b_chroma_me = h->param.analyse.b_chroma_me && h->sh.i_type == SLICE_TYPE_P && h->mb.i_subpel_refine >= 5; h->mb.b_dct_decimate = h->sh.i_type == SLICE_TYPE_B ||