899 Uint32 Rmask, Gmask, Bmask, Amask;
903 (target_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask) || bpp < 15) {
904 return SDL_SetError(
"Unsupported YUV destination format");
908 r_2_pix_alloc = &swdata->
rgb_2_pix[0 * 768];
909 g_2_pix_alloc = &swdata->
rgb_2_pix[1 * 768];
910 b_2_pix_alloc = &swdata->
rgb_2_pix[2 * 768];
915 for (i = 0; i < 256; ++
i) {
919 r_2_pix_alloc[i + 256] <<= freebits;
921 r_2_pix_alloc[i + 256] |= Amask;
926 g_2_pix_alloc[i + 256] <<= freebits;
928 g_2_pix_alloc[i + 256] |= Amask;
933 b_2_pix_alloc[i + 256] <<= freebits;
935 b_2_pix_alloc[i + 256] |= Amask;
946 for (i = 0; i < 256; ++
i) {
947 r_2_pix_alloc[i + 256] |= (r_2_pix_alloc[i + 256]) << 16;
948 g_2_pix_alloc[i + 256] |= (g_2_pix_alloc[i + 256]) << 16;
949 b_2_pix_alloc[i + 256] |= (b_2_pix_alloc[i + 256]) << 16;
957 for (i = 0; i < 256; ++
i) {
958 r_2_pix_alloc[
i] = r_2_pix_alloc[256];
959 r_2_pix_alloc[i + 512] = r_2_pix_alloc[511];
960 g_2_pix_alloc[
i] = g_2_pix_alloc[256];
961 g_2_pix_alloc[i + 512] = g_2_pix_alloc[511];
962 b_2_pix_alloc[
i] = b_2_pix_alloc[256];
963 b_2_pix_alloc[i + 512] = b_2_pix_alloc[511];
971 #ifdef USE_MMX_ASSEMBLY
974 (Gmask == 0x07E0) && (Bmask == 0x001F)
975 && (swdata->
w & 15) == 0) {
977 swdata->
Display1X = Color565DitherYV12MMX1X;
992 #ifdef USE_MMX_ASSEMBLY
995 (Gmask == 0x0000FF00) &&
996 (Bmask == 0x000000FF) && (swdata->
w & 15) == 0) {
998 swdata->
Display1X = ColorRGBDitherYV12MMX1X;
static void Color24DitherYUY2Mod1X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color16DitherYV12Mod1X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color16DitherYUY2Mod1X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
#define SDL_BYTESPERPIXEL(X)
static void Color24DitherYV12Mod2X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static int number_of_bits_set(Uint32 a)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
static void Color16DitherYV12Mod2X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
#define SDL_PixelFormatEnumToMasks
static void Color32DitherYUY2Mod1X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static SDL_INLINE int free_bits_at_bottom(Uint32 a)
static void Color16DitherYUY2Mod2X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color32DitherYUY2Mod2X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
void(* Display2X)(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color24DitherYV12Mod1X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color32DitherYV12Mod2X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color24DitherYUY2Mod2X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
void(* Display1X)(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)
static void Color32DitherYV12Mod1X(int *colortab, Uint32 *rgb_2_pix, unsigned char *lum, unsigned char *cr, unsigned char *cb, unsigned char *out, int rows, int cols, int mod)