aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2012-03-05 21:54:17 +0200
committerMartin Storsjö <martin@martin.st>2012-03-06 13:40:22 +0200
commit338978a7c17d303672bcf5e035e54da362274a18 (patch)
treeb524da40e1d3cdccdf73ccea8cb33dcde2d9a384
parent39da3b223fe52ec5b51e4af7d123b47b890efd8f (diff)
downloadffmpeg-338978a7c17d303672bcf5e035e54da362274a18.tar.gz
libx264: Allow overriding the sliced threads option
Signed-off-by: Martin Storsjö <martin@martin.st>
-rw-r--r--libavcodec/libx264.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c
index 3934627537..abce6a858d 100644
--- a/libavcodec/libx264.c
+++ b/libavcodec/libx264.c
@@ -379,6 +379,8 @@ static av_cold int X264_init(AVCodecContext *avctx)
x4->params.analyse.b_psnr = avctx->flags & CODEC_FLAG_PSNR;
x4->params.i_threads = avctx->thread_count;
+ if (avctx->thread_type)
+ x4->params.b_sliced_threads = avctx->thread_type == FF_THREAD_SLICE;
x4->params.b_interlaced = avctx->flags & CODEC_FLAG_INTERLACED_DCT;
@@ -536,6 +538,7 @@ static const AVCodecDefault x264_defaults[] = {
{ "coder", "-1" },
{ "cmp", "-1" },
{ "threads", AV_STRINGIFY(X264_THREADS_AUTO) },
+ { "thread_type", "0" },
{ NULL },
};