SDL  2.0
SDL_blit_auto.c File Reference
#include "../SDL_internal.h"
#include "SDL_video.h"
#include "SDL_blit.h"
#include "SDL_blit_auto.h"
+ Include dependency graph for SDL_blit_auto.c:

Go to the source code of this file.

Functions

static void SDL_Blit_RGB888_RGB888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_RGB888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_RGB888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_RGB888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_RGB888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_RGB888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Blend_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Modulate (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Scale (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend (SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend_Scale (SDL_BlitInfo *info)

Variables

SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable []

Function Documentation

static void SDL_Blit_ABGR8888_ARGB8888_Blend ( SDL_BlitInfo info)
static

Definition at line 5706 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_ARGB8888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 5759 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_ARGB8888_Modulate ( SDL_BlitInfo info)
static

Definition at line 5833 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = (Uint8)(pixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 5924 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 5989 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 5868 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = (Uint8)(pixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_ARGB8888_Scale ( SDL_BlitInfo info)
static

Definition at line 5663 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = (Uint8)(pixel >> 24);
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Blend ( SDL_BlitInfo info)
static

Definition at line 5306 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 5358 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Modulate ( SDL_BlitInfo info)
static

Definition at line 5431 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 5514 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 5578 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 5462 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_BGR888_Scale ( SDL_BlitInfo info)
static

Definition at line 5263 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Blend ( SDL_BlitInfo info)
static

Definition at line 4906 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 4958 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Modulate ( SDL_BlitInfo info)
static

Definition at line 5031 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 5114 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 5178 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 5062 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ABGR8888_RGB888_Scale ( SDL_BlitInfo info)
static

Definition at line 4863 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Blend ( SDL_BlitInfo info)
static

Definition at line 3282 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 3335 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Modulate ( SDL_BlitInfo info)
static

Definition at line 3409 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; A = (Uint8)(pixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 3500 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 3565 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 3444 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; A = (Uint8)(pixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_ARGB8888_Scale ( SDL_BlitInfo info)
static

Definition at line 3244 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
*dst = *src;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Blend ( SDL_BlitInfo info)
static

Definition at line 2887 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 2939 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Modulate ( SDL_BlitInfo info)
static

Definition at line 3012 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 3095 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 3159 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 3043 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_BGR888_Scale ( SDL_BlitInfo info)
static

Definition at line 2844 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Blend ( SDL_BlitInfo info)
static

Definition at line 2487 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 2539 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Modulate ( SDL_BlitInfo info)
static

Definition at line 2612 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 2695 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 2759 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = (Uint8)(srcpixel >> 24);
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 2643 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_ARGB8888_RGB888_Scale ( SDL_BlitInfo info)
static

Definition at line 2444 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Blend ( SDL_BlitInfo info)
static

Definition at line 2075 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 2128 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Modulate ( SDL_BlitInfo info)
static

Definition at line 2202 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = 0xFF;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 2293 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 2358 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 2237 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = 0xFF;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_ARGB8888_Scale ( SDL_BlitInfo info)
static

Definition at line 2032 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel; A = 0xFF;
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Blend ( SDL_BlitInfo info)
static

Definition at line 1675 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 1727 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Modulate ( SDL_BlitInfo info)
static

Definition at line 1800 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 1883 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 1947 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 1831 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_BGR888_Scale ( SDL_BlitInfo info)
static

Definition at line 1637 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
*dst = *src;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Blend ( SDL_BlitInfo info)
static

Definition at line 1280 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 1332 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Modulate ( SDL_BlitInfo info)
static

Definition at line 1405 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 1488 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 1552 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcR = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 1436 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGR888_RGB888_Scale ( SDL_BlitInfo info)
static

Definition at line 1237 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Blend ( SDL_BlitInfo info)
static

Definition at line 6918 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 6971 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Modulate ( SDL_BlitInfo info)
static

Definition at line 7045 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8); A = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 7136 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 7201 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 7080 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8); A = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_ARGB8888_Scale ( SDL_BlitInfo info)
static

Definition at line 6875 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8); A = (Uint8)pixel;
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Blend ( SDL_BlitInfo info)
static

Definition at line 6518 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 6570 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Modulate ( SDL_BlitInfo info)
static

Definition at line 6643 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 6726 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 6790 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 6674 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_BGR888_Scale ( SDL_BlitInfo info)
static

Definition at line 6475 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8);
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Blend ( SDL_BlitInfo info)
static

Definition at line 6118 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 6170 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Modulate ( SDL_BlitInfo info)
static

Definition at line 6243 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 6326 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 6390 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcB = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcR = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 6274 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_BGRA8888_RGB888_Scale ( SDL_BlitInfo info)
static

Definition at line 6075 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
B = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); R = (Uint8)(pixel >> 8);
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Blend ( SDL_BlitInfo info)
static

Definition at line 868 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 921 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Modulate ( SDL_BlitInfo info)
static

Definition at line 995 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; A = 0xFF;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 1086 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 1151 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 1030 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; A = 0xFF;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_ARGB8888_Scale ( SDL_BlitInfo info)
static

Definition at line 825 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel; A = 0xFF;
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Blend ( SDL_BlitInfo info)
static

Definition at line 468 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 520 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Modulate ( SDL_BlitInfo info)
static

Definition at line 593 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 676 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 740 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 624 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_BGR888_Scale ( SDL_BlitInfo info)
static

Definition at line 425 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Blend ( SDL_BlitInfo info)
static

Definition at line 68 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 120 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Modulate ( SDL_BlitInfo info)
static

Definition at line 193 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 276 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 340 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 16); srcG = (Uint8)(srcpixel >> 8); srcB = (Uint8)srcpixel; srcA = 0xFF;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 224 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGB888_RGB888_Scale ( SDL_BlitInfo info)
static

Definition at line 30 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
*dst = *src;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Blend ( SDL_BlitInfo info)
static

Definition at line 4494 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 4547 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Modulate ( SDL_BlitInfo info)
static

Definition at line 4621 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); A = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 4712 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 4777 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
Uint32 dstR, dstG, dstB, dstA;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel; dstA = (Uint8)(dstpixel >> 24);
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
dstA = srcA + ((255 - srcA) * dstA) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstA << 24) | ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 4656 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); A = (Uint8)pixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
A = (A * modulateA) / 255;
}
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_ARGB8888_Scale ( SDL_BlitInfo info)
static

