changeset 17703:2b5c0730598d

XviD multi-threaded encoding support
author gpoirier
date Wed, 01 Mar 2006 09:18:56 +0000
parents 485f04e5a58c
children 56d25d6f06d4
files ChangeLog DOCS/man/en/mplayer.1 libmpcodecs/ve_xvid4.c
diffstat 3 files changed, 15 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Tue Feb 28 23:24:38 2006 +0000
+++ b/ChangeLog	Wed Mar 01 09:18:56 2006 +0000
@@ -146,6 +146,7 @@
     * fixed various bugs in the EDL code
     * x264 "turbo mode" to speed up first pass of multi-pass encoding
     * x264 custom quantization matrices
+    * XviD multi-threaded encoding support
     * -delay allows real audio delay instead of just a delay in the header
     * search for (deprecated!) frameno.avi is now disabled by default (use
       -frameno-file frameno.avi to enable)
--- a/DOCS/man/en/mplayer.1	Tue Feb 28 23:24:38 2006 +0000
+++ b/DOCS/man/en/mplayer.1	Wed Mar 01 09:18:56 2006 +0000
@@ -8539,8 +8539,7 @@
 .
 .PP
 .sp 1
-The following option is only available in development versions
-of XviD 1.1.x.
+The following option is only available in XviD 1.1.x.
 .
 .TP
 .B bvhq=<0|1>
@@ -8550,6 +8549,16 @@
 This produces nicer-looking B-frames while incurring almost no
 performance penalty (default: 1).
 .
+.PP
+.sp 1
+The following option is only available in the CVS version of XviD.
+.
+.TP
+.B threads=<0\-n>
+Create n threads to run the motion estimation (default: 0).
+The maximum number of threads that can be used is the picture height
+divided by 16.
+.
 .
 .SS x264enc (\-x264encopts)
 .
--- a/libmpcodecs/ve_xvid4.c	Tue Feb 28 23:24:38 2006 +0000
+++ b/libmpcodecs/ve_xvid4.c	Wed Mar 01 09:18:56 2006 +0000
@@ -258,6 +258,7 @@
 static int xvidenc_psnr = 0;
 
 static int xvidenc_max_bframes = 2;
+static int xvidenc_num_threads = 0;
 static int xvidenc_bquant_ratio = 150;
 static int xvidenc_bquant_offset = 100;
 static int xvidenc_bframe_threshold = 0;
@@ -310,6 +311,7 @@
 	{"vhq", &xvidenc_vhq, CONF_TYPE_INT, CONF_RANGE, 0, 4, NULL},
 	{"bvhq", &xvidenc_bvhq, CONF_TYPE_INT, CONF_RANGE, 0, 1, NULL},
 	{"max_bframes", &xvidenc_max_bframes, CONF_TYPE_INT, CONF_RANGE, 0, 20, NULL},
+	{"threads", &xvidenc_num_threads, CONF_TYPE_INT, 0, 0, 0, NULL},
 	{"bquant_ratio", &xvidenc_bquant_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 200, NULL},
 	{"bquant_offset", &xvidenc_bquant_offset, CONF_TYPE_INT, CONF_RANGE, 0, 200, NULL},
 	{"bf_threshold", &xvidenc_bframe_threshold, CONF_TYPE_INT, CONF_RANGE, -255, 255, NULL},
@@ -779,7 +781,7 @@
 	create->zones = NULL;
 	create->num_plugins = 0;
 	create->plugins = NULL;
-	create->num_threads = 0;
+	create->num_threads = xvidenc_num_threads;
 
 	if( (selected_profile->flags & PROFILE_BVOP) &&
 		/* dxn: prevent bframes usage if interlacing is selected */