896 Uint32 Rmask, Gmask, Bmask, Amask;
899 (target_format, &bpp, &Rmask, &Gmask, &Bmask, &Amask) || bpp < 15) {
900 return SDL_SetError(
"Unsupported YUV destination format");
904 r_2_pix_alloc = &swdata->
rgb_2_pix[0 * 768];
905 g_2_pix_alloc = &swdata->
rgb_2_pix[1 * 768];
906 b_2_pix_alloc = &swdata->
rgb_2_pix[2 * 768];
911 for (i = 0; i < 256; ++
i) {
914 r_2_pix_alloc[i + 256] |= Amask;
917 g_2_pix_alloc[i + 256] |= Amask;
920 b_2_pix_alloc[i + 256] |= Amask;
931 for (i = 0; i < 256; ++
i) {
932 r_2_pix_alloc[i + 256] |= (r_2_pix_alloc[i + 256]) << 16;
933 g_2_pix_alloc[i + 256] |= (g_2_pix_alloc[i + 256]) << 16;
934 b_2_pix_alloc[i + 256] |= (b_2_pix_alloc[i + 256]) << 16;
942 for (i = 0; i < 256; ++
i) {
943 r_2_pix_alloc[
i] = r_2_pix_alloc[256];
944 r_2_pix_alloc[i + 512] = r_2_pix_alloc[511];
945 g_2_pix_alloc[
i] = g_2_pix_alloc[256];
946 g_2_pix_alloc[i + 512] = g_2_pix_alloc[511];
947 b_2_pix_alloc[
i] = b_2_pix_alloc[256];
948 b_2_pix_alloc[i + 512] = b_2_pix_alloc[511];
956 #if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES 959 (Gmask == 0x07E0) && (Bmask == 0x001F)
960 && (swdata->
w & 15) == 0) {
962 swdata->
Display1X = Color565DitherYV12MMX1X;
977 #if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES 980 (Gmask == 0x0000FF00) &&
981 (Bmask == 0x000000FF) && (swdata->
w & 15) == 0) {
983 swdata->
Display1X = ColorRGBDitherYV12MMX1X;
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 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)
uint32_t Uint32
An unsigned 32-bit integer type.
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp
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)
static int free_bits_at_bottom(Uint32 a)
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)
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)
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 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)
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)
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)