I have a YUVJ420P(full-range) based H.264 stream, and after processed through nvdecoder and OpenGL, the rendered image is displayed as non-full-range RGB(the data is full-range but it’s displayed as non-full-range outcome). And thus I lost the top/bottom values.
I have tried to set the format of the decoder output buffer as full-range, but it seems not working with the final RGB image.
Is the pipeline simply does not support full-range processing or just the interface has not been implemented?
Besides, the function NvEGLImageFromFd() should contain the construct progress of eglImage from DMAfd, where the eglImage should be able to be configured as full-range. Is it possible that we could access the implementation of this function?
Hi EvanKwok,
Please share steps to reproduce the issue. Such as a patch to be applied to tegra_multimedia_api samples and detail steps to run and observe the issue you are facing.
Here is the complete step we took to reproduce this issue:
extract H264 stream from the mp4 file:
```
ffmpeg -i fullrange.mp4 -c:v copy -bsf:v h264_mp4toannexb fullrange.264
```
execute the decoding and rendering with the sample code:
```
./video_decode fullrange.264 H264 -ww 1920 -wh 1080
```
compare the rgb data in #1 and #2
The progress that we dump the image from OpenGL will automatically do the YUV2RGB conversion, and this conversion is where the issue happens, losing the top/bottom value.
Really?.. This is the default package that we saw on the TX2 develop board… But I do see the newly released API, I’ll give a try on r28.2 and feedback here.
No I’m comparing the data. As you can see the reply #5, I attached 2 screenshots of the histogram respectively from the 264 and the render output. It’s obviously that in the latter there’s much more pixels lay on value 0/255, while there’s few in the former.
Hi EvanKwok,
We need clear steps to reproduce the issue, so that we can do further check.
If the issue is in RGBA, please share how to generate and compare the dumped RGBAs. If the issue is in NV12, please share how to generate and compare the dumped NV12s. It makes no sense you compare NV12 with RGBA.
Hi EvanKwok,
We checked and TX2-decoded NV12s are in full range 0-255 but ffmpeg-decoded NV12s is in 16-235. Please reer to attached binary comparison and picture comparison. TX2-decoded NV12 is brighter.