[vlc-devel] Re: What's FOURCC RGB2 format?

R. Bernstein rocky at panix.com
Fri Jan 16 17:21:17 CET 2004


Sigmund Augdal writes:
 > Try chaning color depth in X, and use x11 vout. 

Okay will try later. Thanks for the suggestion.

 > Rendering in RGB2 is kind of
 > difficult, because you whould have to take the palette into acount. Should
 > you render in one of the existing colors, or should you "take" a slot in the
 > palette, and then dither away all current uses of that color?

Here's my current thoughts on this. 

For subtitles, we are only dealing with effectively 3 colors - four
max and one is almost certainly completely transparent. Two of the
colors are probably black and/or white which are probably in the
palette. So we're only talking about maybe one or two other
colors. And the underlying object is *text*, not some sort of complex
multi-color image. So it's probably fine just to find the closest
matching color in the color palette.

Although it's not hard to write a find-nearest-palette-entry routine
given an RGB or yuv color, is there one already in vlc? It would real
nice to use an existing routine than write another.

Assuming I have to write my own code, here are some questions. Looking
at modules/video_chroma/i420_rgb.c, it looks the the RGB palette is
fully populated, so I can't just say see if there are any free slots
and add my own 3 colors at the end. Correct?



More information about the vlc-devel mailing list