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>
This commit is contained in:
Rostislav Pehlivanov 2017-04-04 10:58:37 +01:00 committed by Michael Niedermayer
parent 724bb805ef
commit 03eb0515c1
1 changed files with 3 additions and 0 deletions

View File

@ -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);