diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-01-30 00:55:22 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-01-30 00:55:29 +0100 |
commit | 1a5e8511d4ed8778ada6db05d6f24c38a9e15825 (patch) | |
tree | a5bd676ccbe853718633b4d2b39d5465d48db2ff | |
parent | b80073c05f7ca1136d397a3875cafdda40d25667 (diff) | |
parent | cfc36666f681c41096ee8293f1f47cee1fe58284 (diff) | |
download | ffmpeg-1a5e8511d4ed8778ada6db05d6f24c38a9e15825.tar.gz |
Merge remote-tracking branch 'cehoyos/master'
* cehoyos/master:
Force automatic thread_count to 1 for cbr mjpeg frame threading.
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/frame_thread_encoder.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index 687f23a17d..a9c1423502 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -125,6 +125,14 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){ || !(avctx->codec->capabilities & CODEC_CAP_INTRA_ONLY)) return 0; + if( !avctx->thread_count + && avctx->codec_id == AV_CODEC_ID_MJPEG + && !(avctx->flags & CODEC_FLAG_QSCALE)) { + av_log(avctx, AV_LOG_DEBUG, + "Forcing thread count to 1 for MJPEG encoding, use -thread_type slice " + "or a constant quantizer if you want to use multiple cpu cores\n"); + avctx->thread_count = 1; + } if(!avctx->thread_count) { avctx->thread_count = av_cpu_count(); avctx->thread_count = FFMIN(avctx->thread_count, MAX_THREADS); |