[FFmpeg-devel] [PATCH] Make decoding alpha optional for some codecs.
Reimar Döffinger
Reimar.Doeffinger at gmx.de
Wed Sep 18 00:43:05 CEST 2013
On Wed, Sep 18, 2013 at 12:41:26AM +0200, Reimar Döffinger wrote:
> For codecs where decoding of a whole plane can simply
> be skipped, we should offer applications to not decode
> alpha for better performance (ca. 30% less CPU usage
> and 40% reduced memory bandwidth).
> It also means applications do not need to implement support
> (even if it is rather simple) for YUVA formats in order to be
> able to play these files.
> Tested by manually hacking avcodec_default_get_format,
> suggestions for how to test in FATE welcome.
>
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
> Changelog | 2 ++
> libavcodec/ffv1dec.c | 50 ++++++++++++++-------------------------------
> libavcodec/internal.h | 11 ++++++++++
> libavcodec/proresdec2.c | 6 +-----
> libavcodec/proresdec_lgpl.c | 8 +++-----
> libavcodec/utils.c | 36 ++++++++++++++++++++++++++++++++
> libavcodec/vp56.c | 9 ++++----
> 7 files changed, 73 insertions(+), 49 deletions(-)
My hope was that this variant with a special function might be
more maintainable and less code in the codecs.
On the other hand it is a bit more obfuscated...
More information about the ffmpeg-devel
mailing list