Mercurial > mplayer.hg
comparison DOCS/tech/colorspaces.txt @ 5587:441c98167877
RGBvsBGR added
author | arpi |
---|---|
date | Sat, 13 Apr 2002 02:17:43 +0000 |
parents | 6ce9c6231bdd |
children | cebe55b15cd4 |
comparison
equal
deleted
inserted
replaced
5586:6ce9c6231bdd | 5587:441c98167877 |
---|---|
77 YV12: 12 bpp, full sized Y plane followed by 2x2 subsampled V and U planes | 77 YV12: 12 bpp, full sized Y plane followed by 2x2 subsampled V and U planes |
78 I420: 12 bpp, full sized Y plane followed by 2x2 subsampled U and V planes | 78 I420: 12 bpp, full sized Y plane followed by 2x2 subsampled U and V planes |
79 IYUV: the same as I420 | 79 IYUV: the same as I420 |
80 YVU9: 9 bpp, full sized Y plane followed by 4x4 subsampled V and U planes | 80 YVU9: 9 bpp, full sized Y plane followed by 4x4 subsampled V and U planes |
81 | 81 |
82 Huh 2. RGB vs. BGR ? | |
83 ==================== | |
84 | |
85 The 2nd most missunderstood thingie... | |
86 | |
87 You know, there are Intel and Motorola, and they use different byteorder. | |
88 There are also others, like MIPS or Alpha, they all follow either Intel | |
89 or Motorola byteorder. | |
90 Unfortunatelly, the packed colorspaces depend on CPU byteorder. So, RGB | |
91 on Intel and Motorola means different order of bytes. | |
92 | |
93 In MPlayer, we have constants IMGFMT_RGBxx and IMGFMT_BGRxx. | |
94 Unfortunatelly, some codecs and vo drivers follow Intel, some follow Motorola | |
95 byteorder, so they are incompatible. We had to find a stable base, so long | |
96 time ago I've choose OpenGL, as it's a wide-spreaded standard, and it well | |
97 defines what is RGB and what is BGR. So, MPlayer's RGB is compatible with | |
98 OpenGL's GL_RGB on all platforms, and the same stay for BGR - GL_BGR. | |
99 Unfortunatelly, most of the x86 codecs call our BGR to RGB, so it sometimes | |
100 confuse developers. | |
101 | |
102 If you are unsure, try the OpenGL driver (-vo gl). There is at least software | |
103 OpenGL implementation for all major platforms and OSes. | |
104 |