[FFmpeg-devel] [PATCH] Make decoding alpha option for some codecs.

Don Moir donmoir at comcast.net
Wed Sep 18 12:11:20 CEST 2013

> On Tue, Sep 17, 2013 at 07:47:30PM +0000, Paul B Mahol wrote:
>> On 9/17/13, Reimar Doeffinger <Reimar.Doeffinger at gmx.de> wrote:
>> > For codecs where decoding of a whole plane can simply
>> > be skipped, we should offer applications to not decode
>> > alpha for better performance.
>> > 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.
>> > Unfortunately a good way to test this via FFmpeg only is missing,
>> > suggestions welcome.
>> Why is there no similar intrusive, and of questionable usefulness,
>> patch that decodes only luma (Y) plane.

Not clear to me how this is handled. If file contains only AV_PIX_FMT_YUVA444P, will it decode with alpha by default ?

> Because most users have a color display.
> Very few players can display alpha (and if they could, a lot
> of users wouldn't want it to).

If user designed the video to have alpha, it should have alpha. So not sure if I have to do anything with this or not. It's not 
unusual to use alpha video as overlay in apps that support it.

> This is easily wasting over 30% CPU time and 40% memory bandwidth
> for no reason.

I guess you mean 30% of decode time... hopefully measured in ms.

Just not clear if this is going to break something or not.

More information about the ffmpeg-devel mailing list