From bb7a7111562b3c488be2ee1c41a39a913eed6497 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Tue, 28 Jan 2014 04:02:35 +0100 Subject: avcodec/huffyuvenc: frame multi-threading support Signed-off-by: Michael Niedermayer --- libavcodec/frame_thread_encoder.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libavcodec/frame_thread_encoder.c') diff --git a/libavcodec/frame_thread_encoder.c b/libavcodec/frame_thread_encoder.c index b9acefc110..687f23a17d 100644 --- a/libavcodec/frame_thread_encoder.c +++ b/libavcodec/frame_thread_encoder.c @@ -133,6 +133,13 @@ int ff_frame_thread_encoder_init(AVCodecContext *avctx, AVDictionary *options){ if(avctx->thread_count <= 1) return 0; + if (avctx->codec_id == AV_CODEC_ID_HUFFYUV || + avctx->codec_id == AV_CODEC_ID_FFVHUFF) { + // huffyuv doesnt support these with multiple frame threads currently + if (avctx->context_model > 0 || (avctx->flags & CODEC_FLAG_PASS1)) + return 0; + } + if(avctx->thread_count > MAX_THREADS) return AVERROR(EINVAL); -- cgit v1.2.3