Incorrect output when using NvTransform to convert to NVBUF_COLOR_FORMAT_BGR

Hi,
I’m currently working with JetPack 5. I see that there are additional color formats listed in nvbufsurface.h compared to the previous JetPack 4.6.x versions of the Jetson Multimedia API.

Specifically, I’m trying to convert an image into the NVBUF_COLOR_FORMAT_BGR format, but I’m encountering an issue – the resulting image is entirely black. However, when I opt for the NVBUF_COLOR_FORMAT_BGRA format, everything works seamlessly.

Additionally, when I employ the NvTransform() function with the BGR format, it executes in negligible time. Is it safe to assume that the BGR format is not supported yet?

Directly obtaining an image in the BGR format would greatly simplify my workflow, as I wouldn’t need to perform the BGRA to BGR conversion manually. Could you kindly offer some guidance on this matter?

Thanks in advance!

modified jpeg_decode_main.cpp (9.0 KB)

Hi,
NVBUF_COLOR_FORMAT_BGR is not supported on Jetson platforms. Please convert to NVBUF_COLOR_FORMAT_BGRA or NVBUF_COLOR_FORMAT_BGRx

1 Like

Thanks for the reply and clearing my confusion!
Where can I find list of currently supported colour formats?

Hi,
Please check the header file in Jetpack 4 release:

/usr/src/jetson_multimedia_api/include/nvbuf_utils.h

We use NvBufSurface APIs on Jetpack 5 release but it may be clearer to check the header files for supported formats.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.