[FFmpeg-devel] adding RGBA and BGRA to nvenc.c
timo at rothenpieler.org
Wed Sep 7 13:20:51 EEST 2016
>> Also, why is the twist from AV_PIX_FMT_RGBA to NV_ENC_BUFFER_FORMAT_ABGR
>> The nvenc header describes it as "8 bit Packed A8B8G8R8", so did they
>> mess it up?
> It is necessary in order to make it work. The twist here is intentional
> as I pointed out earlier. If you do it the other way around as described
> in the documentation then you get false and missing colours.
Carl already pointed you to the correct, native-endian pixel formats,
which match with the nvenc documentation:
> I'd like to keep in the transparency channel unless you know there is an
> actual problem with it. The encoder may not use it, but it is no reason
> not to pass it on. Otherwise will RGBA/BGRA have to be converted into
> RGB0/BGR0 and you will again get a performance penalty.
NVENC itself lists the alpha channel. So keeping it should be fine and
save a conversion.
More information about the ffmpeg-devel