[FFmpeg-devel] adding RGBA and BGRA to nvenc.c

Sven C. Dack sven.c.dack at sky.com
Wed Sep 7 16:26:24 EEST 2016


On 07/09/16 12:40, Timo Rothenpieler wrote:
> libavutil/pixfmt.h defines AV_PIX_FMT_RGB0 and the other ones like this:
>
> packed RGB 8:8:8, 32bpp, XRGBXRGB...   X=unused/undefined
>
> So I would expect the Alpha-Channel to be anything, and converting from
> RGBA to RGB0 to be a no-op "conversion".

It is not an issue. x11grab produces BGR0 and nvenc can handle it with the 
patch. It's giving me 100fp/s (up from 47fp/s) with a 1920x1080 monitor. I'd 
imagine people with 4K displays will be happy, too, although they will have to 
live with lower speeds of perhaps 30 fp/s. Would be interesting to know how it 
performs on 4K though.

If there is really an RGBA/BGRA input then it needs to be convert to RGB0/BGR0. 
Until then is it a theoretical issue. Might be the module producing RGBA/BGRA 
can produce RGB0/BGR0, too.

Sven



More information about the ffmpeg-devel mailing list