Definition at line 4451 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B, A;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8); A = (Uint8)pixel;
pixel = ((Uint32)A << 24) | ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Blend ( SDL_BlitInfo info)
static

Definition at line 4094 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 4146 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Modulate ( SDL_BlitInfo info)
static

Definition at line 4219 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 4302 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 4366 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstB = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstR = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstB << 16) | ((Uint32)dstG << 8) | dstR;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 4250 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_BGR888_Scale ( SDL_BlitInfo info)
static

Definition at line 4051 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8);
pixel = ((Uint32)B << 16) | ((Uint32)G << 8) | R;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Blend ( SDL_BlitInfo info)
static

Definition at line 3694 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 3746 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Modulate ( SDL_BlitInfo info)
static

Definition at line 3819 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend ( SDL_BlitInfo info)
static

Definition at line 3902 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, and SDL_BlitInfo::src_pitch.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
while (info->dst_h--) {
Uint32 *src = (Uint32 *)info->src;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
while (n--) {
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
++src;
++dst;
}
info->src += info->src_pitch;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale ( SDL_BlitInfo info)
static

Definition at line 3966 of file SDL_blit_auto.c.

References SDL_BlitInfo::a, SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, SDL_BlitInfo::r, SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
const Uint32 modulateA = info->a;
Uint32 srcpixel;
Uint32 srcR, srcG, srcB, srcA;
Uint32 dstpixel;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
srcpixel = *src;
srcR = (Uint8)(srcpixel >> 24); srcG = (Uint8)(srcpixel >> 16); srcB = (Uint8)(srcpixel >> 8); srcA = (Uint8)srcpixel;
dstpixel = *dst;
dstR = (Uint8)(dstpixel >> 16); dstG = (Uint8)(dstpixel >> 8); dstB = (Uint8)dstpixel;
if (flags & SDL_COPY_MODULATE_COLOR) {
srcR = (srcR * modulateR) / 255;
srcG = (srcG * modulateG) / 255;
srcB = (srcB * modulateB) / 255;
}
if (flags & SDL_COPY_MODULATE_ALPHA) {
srcA = (srcA * modulateA) / 255;
}
if (flags & (SDL_COPY_BLEND|SDL_COPY_ADD)) {
/* This goes away if we ever use premultiplied alpha */
if (srcA < 255) {
srcR = (srcR * srcA) / 255;
srcG = (srcG * srcA) / 255;
srcB = (srcB * srcA) / 255;
}
}
dstR = srcR + ((255 - srcA) * dstR) / 255;
dstG = srcG + ((255 - srcA) * dstG) / 255;
dstB = srcB + ((255 - srcA) * dstB) / 255;
break;
dstR = srcR + dstR; if (dstR > 255) dstR = 255;
dstG = srcG + dstG; if (dstG > 255) dstG = 255;
dstB = srcB + dstB; if (dstB > 255) dstB = 255;
break;
dstR = (srcR * dstR) / 255;
dstG = (srcG * dstG) / 255;
dstB = (srcB * dstB) / 255;
break;
}
dstpixel = ((Uint32)dstR << 16) | ((Uint32)dstG << 8) | dstB;
*dst = dstpixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Modulate_Scale ( SDL_BlitInfo info)
static

