Hi
When working with gstreamers nvvidconv
we found some quite noticeable brightness differences when converting from BGRx to NV12 (or any other YUV format)
I got the following 2 gstreamer pipelines:
The first converts a BGR image/video using only gstreamer elements:
gst-launch-1.0 -v \
filesrc location=some.png \
! pngdec \
! 'video/x-raw,framerate=0/1' \
! videoconvert \
! 'video/x-raw,format=BGRx' \
! videoconvert \
! 'video/x-raw,format=I420' \
! jpegenc \
! filesink location=videoconvert.jpeg
The second pipeline does the same using nvvidconv
gst-launch-1.0 -v \
filesrc location=some.png \
! pngdec \
! 'video/x-raw,framerate=0/1' \
! videoconvert \
! 'video/x-raw,format=BGRx' \
! nvvidconv \
! 'video/x-raw(memory:NVMM),format=BGRx' \
! nvvidconv \
! 'video/x-raw(memory:NVMM),format=I420' \
! nvvidconv \
! 'video/x-raw,format=I420' \
! jpegenc \
! filesink location=nvvidconv.jpeg
I did a bunch more pipelines and constellations. However as soon as nvvidconv
does the BGRx
→ YUV
conversion the image brightness is off.
I also played around with colorimetry and other codecs and sinks.
Analyzing the images gave the following color information:
Original:
videoconvert
:
and finally nvvidconv
:
So I concluded that for some reason nvvidconv
compresses the colorspace, which in turn changes the brightness.
Is my conclusion correct?
Is this actually a bug? or am I doing something wrong?
Is there a possibility to use the full color-range so the brightness of original and the `nvvidconv`` pictures are the same?
Im using jetpack 5.1
Thanks for your time!
Cheers
Markus