[Mplayer-cvslog] CVS: main/libmpcodecs ve_lavc.c,1.94,1.95
Michael Niedermayer CVS
syncmail at mplayerhq.hu
Tue Jul 6 04:10:24 CEST 2004
CVS change done by Michael Niedermayer CVS
Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var2/tmp/cvs-serv30978/libmpcodecs
Modified Files:
ve_lavc.c
Log Message:
multi-threaded lavc patch by (Loren Merritt <lorenm at u dot washington dot edu>)
Index: ve_lavc.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/ve_lavc.c,v
retrieving revision 1.94
retrieving revision 1.95
diff -u -r1.94 -r1.95
--- ve_lavc.c 7 Jun 2004 17:31:50 -0000 1.94
+++ ve_lavc.c 6 Jul 2004 02:10:22 -0000 1.95
@@ -150,6 +150,7 @@
static int lavc_param_alt= 0;
static int lavc_param_ilme= 0;
static int lavc_param_nssew= 8;
+static int lavc_param_threads= 1;
char *lavc_param_acodec = "mp2";
@@ -292,6 +293,7 @@
{"top", &lavc_param_top, CONF_TYPE_INT, CONF_RANGE, -1, 1, NULL},
{"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},
{NULL, NULL, 0, 0, 0, 0, NULL}
};
#endif
@@ -661,6 +663,11 @@
#endif
vf->priv->pic->quality = (int)(FF_QP2LAMBDA * lavc_param_vqscale + 0.5);
}
+
+#if LIBAVCODEC_BUILD >= 4716
+ if(lavc_param_threads > 1)
+ avcodec_thread_init(lavc_venc_context, lavc_param_threads);
+#endif
if (avcodec_open(lavc_venc_context, vf->priv->codec) != 0) {
mp_msg(MSGT_MENCODER,MSGL_ERR,MSGTR_CantOpenCodec);
More information about the MPlayer-cvslog
mailing list