summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-29 19:05:32 +0000
committerlorenm <lorenm@b3059339-0415-0410-9bf9-f77b7e298cf2>2005-05-29 19:05:32 +0000
commit2bdc7899a179504ccc3b8fcea032e224867c6805 (patch)
treeb1bf1821a3e476bcbbc9d17a079d749d43bf2b55
parent7322c396a9de56735f801becf4daaa647a4251b5 (diff)
downloadmpv-2bdc7899a179504ccc3b8fcea032e224867c6805.tar.bz2
mpv-2bdc7899a179504ccc3b8fcea032e224867c6805.tar.xz
sync to x264 r240 (threads)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15591 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r--DOCS/man/en/mplayer.18
-rwxr-xr-xconfigure2
-rw-r--r--libmpcodecs/ve_x264.c3
3 files changed, 12 insertions, 1 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index 067d256370..1f22c0bf7c 100644
--- a/DOCS/man/en/mplayer.1
+++ b/DOCS/man/en/mplayer.1
@@ -8106,6 +8106,14 @@ Use this parameter only if you know what it means,
and you have a need to set it.
.
.TP
+.B threads=<1\-4>
+Split each frame into slices and encode them in parallel (default: 1).
+Also allows multithreaded decoding if the decoder supports it (lavc does not).
+This has a slight penalty to compression.
+Requires that libx264 was compiled with pthread support; if not, this
+option will produce a warning and enable slices but not multithreading.
+.
+.TP
.B log=<-1\-3>
Adjust the amount of logging info printed to the screen.
.RSs
diff --git a/configure b/configure
index 26e4c5e852..14ab079aa4 100755
--- a/configure
+++ b/configure
@@ -6099,7 +6099,7 @@ echocheck "x264"
cat > $TMPC << EOF
#include <inttypes.h>
#include <x264.h>
-#if X264_BUILD < 27
+#if X264_BUILD < 28
#error We do not support old versions of x264. Get the latest from SVN.
#endif
int main(void) { x264_encoder_open((void*)0); return 0; }
diff --git a/libmpcodecs/ve_x264.c b/libmpcodecs/ve_x264.c
index c0965d32e6..bc027a0fec 100644
--- a/libmpcodecs/ve_x264.c
+++ b/libmpcodecs/ve_x264.c
@@ -97,6 +97,7 @@ static char *zones = NULL;
static int subq = 5;
static int me_method = 2;
static int me_range = 16;
+static int threads = 1;
static int level_idc = 40;
static int psnr = 0;
static int log_level = 2;
@@ -151,6 +152,7 @@ m_option_t x264encopts_conf[] = {
{"me", &me_method, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL},
{"me_range", &me_range, CONF_TYPE_INT, CONF_RANGE, 4, 64, NULL},
{"level_idc", &level_idc, CONF_TYPE_INT, CONF_RANGE, 10, 51, NULL},
+ {"threads", &threads, CONF_TYPE_INT, CONF_RANGE, 1, 4, NULL},
{"psnr", &psnr, CONF_TYPE_FLAG, 0, 0, 1, NULL},
{"nopsnr", &psnr, CONF_TYPE_FLAG, 0, 1, 0, NULL},
{"log", &log_level, CONF_TYPE_INT, CONF_RANGE, -1, 3, NULL},
@@ -264,6 +266,7 @@ static int config(struct vf_instance_s* vf, int width, int height, int d_width,
mod->param.i_log_level = log_level;
mod->param.vui.i_sar_width = d_width*height;
mod->param.vui.i_sar_height = d_height*width;
+ mod->param.i_threads = threads;
switch(outfmt) {
case IMGFMT_I420: