Lines Matching refs:dstfmt

99 #define MAKE8888(dstfmt, r, g, b, a)  \  argument
100 ( ((r<<dstfmt->Rshift)&dstfmt->Rmask) | \
101 ((g<<dstfmt->Gshift)&dstfmt->Gmask) | \
102 ((b<<dstfmt->Bshift)&dstfmt->Bmask) | \
103 ((a<<dstfmt->Ashift)&dstfmt->Amask) )
124 calc_swizzle32(const SDL_PixelFormat * srcfmt, const SDL_PixelFormat * dstfmt) in calc_swizzle32() argument
152 if (!dstfmt) { in calc_swizzle32()
153 dstfmt = &default_pixel_format; in calc_swizzle32()
157 rmask = RESHIFT(srcfmt->Rshift) << (dstfmt->Rshift); in calc_swizzle32()
158 gmask = RESHIFT(srcfmt->Gshift) << (dstfmt->Gshift); in calc_swizzle32()
159 bmask = RESHIFT(srcfmt->Bshift) << (dstfmt->Bshift); in calc_swizzle32()
162 if (dstfmt->Amask) { in calc_swizzle32()
165 Ashift) : 0x10) << (dstfmt->Ashift); in calc_swizzle32()
168 0x10101010 & ((dstfmt->Rmask | dstfmt->Gmask | dstfmt->Bmask) ^ in calc_swizzle32()
320 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit_RGB565_32Altivec() local
368 SDL_assert(dstfmt->BytesPerPixel == 4); in Blit_RGB565_32Altivec()
373 if (dstfmt->Amask && info->a) { in Blit_RGB565_32Altivec()
381 vpermute = calc_swizzle32(NULL, dstfmt); in Blit_RGB565_32Altivec()
398 ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ in Blit_RGB565_32Altivec()
467 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit_RGB555_32Altivec() local
515 SDL_assert(dstfmt->BytesPerPixel == 4); in Blit_RGB555_32Altivec()
520 if (dstfmt->Amask && info->a) { in Blit_RGB555_32Altivec()
528 vpermute = calc_swizzle32(NULL, dstfmt); in Blit_RGB555_32Altivec()
545 ASSEMBLE_RGBA(dst, 4, dstfmt, sR, sG, sB, alpha); \ in Blit_RGB555_32Altivec()
616 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit32to32KeyAltivec() local
617 int dstbpp = dstfmt->BytesPerPixel; in Blit32to32KeyAltivec()
618 int copy_alpha = (srcfmt->Amask && dstfmt->Amask); in Blit32to32KeyAltivec()
619 unsigned alpha = dstfmt->Amask ? info->a : 0; in Blit32to32KeyAltivec()
627 vpermute = calc_swizzle32(srcfmt, dstfmt); in Blit32to32KeyAltivec()
659 ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \ in Blit32to32KeyAltivec()
673 ASSEMBLE_RGBA((Uint8 *)dstp, dstbpp, dstfmt, \ in Blit32to32KeyAltivec()
737 SDL_PixelFormat *dstfmt = info->dst_fmt; in ConvertAltivec32to32_noprefetch() local
739 vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt); in ConvertAltivec32to32_noprefetch()
740 if (dstfmt->Amask && !srcfmt->Amask) { in ConvertAltivec32to32_noprefetch()
749 SDL_assert(dstfmt->BytesPerPixel == 4); in ConvertAltivec32to32_noprefetch()
767 *(dst++) = MAKE8888(dstfmt, r, g, b, a); in ConvertAltivec32to32_noprefetch()
800 *(dst++) = MAKE8888(dstfmt, r, g, b, a); in ConvertAltivec32to32_noprefetch()
824 SDL_PixelFormat *dstfmt = info->dst_fmt; in ConvertAltivec32to32_prefetch() local
826 vector unsigned char vpermute = calc_swizzle32(srcfmt, dstfmt); in ConvertAltivec32to32_prefetch()
827 if (dstfmt->Amask && !srcfmt->Amask) { in ConvertAltivec32to32_prefetch()
836 SDL_assert(dstfmt->BytesPerPixel == 4); in ConvertAltivec32to32_prefetch()
858 *(dst++) = MAKE8888(dstfmt, r, g, b, a); in ConvertAltivec32to32_prefetch()
895 *(dst++) = MAKE8888(dstfmt, r, g, b, a); in ConvertAltivec32to32_prefetch()
2182 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit4to4MaskAlpha() local
2184 if (dstfmt->Amask) { in Blit4to4MaskAlpha()
2186 Uint32 mask = ((Uint32)info->a >> dstfmt->Aloss) << dstfmt->Ashift; in Blit4to4MaskAlpha()
2250 get_permutation(SDL_PixelFormat *srcfmt, SDL_PixelFormat *dstfmt, in get_permutation() argument
2259 int dstbpp = dstfmt->BytesPerPixel; in get_permutation()
2269 if (dstfmt->Amask) { in get_permutation()
2271 PIXEL_FROM_RGBA(Pixel, dstfmt, p0, p1, p2, p3); in get_permutation()
2273 PIXEL_FROM_RGBA(Pixel, dstfmt, p0, p1, p2, 0); in get_permutation()
2276 PIXEL_FROM_RGB(Pixel, dstfmt, p0, p1, p2); in get_permutation()
2340 SDL_PixelFormat *dstfmt = info->dst_fmt; in BlitNtoN() local
2341 int dstbpp = dstfmt->BytesPerPixel; in BlitNtoN()
2342 unsigned alpha = dstfmt->Amask ? info->a : 0; in BlitNtoN()
2348 dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) { in BlitNtoN()
2352 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel); in BlitNtoN()
2380 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL); in BlitNtoN()
2402 dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) { in BlitNtoN()
2406 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel); in BlitNtoN()
2437 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha); in BlitNtoN()
2459 SDL_PixelFormat *dstfmt = info->dst_fmt; in BlitNtoNCopyAlpha() local
2460 int dstbpp = dstfmt->BytesPerPixel; in BlitNtoNCopyAlpha()
2467 dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) { in BlitNtoNCopyAlpha()
2471 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL); in BlitNtoNCopyAlpha()
2497 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA); in BlitNtoNCopyAlpha()
2617 SDL_PixelFormat *dstfmt = info->dst_fmt; in BlitNtoNKey() local
2619 int dstbpp = dstfmt->BytesPerPixel; in BlitNtoNKey()
2620 unsigned alpha = dstfmt->Amask ? info->a : 0; in BlitNtoNKey()
2623 int dfmt = dstfmt->format; in BlitNtoNKey()
2629 …= 4 && dstbpp == 4 && srcfmt->Rmask == dstfmt->Rmask && srcfmt->Gmask == dstfmt->Gmask && srcfmt->… in BlitNtoNKey()
2633 if (dstfmt->Amask) { in BlitNtoNKey()
2635 Uint32 mask = ((Uint32)info->a) << dstfmt->Ashift; in BlitNtoNKey()
2676 dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) { in BlitNtoNKey()
2680 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel); in BlitNtoNKey()
2788 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL); in BlitNtoNKey()
2813 dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) { in BlitNtoNKey()
2827 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, &alpha_channel); in BlitNtoNKey()
2866 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha); in BlitNtoNKey()
2889 SDL_PixelFormat *dstfmt = info->dst_fmt; in BlitNtoNKeyCopyAlpha() local
2899 dstbpp = dstfmt->BytesPerPixel; in BlitNtoNKeyCopyAlpha()
2903 if (srcfmt->format == dstfmt->format) { in BlitNtoNKeyCopyAlpha()
2935 dstfmt->format != SDL_PIXELFORMAT_ARGB2101010) { in BlitNtoNKeyCopyAlpha()
2939 get_permutation(srcfmt, dstfmt, &p0, &p1, &p2, &p3, NULL); in BlitNtoNKeyCopyAlpha()
2969 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA); in BlitNtoNKeyCopyAlpha()
2991 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit2101010toN() local
2992 int dstbpp = dstfmt->BytesPerPixel; in Blit2101010toN()
3002 ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA); in Blit2101010toN()
3057 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit_3or4_to_3or4__same_rgb() local
3058 int dstbpp = dstfmt->BytesPerPixel; in Blit_3or4_to_3or4__same_rgb()
3060 if (dstfmt->Amask) { in Blit_3or4_to_3or4__same_rgb()
3062 Uint32 mask = ((Uint32)info->a) << dstfmt->Ashift; in Blit_3or4_to_3or4__same_rgb()
3131 SDL_PixelFormat *dstfmt = info->dst_fmt; in Blit_3or4_to_3or4__inversed_rgb() local
3132 int dstbpp = dstfmt->BytesPerPixel; in Blit_3or4_to_3or4__inversed_rgb()
3134 if (dstfmt->Amask) { in Blit_3or4_to_3or4__inversed_rgb()
3151 Uint32 alphashift = ((Uint32)src[i3]) << dstfmt->Ashift; in Blit_3or4_to_3or4__inversed_rgb()
3163 Uint32 mask = ((Uint32)info->a) << dstfmt->Ashift; in Blit_3or4_to_3or4__inversed_rgb()
3363 SDL_PixelFormat *dstfmt; in SDL_CalculateBlitN() local
3370 dstfmt = surface->map->dst->format; in SDL_CalculateBlitN()
3373 if (dstfmt->BitsPerPixel < 8) { in SDL_CalculateBlitN()
3380 if (dstfmt->BitsPerPixel == 8) { in SDL_CalculateBlitN()
3397 if (dstfmt->Amask) in SDL_CalculateBlitN()
3404 MASKOK(dstfmt->Rmask, table[which].dstR) && in SDL_CalculateBlitN()
3405 MASKOK(dstfmt->Gmask, table[which].dstG) && in SDL_CalculateBlitN()
3406 MASKOK(dstfmt->Bmask, table[which].dstB) && in SDL_CalculateBlitN()
3407 dstfmt->BytesPerPixel == table[which].dstbpp && in SDL_CalculateBlitN()
3418 } else if (dstfmt->format == SDL_PIXELFORMAT_ARGB2101010) { in SDL_CalculateBlitN()
3421 dstfmt->BytesPerPixel == 4 && in SDL_CalculateBlitN()
3422 srcfmt->Rmask == dstfmt->Rmask && in SDL_CalculateBlitN()
3423 srcfmt->Gmask == dstfmt->Gmask && in SDL_CalculateBlitN()
3424 srcfmt->Bmask == dstfmt->Bmask) { in SDL_CalculateBlitN()
3426 if (srcfmt->Amask == dstfmt->Amask) { in SDL_CalculateBlitN()
3450 else if (dstfmt->BytesPerPixel == 1) in SDL_CalculateBlitN()
3454 if ((srcfmt->BytesPerPixel == 4) && (dstfmt->BytesPerPixel == 4) in SDL_CalculateBlitN()
3459 if (srcfmt->Amask && dstfmt->Amask) { in SDL_CalculateBlitN()