Gstreamer element nvvideoconvert gives wrong color output

Hi!

I use deepstream 6.0 on Tesla T4 (NV drivers 470.63.01).

I tried to process a JPEG image (to detect objects) and found that element Gst-nvvideoconvert causes change of color pallete.
For example:

gst-launch-1.0 -e filesrc location=./src_white_255.jpg ! jpegdec ! nvvideoconvert ! jpegenc ! filesink location=./dst_gray_235.jpg

If we use element Gst-videoconvert then there is no color change:

gst-launch-1.0 -e filesrc location=./src_white_255.jpg ! jpegdec ! videoconvert ! jpegenc ! filesink location=./dst_white_255.jpg

Could you prompt way how to get original color with using of nvvideoconvert?

The first pipeline does not work.
gst-launch-1.0 -e filesrc location=./src_white_255.jpg ! jpegdec ! nvvideoconvert ! jpegenc ! filesink location=./dst_gray_235.jpg
Got the following error:
Setting pipeline to PAUSED …
Pipeline is PREROLLING …
nvbufsurface: NvBufSurfaceSysToHWCopy: failed in mem copy
nvbufsurface: NvBufSurfaceCopy: failed to copy
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.000262556
Setting pipeline to PAUSED …
Setting pipeline to READY …
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Cuda failure: status=700
nvbufsurface: Error(-1) in releasing cuda memory
Setting pipeline to NULL …
Freeing pipeline …

I can reproduce the problem with nvjpegdec + nvvidoconvert.

gst-launch-1.0 --gst-debug=jpegenc:5 -e filesrc location=./test.jpg ! nvjpegdec ! nvvideoconvert nvbuf-memory-type=3 ! 'video/x-raw,colorimetry=bt709' ! queue ! jpegenc ! filesink location=./dst_gray_235.jpg

We will investigate the issue.