From d9b6077d2be991628670c6e2780a403820fa5de7 Mon Sep 17 00:00:00 2001 From: Fiona Glaser Date: Wed, 3 Feb 2010 18:36:44 -0800 Subject: [PATCH] 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. --- encoder/analyse.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/encoder/analyse.c b/encoder/analyse.c index 96d95e53..9d900733 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 || -- 2.40.0