Cannot convert YUV420 to RGB NVMedia image

I faced the following error while trying to create a RGB image :

Driveworks exception thrown: DW_FAILURE: Image: imageAttributesToNvMediaSurfaceType, Invalid image pixel format.
[2021-07-18 22:47:07] DW Error DW_FAILURE executing DW function:
 dwImage_create(&mHandle_NVMrgb, rgbaImageProperties, mSdk)

What I have tried:

    dwImageProperties rgbaImageProperties{};
    // In order to stream we prepare the properties of the image
    CHECK_DW_ERROR(dwSensorCamera_getImageProperties(&rgbaImageProperties, DW_CAMERA_OUTPUT_NATIVE_PROCESSED, mCamera));
    rgbaImageProperties.type = DW_IMAGE_NVMEDIA;
    rgbaImageProperties.memoryLayout = DW_IMAGE_MEMORY_TYPE_DEFAULT;
    rgbaImageProperties.format = DW_IMAGE_FORMAT_RGB_UINT8;
    
    //Output image for copyconverstion from YUV to RGBA
    CHECK_DW_ERROR(dwImage_create(&mHandle_NVMrgb, rgbaImageProperties, mSdk));

    //copyConvertion to DW_IMAGE_FORMAT_RGB_UINT8
    CHECK_DW_ERROR(dwImage_copyConvert(mHandle_NVMrgb, mHandle_NVM, mSdk));  

The error is happening at dwImage_create,

My goal here is to convert the native YUV420-uint8 image to a RGB format or BGR format.

When I try with rgbaImageProperties.format = DW_IMAGE_FORMAT_RGBA_UINT8; the CopyConversion works fine, but I dont want RGBA.

Please provide the following info (check/uncheck the boxes after clicking “+ Create Topic”):
Software Version
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version
other

Target Operating System
Linux
QNX
other

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
other

SDK Manager Version
1.5.0.7774
other

Host Machine Version
native Ubuntu 18.04
other

Dear @aswb,
As indicated in the error log, the pixel format is not supported for NvMedia Image. Please check more details on NVmedia surfaces https://docs.nvidia.com/drive/drive-os-5.2.0.0L/drive-os/index.html#page/DRIVE_OS_Linux_SDK_Development_Guide/NvMedia/nvmedia_concept_surface.html#wwpID0E0FN0HA

Okay, thanks @SivaRamaKrishnaNV ,

But as per the DW documentation this conversion(YUV420 to RGB) is listed as possible.
DriveWorks SDK Reference: Image (nvidia.com)

Is there any other way to convert a YUV image to RGB/BGR or to capture a RGB/BGR image from a GMSL camera. Because for our application we need a RGB image.?

Dear @aswb,
as per the DW documentation this conversion(YUV420 to RGB) is listed as possible.
DriveWorks SDK Reference: Image (nvidia.com)

It seems documentation is not clear and misleading. We will fix it. Thank you.

Do you need RGB CUDA Image or NVMedia Image for your application? May I know the use case?