producer_avformat performs useless work when source is intra-only and consumer framerate is lower than the source's framerate
Tjoppen opened this issue · 3 comments
Tjoppen commented
This may or may not be considered a bug, but with ffmpeg one can set -thread_type frame -threads 16 to speed up intra-only decoding, especially for slow codecs like JPEG2000. producer_libavformat.c happily passes thread_type along, but this is purely detrimental. libavformat decodes multiple frames at once as instructed, but producer_libavformat only ever uses the first one. Playing more nicely with libavformat's threading would enable better handling of heavy to decode formats like JPEG2000. I see that recently there has been done some work to make melt would work better with intra-only, and supporting frame threading would be one way to make it work even better.