Definition at line 3850 of file SDL_blit_auto.c.

References SDL_BlitInfo::b, SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, SDL_BlitInfo::flags, SDL_BlitInfo::g, G, SDL_BlitInfo::r, SDL_COPY_MODULATE_COLOR, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
const int flags = info->flags;
const Uint32 modulateR = info->r;
const Uint32 modulateG = info->g;
const Uint32 modulateB = info->b;
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8);
if (flags & SDL_COPY_MODULATE_COLOR) {
R = (R * modulateR) / 255;
G = (G * modulateG) / 255;
B = (B * modulateB) / 255;
}
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}
static void SDL_Blit_RGBA8888_RGB888_Scale ( SDL_BlitInfo info)
static

Definition at line 3651 of file SDL_blit_auto.c.

References SDL_BlitInfo::dst, SDL_BlitInfo::dst_h, SDL_BlitInfo::dst_pitch, SDL_BlitInfo::dst_w, G, SDL_BlitInfo::src, SDL_BlitInfo::src_h, SDL_BlitInfo::src_pitch, and SDL_BlitInfo::src_w.

{
Uint32 pixel;
Uint32 R, G, B;
int srcy, srcx;
int posy, posx;
int incy, incx;
srcy = 0;
posy = 0;
incy = (info->src_h << 16) / info->dst_h;
incx = (info->src_w << 16) / info->dst_w;
while (info->dst_h--) {
Uint32 *src = 0;
Uint32 *dst = (Uint32 *)info->dst;
int n = info->dst_w;
srcx = -1;
posx = 0x10000L;
while (posy >= 0x10000L) {
++srcy;
posy -= 0x10000L;
}
while (n--) {
if (posx >= 0x10000L) {
while (posx >= 0x10000L) {
++srcx;
posx -= 0x10000L;
}
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
}
pixel = *src;
R = (Uint8)(pixel >> 24); G = (Uint8)(pixel >> 16); B = (Uint8)(pixel >> 8);
pixel = ((Uint32)R << 16) | ((Uint32)G << 8) | B;
*dst = pixel;
posx += incx;
++dst;
}
posy += incy;
info->dst += info->dst_pitch;
}
}

Variable Documentation

SDL_BlitFuncEntry SDL_GeneratedBlitFuncTable[]

Definition at line 7287 of file SDL_blit_auto.c.

Referenced by SDL_CalculateBlit().