avcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested
authorMichael Niedermayer <michael@niedermayer.cc>
Thu, 9 Feb 2017 22:24:15 +0000 (23:24 +0100)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 9 Feb 2017 23:12:01 +0000 (00:12 +0100)
commit3e1507a9547ac09b6ff4372123cde09f19218f3d
tree80afbf6c25ff3d0f82e7c2a5216c2fca287959a5
parentf57665b3181d5cbed680754983d9a6fdc1bfec5f
avcodec/mjpegenc: Bypass the 2 pass encoding when optimal tables are not requested

This limits the bugs, speedloss and extra memory allocation to the case when
optimal tables are needed.
Fixes regressions with slice multi-threading

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/mjpegenc.c
libavcodec/mjpegenc_common.c
libavcodec/mpegvideo_enc.c