Color Artifacts when using full range YUV in SignalGenHDR

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Astri'

  • Posts: 1
  • Joined: Fri Jun 27, 2025 9:16 am
  • Real Name: Malo Thiébaud

Color Artifacts when using full range YUV in SignalGenHDR

PostFri Jun 27, 2025 9:38 am

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
Image when I block the Blue to the reference value - 10BitYUV:
Image
Image when I block the Blue to the reference value - 10BitRGB:
Image

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

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 84 guests