Lines Matching refs:dstfmt

80 #define MAKE8888(dstfmt, r, g, b, a)  \
81 ( ((r<<dstfmt->Rshift)&dstfmt->Rmask) | \
82 ((g<<dstfmt->Gshift)&dstfmt->Gmask) | \
83 ((b<<dstfmt->Bshift)&dstfmt->Bmask) | \
84 ((a<<dstfmt->Ashift)&dstfmt->Amask) )
105 const SDL_PixelFormat *dstfmt)
122 if (!dstfmt) {
123 dstfmt = &default_pixel_format;
133 Uint32 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift);
134 Uint32 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift);
135 Uint32 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift);
138 if (dstfmt->Amask) {
139 amask = ((srcfmt->Amask) ? RESHIFT(srcfmt->Ashift) : 0x10) << (dstfmt->Ashift);
141 amask = 0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^ 0xFFFFFFFF);
258 SDL_PixelFormat *dstfmt = info->dst;
310 assert(dstfmt->BytesPerPixel == 4);
315 if (dstfmt->Amask && srcfmt->alpha) {
323 vpermute = calc_swizzle32(NULL, dstfmt);
340 ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \
403 SDL_PixelFormat *dstfmt = info->dst;
455 assert(dstfmt->BytesPerPixel == 4);
460 if (dstfmt->Amask && srcfmt->alpha) {
468 vpermute = calc_swizzle32(NULL, dstfmt);
485 ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \
551 SDL_PixelFormat *dstfmt = info->dst;
552 int dstbpp = dstfmt->BytesPerPixel;
553 int copy_alpha = (srcfmt->Amask && dstfmt->Amask);
554 unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
562 vpermute = calc_swizzle32(srcfmt, dstfmt);
593 ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \
607 ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \
664 SDL_PixelFormat *dstfmt = info->dst;
666 vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
667 if (dstfmt->Amask && !srcfmt->Amask) {
676 assert(dstfmt->BytesPerPixel == 4);
692 *(dst++) = MAKE8888(dstfmt, r, g, b, a);
719 *(dst++) = MAKE8888(dstfmt, r, g, b, a);
742 SDL_PixelFormat *dstfmt = info->dst;
744 vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt);
745 if (dstfmt->Amask && !srcfmt->Amask) {
754 assert(dstfmt->BytesPerPixel == 4);
772 *(dst++) = MAKE8888(dstfmt, r, g, b, a);
801 *(dst++) = MAKE8888(dstfmt, r, g, b, a);
1999 SDL_PixelFormat *dstfmt = info->dst;
2001 if (dstfmt->Amask) {
2003 Uint32 mask = (srcfmt->alpha >> dstfmt->Aloss) << dstfmt->Ashift;
2044 SDL_PixelFormat *dstfmt = info->dst;
2045 int dstbpp = dstfmt->BytesPerPixel;
2046 unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
2056 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha);
2076 SDL_PixelFormat *dstfmt = info->dst;
2077 int dstbpp = dstfmt->BytesPerPixel;
2087 ASSEMBLE_RGBA(dst, dstbpp, dstfmt,
2199 SDL_PixelFormat *dstfmt = info->dst;
2201 int dstbpp = dstfmt->BytesPerPixel;
2202 unsigned alpha = dstfmt->Amask ? srcfmt->alpha : 0;
2218 ASSEMBLE_RGBA(dst, dstbpp, dstfmt,
2240 SDL_PixelFormat *dstfmt = info->dst;
2250 dstbpp = dstfmt->BytesPerPixel;
2260 ASSEMBLE_RGBA(dst, dstbpp, dstfmt,
2378 SDL_PixelFormat *dstfmt;
2386 dstfmt = surface->map->dst->format;
2394 if ( dstfmt->BitsPerPixel < 8 ) {
2406 else if(dstfmt->BytesPerPixel == 1)
2410 if((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4) && SDL_HasAltiVec()) {
2415 if(srcfmt->Amask && dstfmt->Amask)
2423 if ( dstfmt->BitsPerPixel == 8 ) {
2445 if(dstfmt->Amask)
2452 MASKOK(dstfmt->Rmask, table[which].dstR) &&
2453 MASKOK(dstfmt->Gmask, table[which].dstG) &&
2454 MASKOK(dstfmt->Bmask, table[which].dstB) &&
2455 dstfmt->BytesPerPixel == table[which].dstbpp &&
2465 if ( srcfmt->BytesPerPixel == 4 && dstfmt->BytesPerPixel == 4 &&
2466 srcfmt->Rmask == dstfmt->Rmask &&
2467 srcfmt->Gmask == dstfmt->Gmask &&
2468 srcfmt->Bmask == dstfmt->Bmask ) {