comparison include/SDL_pixels.h @ 1675:d33dcfc3fde7 SDL-1.3

Overlay functions are being replaced by YUV textures. If the driver doesn't support YUV textures, they can be emulated by backing the texture with an RGB texture and using the software conversion routines. Note that it doesn't make sense to lock a portion of a YV12 texture, since you'd need to return three pixel pointers and pitch values instead of the one that's available through the API. I'm guessing that's one of the reasons DirectX 9 doesn't support this format at all.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 11 Jun 2006 07:30:16 +0000
parents 4da1ee79c9af
children e136f3ffdc1b
comparison
equal deleted inserted replaced
1674:7688a73b25b1 1675:d33dcfc3fde7
92 SDL_PackedLayout_565, 92 SDL_PackedLayout_565,
93 SDL_PackedLayout_8888, 93 SDL_PackedLayout_8888,
94 SDL_PackedLayout_2101010, 94 SDL_PackedLayout_2101010,
95 SDL_PackedLayout_1010102, 95 SDL_PackedLayout_1010102,
96 }; 96 };
97
98 #define SDL_DEFINE_PIXELFOURCC(A, B, C, D) \
99 ((A) | ((B) << 8) | ((C) << 16) | ((D) << 24))
97 100
98 #define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \ 101 #define SDL_DEFINE_PIXELFORMAT(type, order, layout, bits, bytes) \
99 ((1 << 31) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \ 102 ((1 << 31) | ((type) << 24) | ((order) << 20) | ((layout) << 16) | \
100 ((bits) << 8) | ((bytes) << 0)) 103 ((bits) << 8) | ((bytes) << 0))
101 104
165 SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_BGRA, 168 SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_BGRA,
166 SDL_PackedLayout_8888, 32, 4), 169 SDL_PackedLayout_8888, 32, 4),
167 SDL_PixelFormat_ARGB2101010 = 170 SDL_PixelFormat_ARGB2101010 =
168 SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB, 171 SDL_DEFINE_PIXELFORMAT(SDL_PixelType_Packed32, SDL_PackedOrder_ARGB,
169 SDL_PackedLayout_2101010, 32, 4), 172 SDL_PackedLayout_2101010, 32, 4),
173
174 SDL_PixelFormat_YV12 = SDL_DEFINE_PIXELFOURCC('Y', 'V', '1', '2'),
175 SDL_PixelFormat_IYUV = SDL_DEFINE_PIXELFOURCC('I', 'Y', 'U', 'V'),
176 SDL_PixelFormat_YUY2 = SDL_DEFINE_PIXELFOURCC('Y', 'U', 'Y', '2'),
177 SDL_PixelFormat_UYVY = SDL_DEFINE_PIXELFOURCC('U', 'Y', 'V', 'Y'),
178 SDL_PixelFormat_YVYU = SDL_DEFINE_PIXELFOURCC('Y', 'V', 'Y', 'U'),
170 }; 179 };
171 180
172 typedef struct SDL_Color 181 typedef struct SDL_Color
173 { 182 {
174 Uint8 r; 183 Uint8 r;