[FFmpeg-cvslog] mpegvideo_enc: disable optimized huffman coding with AMV or slice threads

Rostislav Pehlivanov git at videolan.org
Wed Apr 12 01:01:22 EEST 2017


ffmpeg | branch: release/3.3 | Rostislav Pehlivanov <atomnuker at gmail.com> | Tue Apr  4 10:58:37 2017 +0100| [72e038acaf4df21e7a37f6e20ecd69b8f47f4c28] | committer: Michael Niedermayer

mpegvideo_enc: disable optimized huffman coding with AMV or slice threads

Doesn't work yet with slice threading and won't work with AMV.

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 03eb0515c12637dbd20c2e3ca8503d7b47cf583a)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

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

diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 71a858fc72..db241c82f0 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -399,6 +399,9 @@ FF_ENABLE_DEPRECATION_WARNINGS
         return AVERROR(EINVAL);
     }
 
+    if (avctx->codec_id == AV_CODEC_ID_AMV || (avctx->active_thread_type & FF_THREAD_SLICE))
+        s->huffman = 0;
+
     if (s->intra_dc_precision > (avctx->codec_id == AV_CODEC_ID_MPEG2VIDEO ? 3 : 0)) {
         av_log(avctx, AV_LOG_ERROR, "intra dc precision too large\n");
         return AVERROR(EINVAL);



More information about the ffmpeg-cvslog mailing list