Loss in color when converting from I420/NV12 to RGBA

Hi I am developing an application for Jetson Agx Xavier JP 4.6.2.
I cannot provide you with code, but the pipeline inside the code is the following →
multifilesrc location=1695891500102_0_rgb.jpg caps=“image/jpeg, width=2448, height=2048, framerate=1/1” ! nvjpegdec ! ‘video/x-raw(memory:NVMM),format=I420,width=2448,height=2048’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA,width=2448,height=2048,framerate=1/1' ! appsink

Where I get the buffer and see that the RGBA image is significantly different.
I am sending the original image and the output of the pipeline in a zip, so there is no compression.

It get’s interesting when I start using videoconvert for I420→RGBA, because the quality is significantly better. The following is example pipeline.
gst-launch-1.0 -v multifilesrc location=<original_image>.jpg caps=“image/jpeg, width=2448, height=2048, framerate=1/1” ! nvjpegdec ! ‘video/x-raw,format=I420,width=2448,height=2048’ ! videoconvert ! ‘video/x-raw,format=RGBA,width=2448,height=2048’ ! nvvidconv ! ‘video/x-raw(memory:NVMM),format=RGBA,width=2448,height=2048,framerate=1/1’ ! nvvidconv ! ‘video/x-raw,format=I420,width=2448,height=2048,colorimetry=bt601,range=full’ ! jpegenc quality=95 ! filesink location=output.jpg`

I know for sure that the problem is related due to the fact that I420 and NV12 are clipping the color space between 16-235 and (U and V) from 16 to 240. But I am not sure how to fix it using nvvidconv.
How can I set it to use full-range YUV.

And before anyone asks. No I cannot update the Jetpack.

TheColoringProblem.zip (9.8 MB)

Hi,
Pleas try

Jetson/L4T/r32.7.x patches - eLinux.org
[MMAPI] 07_video_convert sample result not match as expected

And would suggest upgrade to latest Jetpack 5.1.5

This did not solve the problem. Tried loading it with LD_PRELOAD.

Hi,
Did you try Xavier/Jetpack 5.1.5 and hit the issue?

Sorry for the late reply. No I am not able to use different Jetpack.

Hi,
Handling about limited range and extended range are added to later release. Would suggest upgrade to Jetpack 5. If you cannot upgrade, you can check source code of nvvidconv plugin and try to add the formats. Public source code is in

Jetson Linux R32.7.6 | NVIDIA Developer
Driver Package (BSP) Sources

Jetson Linux | NVIDIA Developer
Driver Package (BSP) Sources

1 Like