Without explicit support for VIDEO_X2R10G10B10 VIDEO_X8R8G8B8 white
will be rendered as cyan-ish. The conversion leaves to lowest 2 bits
unset for more compact code.
Signed-off-by: Janne Grunau <j@jannau.net>
if (vid_priv->colour_bg)
val = 255 - val;
- out = val | val << 8 | val << 16;
+ if (vid_priv->format == VIDEO_X2R10G10B10)
+ out = val << 2 | val << 12 | val << 22;
+ else
+ out = val | val << 8 | val << 16;
if (vid_priv->colour_fg)
*dst++ |= out;
else
for (i = 0; i < width; i++) {
int out;
- out = val | val << 8 | val << 16;
+ if (vid_priv->format == VIDEO_X2R10G10B10)
+ out = val << 2 | val << 12 | val << 22;
+ else
+ out = val | val << 8 | val << 16;
if (vid_priv->colour_fg)
*dst++ |= out;
else