View Full Version : Green tinge : which RGB (YUV?) conversion to apply

11-04-2011, 09:27 AM
- I draw in opengl with RGBA colors these texts (with the color between parenthesis) :
RED-alpha50 (255,0,0,50) RED-alpha128 (255,0,0,128) RED-alpha255 (255,0,0,255)
GREEN-alpha50 (0,255,0,50) GREEN-alpha128 (0,255,0,128) GREEN-alpha255 (0,255,0,255)
BLUE-alpha50 (0,0,255,50) BLUE-alpha128 (0,0,255,128) BLUE-alpha255 (0,0,255,255)

- I memcpy in the buffer (getByte) of a frame created with the format bmdFormat8BitBGRA
at the size of 1280 pixels by 720 pixels,
and then send it to the SDI output of a video capture card.

- Here are links to screenshot of what we see on the TV set :
Channel A (should be the fill : so we expect RGB values)
<a href="http://www.hostingpics.net/viewer.php?id=444718SDIChA.jpg"><img src="http://img11.hostingpics.net/thumbs/mini_444718SDIChA.jpg" alt="Heberger image" /></a>
http://img11.hostingpics.net/thumbs/mini_444718SDIChA.jpg (http://www.hostingpics.net/viewer.php?id=444718SDIChA.jpg)
Channel B (should be the key : so we expect grey-scale values)
http://img11.hostingpics.net/thumbs/mini_449411SDIChB.jpg (http://www.hostingpics.net/viewer.php?id=449411SDIChB.jpg)
<a href="http://www.hostingpics.net/viewer.php?id=449411SDIChB.jpg"><img src="http://img11.hostingpics.net/thumbs/mini_449411SDIChB.jpg" alt="Heberger image" /></a>

I am not sure which color conversion I should try.

=> Can someone give me hint or working tracks for why the background which should be black is a "half" green (I reckon it to be green with 50% alpha : 0,255,0,128 or else in YUV) ?

=> Is it a question of unsigned byte vs byte : why do I obtain black with (255,0,0,128) and red with (255,0,0,255) : why is the red range reached with alpha between 128 and 255 ?
(but green gets whiter at (0,255,0,255) and blue is a little greenish at (0,0,255,128)).

=> is it a question of converting SDI to HDMI or a HDCP issue ?

Thanks to all for any help,
I am a bit dazzled, and quite new to color conversion,
any help will be so great,

Bruce Wheaton
11-04-2011, 09:59 AM
Answered on Decklink email list - this is probably a decklink and maybe TV problem.

It may be possible to pre-process pixels to be YUV even when the signal path expects RGB, but that's a poor idea.