(L4T 28.2) Supported pixel format of MMAPI converter, XRGB32? or XBGR32?

It says the converter supports, V4L2_PIX_FMT_ABGR32 and V4L2_PIX_FMT_XBGR32, at the API doc:

However, when I look at the code of NvBuffer::fill_buffer_plane_format, from line 406 to 415

case V4L2_PIX_FMT_ABGR32:
case V4L2_PIX_FMT_XRGB32:
*num_planes = 1;

planefmts[0].width = width;

planefmts[0].height = height;

planefmts[0].bytesperpixel = 4;

which only allows V4L2_PIX_FMT_ABGR32 and V4L2_PIX_FMT_XRGB32.

Therefore, I am wondering if this is a flaw? And the final question is which format is supported by converter? XRGB32? or XBGR32?

It is typo and should be V4L2_PIX_FMT_XRGB32. The data order is 8-bit B/8-bit G/8-bit R/8-bit X.

Thank you, DaneLLL :)
So, the converter supports V4L2_PIX_FMT_XRGB32. Right? But, based on Linux kernel docs,


The data order of XRGB32 is 8-bit X/8-bit R/8-bit G/8-bit B, not 8-bit B/8-bit G/8-bit R/8-bit X. So, which one is right??
Thx again!

Hi fengxueem,
In our implementation, V4L2_PIX_FMT_XRGB32 is in 8-bit B/8-bit G/8-bit R/8-bit X order.

Thx for your time, DaneLLL! What you guys are doing here is amazing, keep sharing your knowledge and experiences with people.

All in all,
NvVideoConverter currently supports V4L2_PIX_FMT_XRGB32 and V4L2_PIX_FMT_ABGR32 of RGB color space. Notice that the color order of V4L2_PIX_FMT_XRGB32 is 8-bit B/8-bit G/8-bit R/8-bit X, don’t be confused with the name.