From: Robert Swain Date: Wed, 21 Jul 2010 13:59:12 +0000 (+0200) Subject: x264enc: Use new libx264 API to affect fast first pass X-Git-Tag: 1.19.3~505^2~1068 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6f766d10f2b7162bdcf45294a83260075261a3f;p=platform%2Fupstream%2Fgstreamer.git x264enc: Use new libx264 API to affect fast first pass Uses new x264 API to apply reduced complexity values to the parameters to increase encoding speed in the first pass of a multi-pass encode. This does not impact on final quality. Addresses part of bug #607798 --- diff --git a/ext/x264/gstx264enc.c b/ext/x264/gstx264enc.c index e66249ed07..4174a662c6 100644 --- a/ext/x264/gstx264enc.c +++ b/ext/x264/gstx264enc.c @@ -852,16 +852,20 @@ gst_x264_enc_init_encoder (GstX264Enc * encoder) encoder->x264param.rc.b_stat_write = 0; break; case 1: - /* Turbo mode parameters. */ - encoder->x264param.i_frame_reference = (encoder->ref + 1) >> 1; - encoder->x264param.analyse.i_subpel_refine = - CLAMP (encoder->subme - 1, 1, 3); - encoder->x264param.analyse.inter &= ~X264_ANALYSE_PSUB8x8; - encoder->x264param.analyse.inter &= ~X264_ANALYSE_BSUB16x16; - encoder->x264param.analyse.i_trellis = 0; - encoder->x264param.rc.b_stat_read = 0; encoder->x264param.rc.b_stat_write = 1; +#ifdef X264_PRESETS + x264_param_apply_fastfirstpass (&encoder->x264param); +#else + encoder->x264param.i_frame_reference = 1; + encoder->x264param.analyse.b_transform_8x8 = 0; + encoder->x264param.analyse.inter = 0; + encoder->x264param.analyse.i_me_method = X264_ME_DIA; + encoder->x264param.analyse.i_subpel_refine = + MIN (2, encoder->x264param.analyse.i_subpel_refine); + encoder->x264param.analyse.i_trellis = 0; + encoder->x264param.analyse.b_fast_pskip = 1; +#endif /* X264_PRESETS */ break; case 2: encoder->x264param.rc.b_stat_read = 1;