[FFmpeg-devel] libavcodec/hap : add HapAlphaOnly decoding/encoding

Tom Butterworth bangnoise at gmail.com
Tue Oct 10 17:08:43 EEST 2017



> On 9 Oct 2017, at 22:36, Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
> 
> 2017-10-09 21:34 GMT+02:00 Martin Vignali <martin.vignali at gmail.com>:
> 
>>>> IMHO, from a compositing point of view, alpha only and gray is
>>>> the same thing.
>>>> It's common (in cgi compositing for example), to use alpha (or
>>>> matte) as separate gray only file.
>>>> 
>>> If this is what you believe, I don't think an RGBA representation
>>> should be committed.
>>> 
>> This is not about what i believe ! :-)
> 
> I think it is.
> I asked you to explain why it is a good idea to map alpha only
> to rgba and if this is what users expect. Your answer seems
> to indicate that you share my feeling that it would be unexpected.
> 
> Carl Eugen

Perhaps I am being slow (which is very possible) - I don’t understand how by using a gray pixel format, transcoding between an RGBA codec and Hap Alpha-Only would work as expected without users having to add counterintuitive filtering to swizzle channels?

I would not expect there is much of an audience for this codec, but such audience there is is likely to be transcoding to Hap Alpha from something like ProRes 4444 and to expect the alpha channel to be selected - eg the following must work without extra options:

ffmpeg -i MyProRes4444.mov -vcodec hap -format hap_alpha_only out.mov

Furthermore, how is an API user to know that the frames they acquire or emit are in fact alpha content when they are tagged as gray?

Patches 0001, 0002, 0006 and 0007 LGTM and are uncontentious. As they are required for Hap Q Alpha support I will commit these shortly, assuming nobody objects.

Cheers - Tom


More information about the ffmpeg-devel mailing list