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

Michael Niedermayer git at videolan.org
Mon Jan 28 02:18:28 CET 2013


ffmpeg | branch: release/1.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 20 04:14:09 2013 +0100| [59f7d583a3e467843c57278ec320efddf28097d1] | 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=59f7d583a3e467843c57278ec320efddf28097d1
---

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

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index cda1464..f2b5c05 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -145,6 +145,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