How to set the colorimetry using nvvidconv video/x-raw(memory:NVMM)

I’d like to decode H.264 file, convert to RGBA and display it with egl via NVMM.
I tried to the following pipeline, but I can’t get the expected result.

gst-launch-1.0 filesrc location=testpattern.mp4 ! decodebin ! nvvidconv ! “video/x-raw(memory:NVMM), format=RGBA, colorimetry=(string)bt709, width=1920, height=1080” ! appsink name=mysink

Its color is not correct.
It seems that the specified colorimetry isn’t effective.

How should I set the colorimetry ?

Would like to confirm the issue. Looks like testpattern.mp4 is encoded from YUV420 bt709 and after converting to RGBA, the color range is not correct. Is this correct?

I checked another testpattern.
Its result is attached file.
It is different between nvoverlaysink and xvimagesink.
I tried cmu_enable and force_user_gamma, but I couldn’t get the same result as xvimagesink.

Which release version do you use?

I’m using “# R32 (release), REVISION: 4.4, GCID: 23942405, BOARD: t186ref, EABI: aarch64, DATE: Fri Oct 16 19:37:08 UTC 2020”;

Could you upgrade to Jetpack 4.6.1 and apply this prebuilt lib for a try:
Video convert sample results are missing? - #12 by DaneLLL

I checked that I could get the expected result with jetpack 4.6.1.
But I’d like to use jetpack 4.4.1 if possible,
because I’m using the commercial product and I can’t update its jetpack by myself.
Is it possible to provide fixed binary for jetpack 4.4.1 ?

Please try the attachment. (15.6 KB)

I tried the attached file.
But I couldn’t the expected results.
I tried it with jetpack 4.6.1 as is again and I could the expected result.
So it seems whether the libnvbuf_utils is modified isn’t involved.
Do you know which update is effective for this ?

Please share the way for checking the correctness. So that we can check and confirm.

color_compare.pdf (328.1 KB)

I checked this as attached file.
I checked this with jetpack 4.6.0 too, but I couldn’t get the expected result.
So it seemed that this phenomenon was disappeared since jetpack 4.6.1.

Would like to confirm the working condition. Do you mean it works on clean 4.6.1? Or works on 4.6.1 + this prebuilt lib?

It’s on clean 4.6.1.

The prebuilt lib it built with the fix. We run this command and the result looks good:

$ gst-launch-1.0 videotestsrc num-buffers=1 ! video/x-raw,width=1280,height=720,format=NV12 ! nvvidconv ! 'video/x-raw(memory:NVMM),format=RGBA' ! nvvidconv ! 'video/x-raw,format=RGBA' ! filesink location=r32_44.rgba

Please try the commands on r32.4.4 + attached prebuilt lib:
Video convert sample results are missing?
And see which command can be run to reproduce the issue. We would need to reproduce it and then check further.

I tried the following pipeline and capture the screen with gnome-screenshot.
I could repro this.


DISPLAY=:0.0 gst-launch-1.0 filesrc location=/home/nvidia/Media/colorgradient-full.mp4 ! decodebin ! nvvidconv ! “video/x-raw(memory:NVMM), format=RGBA, colorimetry=(string)bt709” ! nv3dsink

Is colorgradient-full.mp4 encoded from YUV420 bt601 limited range? Or either bt601 full range, bt709 limited range, bt709 full range?

Is color correct when using xvimagesink:

DISPLAY=:0.0 gst-launch-1.0 filesrc location=/home/nvidia/Media/colorgradient-full.mp4 ! decodebin ! nvvidconv ! "video/x-raw, format=RGBA, colorimetry=(string)bt709" ! video convert ! xvimagesink 

It’s bt709.
I checked both bt709 limited range and bt709 full range.
But its result was same.
The lower side of the profile was curved.
Using xvimagesink, color was correct. Its profile was linear.

So it may have certain issue in rendering on Jetpack 4.4. For a thorough solution, we would suggest upgrade to 4.6.1 or 4.6.2.

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