[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.101,1.102

D Richard Felker III dalias at aerifal.cx
Sun Sep 19 20:42:17 CEST 2004


On Sun, Sep 19, 2004 at 11:59:07AM +0200, Guillaume Poirier CVS wrote:
> CVS change done by Guillaume Poirier CVS
> 
> Update of /cvsroot/mplayer/main/libmpcodecs
> In directory mail:/var2/tmp/cvs-serv10444/libmpcodecs
> 
> Modified Files:
> 	ve_lavc.c 
> Log Message:
> New lavc flag: "turbo" mode which is supposed to speed up 2-pass encoding
> while preserving quality as much as possible.
> Inspired by XviD "turbo" mode.
> 
> 
> Index: ve_lavc.c
> ===================================================================
> RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
> retrieving revision 1.101
> retrieving revision 1.102
> diff -u -r1.101 -r1.102
> --- ve_lavc.c	18 Sep 2004 23:20:09 -0000	1.101
> +++ ve_lavc.c	19 Sep 2004 09:59:05 -0000	1.102
> @@ -153,6 +153,7 @@
>  static int lavc_param_closed_gop = 0;
>  static int lavc_param_dc_precision = 8;
>  static int lavc_param_threads= 1;
> +static int lavc_param_turbo = 0;
>  
>  
>  char *lavc_param_acodec = "mp2";
> @@ -302,6 +303,7 @@
>          {"qns", &lavc_param_qns, CONF_TYPE_INT, CONF_RANGE, 0, 1000000, NULL},
>          {"nssew", &lavc_param_nssew, CONF_TYPE_INT, CONF_RANGE, 0, 1000000, NULL},
>  	{"threads", &lavc_param_threads, CONF_TYPE_INT, CONF_RANGE, 1, 8, NULL},
> +	{"turbo", &lavc_param_turbo, CONF_TYPE_FLAG, 0, 0, 1, NULL},
>  	{NULL, NULL, 0, 0, 0, 0, NULL}
>  };
>  #endif
> @@ -666,6 +668,30 @@
>  	    mp_msg(MSGT_MENCODER,MSGL_ERR,"2pass failed: filename=%s\n", passtmpfile);
>              return 0;
>  	}
> +	if(lavc_param_turbo) {
> +	  /* uses SAD comparison functions instead of other hungrier */
> +	  lavc_venc_context->me_pre_cmp = 0;
> +	  lavc_venc_context->me_cmp = 0;
> +	  lavc_venc_context->me_sub_cmp = 0;
> +	  lavc_venc_context->mb_cmp = 2;
> +
> +	  /* Disables diamond motion estimation */
> +	  lavc_venc_context->pre_dia_size = 0;
> +	  lavc_venc_context->dia_size = 0;
> +
> +	  lavc_venc_context->quantizer_noise_shaping = 0; // qns=0
> +	  lavc_venc_context->noise_reduction = 0; // nr=0
> +
> +	  if (lavc_param_mb_decision) {
> +	    lavc_venc_context->mb_decision = 1; // mbd=0 ("realtime" encoding)

is mbd=2 any slower than mbd=1? imo not...

rich




More information about the MPlayer-cvslog mailing list