Color Artifacts when using full range YUV in SignalGenHDR

Hello,
While testing the SignalGenHDR example in version 14.5, I noticed some artifacts with the BT2111 ramp if I changed it from black->white to black->any chroma color in YUV.
Here are some screenshots (signal is generated using the SignalGenHDR example in 1080p23.98, captures are made using the CaptureStill example) :
Default Image - 10BitYUV:

Image when I block the Blue to the reference value - 10BitYUV:

Image when I block the Blue to the reference value - 10BitRGB:

Here is now the code associated with the change (located in the FillLineRamp of the ColorBars.cpp file):
Default code:
Edited code:
I would assume there is a problem here, but I'm not sure where it is coming from. I noticed that the first artifact is near code 64, which the limit of the 10 bit legal range. Also note that the RGB image is looking correct, so I assume the issue comes from the RGB-YUV conversion, or the color clipping ?
If you have an idea, feel free to tell me how to fix the issue
Have a nice Day,
Malo
While testing the SignalGenHDR example in version 14.5, I noticed some artifacts with the BT2111 ramp if I changed it from black->white to black->any chroma color in YUV.
Here are some screenshots (signal is generated using the SignalGenHDR example in 1080p23.98, captures are made using the CaptureStill example) :
Default Image - 10BitYUV:

Image when I block the Blue to the reference value - 10BitYUV:

Image when I block the Blue to the reference value - 10BitRGB:

Here is now the code associated with the change (located in the FillLineRamp of the ColorBars.cpp file):
Default code:
- Code: Select all
// Interpolate ramp color
Color12BitRGB rampColor;
rampColor.Red = refColor.Red + (i - refColumn) * (endColor.Red - refColor.Red) / (endColumn - refColumn);
rampColor.Green = refColor.Green + (i - refColumn) * (endColor.Green - refColor.Green) / (endColumn - refColumn);
rampColor.Blue = refColor.Blue + (i - refColumn) * (endColor.Blue - refColor.Blue) / (endColumn - refColumn);
lineBuffer.push_back(rampColor);
Edited code:
- Code: Select all
// Interpolate ramp color
Color12BitRGB rampColor;
rampColor.Red = refColor.Red + (i - refColumn) * (endColor.Red - refColor.Red) / (endColumn - refColumn);
rampColor.Green = refColor.Green + (i - refColumn) * (endColor.Green - refColor.Green) / (endColumn - refColumn);
rampColor.Blue = refColor.Blue;
lineBuffer.push_back(rampColor);
I would assume there is a problem here, but I'm not sure where it is coming from. I noticed that the first artifact is near code 64, which the limit of the 10 bit legal range. Also note that the RGB image is looking correct, so I assume the issue comes from the RGB-YUV conversion, or the color clipping ?
If you have an idea, feel free to tell me how to fix the issue

Have a nice Day,
Malo