diff DOCS/tech/colorspaces.txt @ 5586:6ce9c6231bdd

updated
author arpi
date Sat, 13 Apr 2002 02:09:18 +0000
parents 329896ab1989
children 441c98167877
line wrap: on
line diff
--- a/DOCS/tech/colorspaces.txt	Sat Apr 13 01:54:20 2002 +0000
+++ b/DOCS/tech/colorspaces.txt	Sat Apr 13 02:09:18 2002 +0000
@@ -1,9 +1,27 @@
-Huh. The planar YUV modes.
-==========================
+In general
+==========
+
+There are planar and packed modes.
+- Planar mode means: you have 3 separated image, one for each component,
+each image 8 bites/pixel. To get the real colored pixel, you have to
+mix the components from all planes. The resolution of planes may differ!
+- Packed mode means: you have all components mixed/interleaved together,
+so you have small "packs" of components in a single, big image.
 
-The most missunderstood thingie...
+There are RGB and YUV colorspaces.
+- RGB: Read, Green and Blue components. Used by analog VGA monitors.
+- YUV: Luminance (Y) and Chrominance (U,V) components. Used by some
+  video systems, like PAL. Also most m(j)peg/dct based codecs use this.
 
-Let's see: (some cut'n'paste from www and maillist)
+With YUV, they used to reduce the resolution of U,V planes:
+The most common YUV formats:
+fourcc:    bpp: IEEE:      plane sizes: (w=width h=height of original image)
+?          24   YUV 4:4:4  Y: w * h  U,V: w * h
+YUY2,UYVY  16   YUV 4:2:2  Y: w * h  U,V: (w/2) * h
+YV12,I420  12   YUV 4:2:0  Y: w * h  U,V: (w/2) * (h/2)
+YVU9        9   YUV 4:1:1  Y: w * h  U,V: (w/4) * (h/4)
+
+conversion: (some cut'n'paste from www and maillist)
 
 RGB to YUV Conversion:
     Y  =      (0.257 * R) + (0.504 * G) + (0.098 * B) + 16
@@ -35,10 +53,14 @@
 U = Cb = blue component (0=green 128=grey 255=blue)
 V = Cr = red component  (0=green 128=grey 255=red)
 
-MPlayer side:
-=============
+
+Huh. The planar YUV modes.
+==========================
+
+The most missunderstood thingie...
+
 In MPlayer, we usually have 3 pointers to the Y, U and V planes, so it
-doesn't matter what is they order in memory:
+doesn't matter what is the order of the planes in the memory:
     for mp_image_t and libvo's draw_slice():
 	planes[0] = Y = luminance
 	planes[1] = U = Cb = blue