[FFmpeg-cvslog] mpeg1enc: Disable threads for resolutions too large for multi-threading

Michael Niedermayer git at videolan.org
Sun Jan 20 04:39:53 CET 2013


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 20 04:14:09 2013 +0100| [ece68a0363ac64c48cc3a66f8c7ad83baac90add] | committer: Michael Niedermayer

mpeg1enc: Disable threads for resolutions too large for multi-threading

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit 0c6b0409af070a3bfb02b55fde8ba18219edc76b)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ece68a0363ac64c48cc3a66f8c7ad83baac90add
---

 libavcodec/mpeg12enc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index 9e31543..d4606a9 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -132,6 +132,9 @@ static av_cold int encode_init(AVCodecContext *avctx)
 {
     MpegEncContext *s = avctx->priv_data;
 
+    if (avctx->codec_id == AV_CODEC_ID_MPEG1VIDEO && avctx->height > 2800)
+        avctx->thread_count = 1;
+
     if(ff_MPV_encode_init(avctx) < 0)
         return -1;
 



More information about the ffmpeg-cvslog mailing list