I am seeing a peculiar issue with nppiNV12ToBGR_709HDTV_8u_P2C3R.
I have created a bt709 test file using gstreamer:
gst-launch-1.0 videotestsrc num-buffers=100 ! “video/x-raw, height=1080, width=1920, colorimetry=(string)bt709” ! x264enc bitrate=10000000 ! qtmux ! filesink location=bt709.mp4
I then decoded the same file using the codec sdk and converted NV12->BGR using nppiNV12ToBGR_709HDTV_8u_P2C3R. This resulted in poor colour conversion. Dynamic range is lower than the original, ultimately the picture is dull.
I created a kernel which i believe uses the correct coefficients which produces much better colours and represents the original image.
float r = y * 1.164384 + v * 1.792741 - 248.101004; float g = y * 1.164384 - u * 0.213249 - v * 0.532909 + 76.878085; float b = y * 1.164384 + u * 2.112402 - 289.017577;
Am i doing something wrong or is there an issue with npp’s color conversion?
Thanks in advance,