Message ID | 20170403201330.44240-2-atomnuker@gmail.com |
---|---|
State | Accepted |
Headers | show |
2017-04-03 22:13 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: > + if (s->huffman && avctx->codec_id == AV_CODEC_ID_AMV) { > + av_log(avctx, AV_LOG_WARNING, "AMV doesn't support optimized huffman tables, disabling\n"); Iiuc, together with 3/3 this prints a warning by default when encoding AMV, this should really be avoided. Carl Eugen
On 4 April 2017 at 00:02, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote: > 2017-04-03 22:13 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: > > > + if (s->huffman && avctx->codec_id == AV_CODEC_ID_AMV) { > > + av_log(avctx, AV_LOG_WARNING, "AMV doesn't support optimized > huffman tables, disabling\n"); > > Iiuc, together with 3/3 this prints a warning by default when encoding > AMV, this should really be avoided. > > Carl Eugen > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > I didn't think about that. Changed locally to never warn and instead always turn it off with AMV encoding.
On 4 April 2017 at 00:08, Rostislav Pehlivanov <atomnuker@gmail.com> wrote: > > > On 4 April 2017 at 00:02, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote: > >> 2017-04-03 22:13 GMT+02:00 Rostislav Pehlivanov <atomnuker@gmail.com>: >> >> > + if (s->huffman && avctx->codec_id == AV_CODEC_ID_AMV) { >> > + av_log(avctx, AV_LOG_WARNING, "AMV doesn't support optimized >> huffman tables, disabling\n"); >> >> Iiuc, together with 3/3 this prints a warning by default when encoding >> AMV, this should really be avoided. >> >> Carl Eugen >> _______________________________________________ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > I didn't think about that. Changed locally to never warn and instead > always turn it off with AMV encoding. > > Pushed to master and release/3.3 with the suggested change, thanks!
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 71a858fc72..8cc964be23 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -399,6 +399,11 @@ FF_ENABLE_DEPRECATION_WARNINGS return AVERROR(EINVAL); } + if (s->huffman && avctx->codec_id == AV_CODEC_ID_AMV) { + av_log(avctx, AV_LOG_WARNING, "AMV doesn't support optimized huffman tables, disabling\n"); + 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);
Isn't supported. Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com> --- libavcodec/mpegvideo_enc.c | 5 +++++ 1 file changed, 5 insertions(+)