summaryrefslogtreecommitdiff
path: root/libavcodec/frame_thread_encoder.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2014-01-30 00:55:35 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2014-01-30 01:37:27 +0100
commite1cb6dc59ec26a9cfe2d8f95a72e78d123b19e3b (patch)
treead6588c8cd603483c8b653fb83868189b3441e64 /libavcodec/frame_thread_encoder.c
parent1a5e8511d4ed8778ada6db05d6f24c38a9e15825 (diff)
downloadffmpeg-e1cb6dc59ec26a9cfe2d8f95a72e78d123b19e3b.tar.gz
Warn the user if mjpeg cbr encoding with frame threading was requested.
Diffstat (limited to 'libavcodec/frame_thread_encoder.c')
-rw-r--r--libavcodec/frame_thread_encoder.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c
index a9c1423502..786599679d 100644
--- a/libavcodec/frame_thread_encoder.c
+++ b/libavcodec/frame_thread_encoder.c
@@ -133,6 +133,12 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){
"or a constant quantizer if you want to use multiple cpu cores\n");
avctx->thread_count = 1;
}
+ if( avctx->thread_count > 1
+ && avctx->codec_id == AV_CODEC_ID_MJPEG
+ && !(avctx->flags & CODEC_FLAG_QSCALE))
+ av_log(avctx, AV_LOG_WARNING,
+ "MJPEG CBR encoding works badly with frame multi-threading, consider "
+ "using -threads 1, -thread_type slice or a constant quantizer.\n");
if(!avctx->thread_count) {
avctx->thread_count = av_cpu_count();
avctx->thread_count = FFMIN(avctx->thread_count, MAX_THREADS);