Macgyver Li
RGB555 means five levels in red, five in green and five in blue. With
RGB555 you have 5*5*5 = 125 colours. Same thing for RGB656 (150 colors)
and RGB888 (512 colors).
Send me an E-Mail if you want to know more about using those formats
(fast color indexing algos for example).
No descriptions for the other formats. I only use RGB format.
---
Fred :-)
NO ...
RGB888 => 2^8*2^8*2^8 = 16777216 colours
so RGB555 should give you => 2^5*2^5*2^5 = 32768 colours
hence RGB565 => 65536 colours
: ---
: Fred :-)
PSY.
>Does anyone know the differeent between the following format?
>RGB555
>RGB565
>RGB888
>RGB88X
This is the number of bits used for red, green and blue, e.g.
565 means 5 bits/red, thus 2^5=32 shades, 6 bits/green (2^6 = 64
shades) and 5 bits for blue. You'll get a total number of 2^(5+6+5) =
65536 colors (often called 64K, as 65536 = 64 * 1024).
I don't know what RGB88X means.
>YUY2
???
>YUV422
This is about color subsampling - for 4 * 4 = 16 Y samples, 2 * 2 = 4
and 2 * 2 = 4 V samples are stored. Before applying any compression,
you have already saved 16 - 4 = 12 samples for both U and V, a total
reduction of 50 percent. You can do that because the Y sample
information is more important for the human eye than that of the other
samples.
>YVU12
?
Marco
I’m surprise by your answer, but I thing you are right. You are two and
I’m alone, so I lost :-(
However, I don’t use the same representation for RGBXYZ. For me, each of
the three compound (red, green and blue) is on one BYTE. The value
indicates the number of level for the corresponding compound : for
example RGB656 means :
5 levels for red
6 levels for green
5 levels for blue
equal 5*6*5 = 150 colors in the color table
This is useful for fast color reduction. You can easily calculate the
corresponding position in the color table of a TrueColor value.
---
FRED :-)
: RGB888 => 2^8*2^8*2^8 = 16777216 colours
: so RGB555 should give you => 2^5*2^5*2^5 = 32768 colours
: hence RGB565 => 65536 colours
: PSY.
YUY2 (or maybe YUV2) is a kind of YUV format:
Y represents Luminance
U,V represents Chrominance (is you discard them you get a Black&white picture)
In YUY2, one information chunk represents 2 pixels on the same line:
one chunk looks like : Y1-U-Y2-V
Y1 is the Y component for the first pixel Y2 for the second
U-V are U-V components for both pixels.
YUV422 is a kind of YUY2 format I think, where Y1-Y2 are each 4 bits long and
U-V are also 4 bits long.
I think I read this in DirectX SDK.
To verify this you can allocate a YUV backbuffer and look for YUV pixel settings.
L@
I'm coming into this sort of late, so maybe I missed something earlier.
It seems to me that there is an inconsistancy with regard to the meaning
of the numbers in RGB565 and YUV422. RGB565 implies 5 bits of red, 6 of
green and 5 of blue. YUV422 inplies 4 samples (8 bit samples?) of
Y(luma) for each 2 samples of U and V (chroma). YUV422 is generally
sequenced as Y1-U1-Y2-V1-Y3-U3-Y4-V4. (this is based on the NTSC/PAL
standard where the chroma bandwidth is 1/2 the luma bandwidth) YUV411
means there are 4 luma samples for each U and V sample. Each sample
of Y, U, and V are generally 8 bits in video applications, but I suppose
thay can be any size. (there is a good picture in the Philips Video
databook that shows the common spatial relationships between the luma and
chroma samples)
What confuses me is that I've seen 24bit RGB referred to as RGB444 (4
samples of R for 4 samples of G....etc) and as RGB888 (8 bits per
sample). I guess the video guys like 8 bit samples, and the graphics
guys like to play with sample sizes. RGB565 seems to always always refer
to bit sizes.
Anyone really know where to draw the line? Is it a matter of context?
Bruce
I'm afraid you are wrong there.
RGB555 refers to 5 bits of data used for each colour (ie 32 levels for
each colour or 32768 colours total)
RGB565 is the same except 6 bits are used for green (your eye is more
sensitive to green) so you get 65536 colours. This is the normal 16 bit
colour format.
RGB888 uses 1 byte for each colour. This is known as 24 bit colour.
I'm not sure about RGB88X, YUY2 and YUU12. They look like typos to me.
YUV422 is a format used when digitizing video where the luminace
(brightness) is sampled at a higher resolution than the chrominance
(colour).
Kevan Ahmadi
k...@kahmadi.demon.co.uk
> YUV422 is generally sequenced as Y1-U1-Y2-V1-Y3-U3-Y4-V4.
The standard Rec. 601 and its derivatives call for this ordering: Cb
(loosely called U) is first, or zero-th if you like, followed by Y'0, then
Cr, then Y1. The Cb and Cr are suited at the Y'0 luma sample. The sequence
repeats across the scan line. This is the sequence used in Abekas
so-called YUV files.
C.
-----
Charles Poynton
<mailto:poy...@poynton.com> [Mac Eudora/MIME/BinHex/uu]
<http://www.inforamp.net/~poynton/>
-----
YUV422 uses luminance and chrominance to express colours. Y is
'luminance', U is 'red-chrominance' and V is 'blue-chrominance' (they
could be the other way round U & V, it's a long time since i did this).
422 specifies the amount of information for each component: Y has 2
bytes (the 4), U and V have 1 byte each (the two 2's). the format is
interlaced so that 2 adjacent pixels share the chrominance but have
separate luminances, i.e. if two pixels have R1 G1 B1 and R2 G2 B2 RGB
values then under YUV they would have Y1 U Y2 V (24-bits) where U
and V are averaged across the two pixels.
========================================================================
Matthew Denner Senior Software Engineer @ Abbotsbury Software Ltd
ma...@linux.wdi.co.uk http://linux.wdi.co.uk/~matt
========================================================================