aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorRostislav Pehlivanov <atomnuker@gmail.com>2017-04-04 10:58:37 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-04-09 21:53:31 +0200
commit03eb0515c12637dbd20c2e3ca8503d7b47cf583a (patch)
treee3d8f69b7678ce7331e76a26a13a3cdb36e8a204 /libavcodec
parent724bb805ef8a6de0d9ef27a083ef501bdef2d453 (diff)
downloadffmpeg-03eb0515c12637dbd20c2e3ca8503d7b47cf583a.tar.gz
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@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mpegvideo_enc.c3
1 files changed, 3 insertions, 0 deletions
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);