zenilib: zenilib/jni/external/sdl/src/video/SDL_RLEaccel.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Functions | Variables
SDL_RLEaccel.c File Reference
`#include "SDL_config.h"`
`#include "SDL_video.h"`
`#include "SDL_sysvideo.h"`
`#include "SDL_blit.h"`
`#include "SDL_RLEaccel_c.h"`

Go to the source code of this file.

## Macros

#define | ADD_COUNTS(n, m)
#define | ADD_OPAQUE_COUNTS(n, m)
#define | ADD_TRANSL_COUNTS(n, m) (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4)
#define | ALPHA_BLIT16_50(to, from, length, bpp, alpha, mask)
#define | ALPHA_BLIT16_555(to, from, length, bpp, alpha)
#define | ALPHA_BLIT16_555_50(to, from, length, bpp, alpha) ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde)
#define | ALPHA_BLIT16_565(to, from, length, bpp, alpha)
#define | ALPHA_BLIT16_565_50(to, from, length, bpp, alpha) ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7de)
#define | ALPHA_BLIT32_888(to, from, length, bpp, alpha)
#define | ALPHA_BLIT32_888_50(to, from, length, bpp, alpha)
#define | ALPHA_BLIT_ANY(to, from, length, bpp, alpha)
#define | BLEND16_50(dst, src, mask)
#define | BLIT_TRANSL_555(src, dst)
#define | BLIT_TRANSL_565(src, dst)
#define | BLIT_TRANSL_888(src, dst)
#define | CHOOSE_BLIT(blitter, alpha, fmt)
#define | ISOPAQUE(pixel, fmt) ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255)
#define | ISTRANSL(pixel, fmt) ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U)
#define | MAX(a, b) ((a) > (b) ? (a) : (b))
#define | MIN(a, b) ((a) < (b) ? (a) : (b))
#define | OPAQUE_BLIT(to, from, length, bpp, alpha) PIXEL_COPY(to, from, length, bpp)
#define | PIXEL_COPY(to, from, len, bpp) SDL_memcpy(to, from, (size_t)(len) * (bpp))
#define | RLEALPHABLIT(Ptype, Ctype, do_blend)
#define | RLEALPHACLIPBLIT(Ptype, Ctype, do_blend)
#define | RLEBLIT(bpp, Type, do_blit)
#define | RLECLIPBLIT(bpp, Type, do_blit)
#define | RLESKIP(bpp, Type)

## Typedefs

typedef Uint32(* | getpix_func )(Uint8 *)

## Functions

static int | copy_32 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
static int | copy_opaque_16 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
static int | copy_transl_555 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
static int | copy_transl_565 (void *dst, Uint32 *src, int n, SDL_PixelFormat *sfmt, SDL_PixelFormat *dfmt)
static Uint32 | getpix_16 (Uint8 *srcbuf)
static Uint32 | getpix_24 (Uint8 *srcbuf)
static Uint32 | getpix_32 (Uint8 *srcbuf)
static Uint32 | getpix_8 (Uint8 *srcbuf)
static void | RLEAlphaClipBlit (int w, Uint8 *srcbuf, SDL_Surface *dst, Uint8 *dstbuf, SDL_Rect *srcrect)
static int | RLEAlphaSurface (SDL_Surface *surface)
static void | RLEClipBlit (int w, Uint8 *srcbuf, SDL_Surface *dst, Uint8 *dstbuf, SDL_Rect *srcrect, unsigned alpha)
static int | RLEColorkeySurface (SDL_Surface *surface)
int | SDL_RLEAlphaBlit (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
int | SDL_RLEBlit (SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
int | SDL_RLESurface (SDL_Surface *surface)
void | SDL_UnRLESurface (SDL_Surface *surface, int recode)
static int | uncopy_32 (Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
static int | uncopy_opaque_16 (Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
static int | uncopy_transl_16 (Uint32 *dst, void *src, int n, RLEDestFormat *sfmt, SDL_PixelFormat *dfmt)
static SDL_bool | UnRLEAlpha (SDL_Surface *surface)

## Variables

static const getpix_func | getpixes [4]

## Macro Definition Documentation

#define ADD_COUNTS | ( |  | n,
|  |  | m
| ) |  |

Value:
if(bpp == 4) { \
((Uint16 *)dst)[0] = n; \
((Uint16 *)dst)[1] = m; \
dst += 4; \
} else { \
dst[0] = n; \
dst[1] = m; \
dst += 2; \
}
n
GLclampd n
Definition: glew.h:7287
dst
GLenum GLenum dst
Definition: glew.h:2396
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
m
#define m(i, j)

Referenced by RLEColorkeySurface().

#define ADD_OPAQUE_COUNTS | ( |  | n,
|  |  | m
| ) |  |

Value:
if(df->BytesPerPixel == 4) { \
((Uint16 *)dst)[0] = n; \
((Uint16 *)dst)[1] = m; \
dst += 4; \
} else { \
dst[0] = n; \
dst[1] = m; \
dst += 2; \
}
n
GLclampd n
Definition: glew.h:7287
dst
GLenum GLenum dst
Definition: glew.h:2396
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
m
#define m(i, j)

Referenced by RLEAlphaSurface().

#define ADD_TRANSL_COUNTS | ( |  | n,
|  |  | m
| ) |  | (((Uint16 *)dst)[0] = n, ((Uint16 *)dst)[1] = m, dst += 4)

Referenced by RLEAlphaSurface().

#define ALPHA_BLIT16_50 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha,
|  |  | mask
| ) |  |

Value:
do { \
unsigned n = (length); \
Uint16 *src = (Uint16 *)(from); \
Uint16 *dst = (Uint16 *)(to); \
if(((uintptr_t)src ^ (uintptr_t)dst) & 3) { \
/* source and destination not in phase, blit one by one */ \
while(n--) \
BLEND16_50(dst, src, mask); \
} else { \
if((uintptr_t)src & 3) { \
/* first odd pixel */ \
BLEND16_50(dst, src, mask); \
n--; \
} \
for(; n > 1; n -= 2) { \
Uint32 s = *(Uint32 *)src; \
Uint32 d = *(Uint32 *)dst; \
*(Uint32 *)dst = ((s & (mask | mask << 16)) >> 1) \
+ ((d & (mask | mask << 16)) >> 1) \
+ (s & d & (~(mask | mask << 16))); \
src += 2; \
dst += 2; \
} \
if(n) \
BLEND16_50(dst, src, mask); /* last odd pixel */ \
} \
} while(0)
s
GLdouble s
Definition: glew.h:1376
n
GLclampd n
Definition: glew.h:7287
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
if
if(!yyg->yy_init)
Definition: glslang_lex.cpp:1037
BLEND16_50
#define BLEND16_50(dst, src, mask)
Definition: SDL_RLEaccel.c:262
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
for
for(;;)
Definition: glslang_tab.cpp:4773
length
GLsizei GLsizei * length
Definition: gl2ext.h:792
uintptr_t
unsigned int uintptr_t
Definition: SDL_config_windows.h:69
mask
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
Definition: gl2ext.h:961
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
src
GLenum src
Definition: glew.h:2396
while
while(1)
Definition: glslang_lex.cpp:1063

Definition at line 271 of file SDL_RLEaccel.c.

#define ALPHA_BLIT16_555 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  |

Value:
do { \
int i; \
Uint16 *src = (Uint16 *)(from); \
Uint16 *dst = (Uint16 *)(to); \
Uint32 ALPHA = alpha >> 3; \
for(i = 0; i < (int)(length); i++) { \
Uint32 s = *src++; \
Uint32 d = *dst; \
s = (s | s << 16) & 0x03e07c1f; \
d = (d | d << 16) & 0x03e07c1f; \
d += (s - d) * ALPHA >> 5; \
d &= 0x03e07c1f; \
*dst++ = (Uint16)(d | d >> 16); \
} \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
int
int
Definition: SDL_systhread.c:37
for
for(;;)
Definition: glslang_tab.cpp:4773
length
GLsizei GLsizei * length
Definition: gl2ext.h:792
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377

Definition at line 158 of file SDL_RLEaccel.c.

#define ALPHA_BLIT16_555_50 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  | ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xfbde)

Definition at line 303 of file SDL_RLEaccel.c.

#define ALPHA_BLIT16_565 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  |

Value:
do { \
int i; \
Uint16 *src = (Uint16 *)(from); \
Uint16 *dst = (Uint16 *)(to); \
Uint32 ALPHA = alpha >> 3; \
for(i = 0; i < (int)(length); i++) { \
Uint32 s = *src++; \
Uint32 d = *dst; \
s = (s | s << 16) & 0x07e0f81f; \
d = (d | d << 16) & 0x07e0f81f; \
d += (s - d) * ALPHA >> 5; \
d &= 0x07e0f81f; \
*dst++ = (Uint16)(d | d >> 16); \
} \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
int
int
Definition: SDL_systhread.c:37
for
for(;;)
Definition: glslang_tab.cpp:4773
length
GLsizei GLsizei * length
Definition: gl2ext.h:792
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377

Definition at line 141 of file SDL_RLEaccel.c.

#define ALPHA_BLIT16_565_50 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  | ALPHA_BLIT16_50(to, from, length, bpp, alpha, 0xf7de)

Definition at line 300 of file SDL_RLEaccel.c.

#define ALPHA_BLIT32_888 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  |

Value:
do { \
int i; \
Uint32 *src = (Uint32 *)(from); \
Uint32 *dst = (Uint32 *)(to); \
for(i = 0; i < (int)(length); i++) { \
Uint32 s = *src++; \
Uint32 d = *dst; \
Uint32 s1 = s & 0xff00ff; \
Uint32 d1 = d & 0xff00ff; \
d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \
s &= 0xff00; \
d &= 0xff00; \
d = (d + ((s - d) * alpha >> 8)) & 0xff00; \
*dst++ = d1 | d; \
} \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
int
int
Definition: SDL_systhread.c:37
for
for(;;)
Definition: glslang_tab.cpp:4773
length
GLsizei GLsizei * length
Definition: gl2ext.h:792
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
s1
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
Definition: glew.h:11582
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377

Definition at line 117 of file SDL_RLEaccel.c.

#define ALPHA_BLIT32_888_50 | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  |

Value:
do { \
int i; \
Uint32 *src = (Uint32 *)(from); \
Uint32 *dst = (Uint32 *)(to); \
for(i = 0; i < (int)(length); i++) { \
Uint32 s = *src++; \
Uint32 d = *dst; \
*dst++ = (((s & 0x00fefefe) + (d & 0x00fefefe)) >> 1) \
+ (s & d & 0x00010101); \
} \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
int
int
Definition: SDL_systhread.c:37
for
for(;;)
Definition: glslang_tab.cpp:4773
length
GLsizei GLsizei * length
Definition: gl2ext.h:792
src
GLenum src
Definition: glew.h:2396
i
int i
Definition: pngrutil.c:1377

Definition at line 243 of file SDL_RLEaccel.c.

#define ALPHA_BLIT_ANY | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  |

Definition at line 178 of file SDL_RLEaccel.c.

#define BLEND16_50 | ( |  | dst,
|  |  | src,
|  |  | mask
| ) |  |

Value:
do { \
Uint32 s = *src++; \
Uint32 d = *dst; \
*dst++ = (Uint16)((((s & mask) + (d & mask)) >> 1) + \
(s & d & (~mask & 0xffff))); \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
mask
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
Definition: gl2ext.h:961
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
src
GLenum src
Definition: glew.h:2396

Definition at line 262 of file SDL_RLEaccel.c.

#define BLIT_TRANSL_555 | ( |  | src,
|  |  | dst
| ) |  |

Value:
do { \
Uint32 s = src; \
Uint32 d = dst; \
unsigned alpha = (s & 0x3e0) >> 5; \
s &= 0x03e07c1f; \
d = (d | d << 16) & 0x03e07c1f; \
d += (s - d) * alpha >> 5; \
d &= 0x03e07c1f; \
dst = (Uint16)(d | d >> 16); \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
src
GLenum src
Definition: glew.h:2396

Definition at line 589 of file SDL_RLEaccel.c.

Referenced by RLEAlphaClipBlit(), and SDL_RLEAlphaBlit().

#define BLIT_TRANSL_565 | ( |  | src,
|  |  | dst
| ) |  |

Value:
do { \
Uint32 s = src; \
Uint32 d = dst; \
unsigned alpha = (s & 0x3e0) >> 5; \
s &= 0x07e0f81f; \
d = (d | d << 16) & 0x07e0f81f; \
d += (s - d) * alpha >> 5; \
d &= 0x07e0f81f; \
dst = (Uint16)(d | d >> 16); \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
Uint16
uint16_t Uint16
An unsigned 16-bit integer type.
Definition: SDL_stdinc.h:137
src
GLenum src
Definition: glew.h:2396

Definition at line 577 of file SDL_RLEaccel.c.

Referenced by RLEAlphaClipBlit(), and SDL_RLEAlphaBlit().

#define BLIT_TRANSL_888 | ( |  | src,
|  |  | dst
| ) |  |

Value:
do { \
Uint32 s = src; \
Uint32 d = dst; \
unsigned alpha = s >> 24; \
Uint32 s1 = s & 0xff00ff; \
Uint32 d1 = d & 0xff00ff; \
d1 = (d1 + ((s1 - d1) * alpha >> 8)) & 0xff00ff; \
s &= 0xff00; \
d &= 0xff00; \
d = (d + ((s - d) * alpha >> 8)) & 0xff00; \
dst = d1 | d | 0xff000000; \
} while(0)
s
GLdouble s
Definition: glew.h:1376
d
return Display return Display Bool Bool int d
Definition: SDL_x11sym.h:30
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
dst
GLenum GLenum dst
Definition: glew.h:2396
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
s1
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat s1
Definition: glew.h:11582
src
GLenum src
Definition: glew.h:2396

Definition at line 559 of file SDL_RLEaccel.c.

Referenced by RLEAlphaClipBlit(), and SDL_RLEAlphaBlit().

#define CHOOSE_BLIT | ( |  | blitter,
|  |  | alpha,
|  |  | fmt
| ) |  |

Definition at line 306 of file SDL_RLEaccel.c.

Referenced by RLEClipBlit(), and SDL_RLEBlit().

#define ISOPAQUE | ( |  | pixel,
|  |  | fmt
| ) |  | ((((pixel) & fmt->Amask) >> fmt->Ashift) == 255)

Definition at line 1007 of file SDL_RLEaccel.c.

Referenced by RLEAlphaSurface().

#define ISTRANSL | ( |  | pixel,
|  |  | fmt
| ) |  | ((unsigned)((((pixel) & fmt->Amask) >> fmt->Ashift) - 1U) < 254U)

Definition at line 1009 of file SDL_RLEaccel.c.

Referenced by RLEAlphaSurface().

#define MAX | ( |  | a,
|  |  | b
| ) |  | ((a) > (b) ? (a) : (b))

Definition at line 94 of file SDL_RLEaccel.c.

#define MIN | ( |  | a,
|  |  | b
| ) |  | ((a) < (b) ? (a) : (b))

Definition at line 97 of file SDL_RLEaccel.c.

Referenced by RLEAlphaSurface(), and RLEColorkeySurface().

#define OPAQUE_BLIT | ( |  | to,
|  |  | from,
|  |  | length,
|  |  | bpp,
|  |  | alpha
| ) |  | PIXEL_COPY(to, from, length, bpp)

Definition at line 107 of file SDL_RLEaccel.c.

#define PIXEL_COPY | ( |  | to,
|  |  | from,
|  |  | len,
|  |  | bpp
| ) |  | SDL_memcpy(to, from, (size_t)(len) * (bpp))

Definition at line 100 of file SDL_RLEaccel.c.

#define RLEALPHABLIT | ( |  | Ptype,
|  |  | Ctype,
|  |  | do_blend
| ) |  |

Referenced by SDL_RLEAlphaBlit().

#define RLEALPHACLIPBLIT | ( |  | Ptype,
|  |  | Ctype,
|  |  | do_blend
| ) |  |

Referenced by RLEAlphaClipBlit().

#define RLEBLIT | ( |  | bpp,
|  |  | Type,
|  |  | do_blit
| ) |  |

Value:
do { \
int linecount = srcrect->h; \
int ofs = 0; \
for(;;) { \
unsigned run; \
ofs += *(Type *)srcbuf; \
run = ((Type *)srcbuf)[1]; \
srcbuf += 2 * sizeof(Type); \
if(run) { \
do_blit(dstbuf + ofs * bpp, srcbuf, run, bpp, alpha); \
srcbuf += run * bpp; \
ofs += run; \
} else if(!ofs) \
break; \
if(ofs == w) { \
ofs = 0; \
dstbuf += dst->pitch; \
if(!--linecount) \
break; \
} \
} \
} while(0)
Type
Type
Definition: SDL_dxjoystick_c.h:115
if
if(!yyg->yy_init)
Definition: glslang_lex.cpp:1037
dst
GLenum GLenum dst
Definition: glew.h:2396
int
int
Definition: SDL_systhread.c:37
for
for(;;)
Definition: glslang_tab.cpp:4773
alpha
GLclampf GLclampf GLclampf alpha
Definition: glew.h:1506
w
GLint GLint GLint GLint GLint w
Definition: gl2ext.h:1215

Referenced by SDL_RLEBlit().

#define RLECLIPBLIT | ( |  | bpp,
|  |  | Type,
|  |  | do_blit
| ) |  |

Referenced by RLEClipBlit().

#define RLESKIP | ( |  | bpp,
|  |  | Type
| ) |  |

Value:
for(;;) { \
int run; \
ofs += *(Type *)srcbuf; \
run = ((Type *)srcbuf)[1]; \
srcbuf += sizeof(Type) * 2; \
if(run) { \
srcbuf += run * bpp; \
ofs += run; \
} else if(!ofs) \
goto done; \
if(ofs == w) { \
ofs = 0; \
if(!--vskip) \
break; \
} \
}
Type
Type
Definition: SDL_dxjoystick_c.h:115
if
if(!yyg->yy_init)
Definition: glslang_lex.cpp:1037
int
int
Definition: SDL_systhread.c:37
w
GLint GLint GLint GLint GLint w
Definition: gl2ext.h:1215

Referenced by SDL_RLEBlit().

## Typedef Documentation

typedef Uint32(* getpix_func)(Uint8 *)

Definition at line 1254 of file SDL_RLEaccel.c.

## Function Documentation

static int copy_32 | ( | void * | dst,
|  | Uint32 * | src,
|  | int | n,
|  | SDL_PixelFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 974 of file SDL_RLEaccel.c.

References d, i, PIXEL_FROM_RGBA, and RGBA_FROM_8888.

Referenced by RLEAlphaSurface().

static int copy_opaque_16 | ( | void * | dst,
|  | Uint32 * | src,
|  | int | n,
|  | SDL_PixelFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 880 of file SDL_RLEaccel.c.

References d, i, PIXEL_FROM_RGB, and RGB_FROM_PIXEL.

Referenced by RLEAlphaSurface().

static int copy_transl_555 | ( | void * | dst,
|  | Uint32 * | src,
|  | int | n,
|  | SDL_PixelFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 936 of file SDL_RLEaccel.c.

References d, i, PIXEL_FROM_RGB, and RGBA_FROM_8888.

Referenced by RLEAlphaSurface().

static int copy_transl_565 | ( | void * | dst,
|  | Uint32 * | src,
|  | int | n,
|  | SDL_PixelFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 917 of file SDL_RLEaccel.c.

References d, i, PIXEL_FROM_RGB, and RGBA_FROM_8888.

Referenced by RLEAlphaSurface().

static Uint32 getpix_16 | ( | Uint8 * | srcbuf | ) |

static

Definition at line 1233 of file SDL_RLEaccel.c.

static Uint32 getpix_24 | ( | Uint8 * | srcbuf | ) |

static

Definition at line 1239 of file SDL_RLEaccel.c.

static Uint32 getpix_32 | ( | Uint8 * | srcbuf | ) |

static

Definition at line 1249 of file SDL_RLEaccel.c.

static Uint32 getpix_8 | ( | Uint8 * | srcbuf | ) |

static

Definition at line 1227 of file SDL_RLEaccel.c.

static void RLEAlphaClipBlit | ( | int | w,
|  | Uint8 * | srcbuf,
|  | SDL_Surface * | dst,
|  | Uint8 * | dstbuf,
|  | SDL_Rect * | srcrect
| ) |  |

static

Definition at line 623 of file SDL_RLEaccel.c.

References BLIT_TRANSL_555, BLIT_TRANSL_565, BLIT_TRANSL_888, SDL_PixelFormat::Bmask, SDL_PixelFormat::BytesPerPixel, SDL_Surface::format, SDL_PixelFormat::Gmask, RLEALPHACLIPBLIT, and SDL_PixelFormat::Rmask.

Referenced by SDL_RLEAlphaBlit().

static int RLEAlphaSurface | ( | SDL_Surface * | surface | ) |

static

Definition at line 1014 of file SDL_RLEaccel.c.

References ADD_OPAQUE_COUNTS, ADD_TRANSL_COUNTS, SDL_PixelFormat::Aloss, SDL_PixelFormat::Amask, SDL_PixelFormat::Ashift, SDL_PixelFormat::BitsPerPixel, SDL_PixelFormat::Bloss, SDL_PixelFormat::Bmask, SDL_PixelFormat::Bshift, SDL_PixelFormat::BytesPerPixel, copy_32(), copy_opaque_16(), copy_transl_555(), copy_transl_565(), SDL_BlitMap::data, SDL_BlitMap::dst, SDL_Surface::flags, SDL_Surface::format, SDL_PixelFormat::Gloss, SDL_PixelFormat::Gmask, SDL_PixelFormat::Gshift, SDL_Surface::h, if(), int, ISOPAQUE, ISTRANSL, m, SDL_Surface::map, MIN, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_PixelFormat::Rloss, SDL_PixelFormat::Rmask, SDL_PixelFormat::Rshift, SDL_free(), SDL_malloc(), SDL_OutOfMemory, SDL_PREALLOC, SDL_realloc(), skip, and SDL_Surface::w.

Referenced by SDL_RLESurface().

static void RLEClipBlit | ( | int | w,
|  | Uint8 * | srcbuf,
|  | SDL_Surface * | dst,
|  | Uint8 * | dstbuf,
|  | SDL_Rect * | srcrect,
|  | unsigned | alpha
| ) |  |

static

Definition at line 379 of file SDL_RLEaccel.c.

References CHOOSE_BLIT, SDL_Surface::format, and RLECLIPBLIT.

Referenced by SDL_RLEBlit().

static int RLEColorkeySurface | ( | SDL_Surface * | surface | ) |

static

Definition at line 1261 of file SDL_RLEaccel.c.

References ADD_COUNTS, SDL_PixelFormat::Amask, SDL_PixelFormat::BytesPerPixel, SDL_BlitInfo::colorkey, SDL_BlitMap::data, SDL_Surface::flags, SDL_Surface::format, getpixes, SDL_Surface::h, if(), SDL_BlitMap::info, m, SDL_Surface::map, MIN, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_free(), SDL_malloc(), SDL_memcpy(), SDL_OutOfMemory, SDL_PREALLOC, SDL_realloc(), skip, and SDL_Surface::w.

Referenced by SDL_RLESurface().

int SDL_RLEAlphaBlit | ( | SDL_Surface * | src,
|  | SDL_Rect * | srcrect,
|  | SDL_Surface * | dst,
|  | SDL_Rect * | dstrect
| ) |  |

Definition at line 715 of file SDL_RLEaccel.c.

References BLIT_TRANSL_555, BLIT_TRANSL_565, BLIT_TRANSL_888, SDL_PixelFormat::Bmask, SDL_PixelFormat::BytesPerPixel, SDL_BlitMap::data, SDL_Surface::format, SDL_PixelFormat::Gmask, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, RLEALPHABLIT, RLEAlphaClipBlit(), SDL_PixelFormat::Rmask, SDL_LockSurface(), SDL_MUSTLOCK, SDL_UnlockSurface(), SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by SDL_RLESurface().

int SDL_RLEBlit | ( | SDL_Surface * | src,
|  | SDL_Rect * | srcrect,
|  | SDL_Surface * | dst,
|  | SDL_Rect * | dstrect
| ) |  |

Definition at line 437 of file SDL_RLEaccel.c.

References SDL_BlitInfo::a, SDL_PixelFormat::BytesPerPixel, CHOOSE_BLIT, SDL_BlitMap::data, SDL_Surface::format, SDL_BlitMap::info, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, RLEBLIT, RLEClipBlit(), RLESKIP, SDL_LockSurface(), SDL_MUSTLOCK, SDL_UnlockSurface(), SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by SDL_RLESurface(), and SDL_UnRLESurface().

int SDL_RLESurface | ( | SDL_Surface * | surface | ) |

Definition at line 1388 of file SDL_RLEaccel.c.

References SDL_PixelFormat::Amask, SDL_PixelFormat::BitsPerPixel, SDL_BlitMap::blit, SDL_BlitInfo::flags, SDL_Surface::flags, SDL_Surface::format, SDL_BlitMap::identity, SDL_BlitMap::info, SDL_Surface::map, SDL_Surface::pixels, RLEAlphaSurface(), RLEColorkeySurface(), SDL_COPY_ADD, SDL_COPY_BLEND, SDL_COPY_COLORKEY, SDL_COPY_MOD, SDL_COPY_MODULATE_ALPHA, SDL_COPY_MODULATE_COLOR, SDL_COPY_NEAREST, SDL_COPY_RLE_ALPHAKEY, SDL_COPY_RLE_COLORKEY, SDL_RLEACCEL, SDL_RLEAlphaBlit(), SDL_RLEBlit(), and SDL_UnRLESurface().

Referenced by SDL_CalculateBlit(), and SDL_UnlockSurface().

void SDL_UnRLESurface | ( | SDL_Surface * | surface,
|  | int | recode
| ) |  |

Definition at line 1525 of file SDL_RLEaccel.c.

References SDL_BlitInfo::colorkey, SDL_BlitMap::data, SDL_BlitInfo::flags, SDL_Surface::flags, SDL_Rect::h, SDL_Surface::h, SDL_BlitMap::info, SDL_Surface::map, NULL, SDL_Surface::pitch, SDL_Surface::pixels, SDL_COPY_RLE_ALPHAKEY, SDL_COPY_RLE_COLORKEY, SDL_FillRect(), SDL_free(), SDL_malloc(), SDL_PREALLOC, SDL_RLEACCEL, SDL_RLEBlit(), UnRLEAlpha(), SDL_Rect::w, SDL_Surface::w, SDL_Rect::x, and SDL_Rect::y.

Referenced by SDL_CalculateBlit(), SDL_FreeSurface(), SDL_LockSurface(), SDL_MapSurface(), and SDL_RLESurface().

static int uncopy_32 | ( | Uint32 * | dst,
|  | void * | src,
|  | int | n,
|  | RLEDestFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 991 of file SDL_RLEaccel.c.

References i, PIXEL_FROM_RGBA, and RGB_FROM_PIXEL.

Referenced by UnRLEAlpha().

static int uncopy_opaque_16 | ( | Uint32 * | dst,
|  | void * | src,
|  | int | n,
|  | RLEDestFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 897 of file SDL_RLEaccel.c.

References SDL_PixelFormat::Amask, i, PIXEL_FROM_RGBA, and RGB_FROM_PIXEL.

Referenced by UnRLEAlpha().

static int uncopy_transl_16 | ( | Uint32 * | dst,
|  | void * | src,
|  | int | n,
|  | RLEDestFormat * | sfmt,
|  | SDL_PixelFormat * | dfmt
| ) |  |

static

Definition at line 955 of file SDL_RLEaccel.c.

References i, PIXEL_FROM_RGBA, and RGB_FROM_PIXEL.

Referenced by UnRLEAlpha().

static SDL_bool UnRLEAlpha | ( | SDL_Surface * | surface | ) |

static

Definition at line 1452 of file SDL_RLEaccel.c.

References SDL_BlitMap::data, SDL_Surface::format, SDL_Surface::h, int, SDL_Surface::map, SDL_Surface::pitch, SDL_Surface::pixels, SDL_FALSE, SDL_malloc(), SDL_memset(), SDL_TRUE, uncopy_32(), uncopy_opaque_16(), uncopy_transl_16(), and SDL_Surface::w.

Referenced by SDL_UnRLESurface().

## Variable Documentation

const getpix_func getpixes[4]

static

Initial value:
= {
getpix_8, getpix_16, getpix_24, getpix_32
}
getpix_16
static Uint32 getpix_16(Uint8 *srcbuf)
Definition: SDL_RLEaccel.c:1233
getpix_32
static Uint32 getpix_32(Uint8 *srcbuf)
Definition: SDL_RLEaccel.c:1249
getpix_8
static Uint32 getpix_8(Uint8 *srcbuf)
Definition: SDL_RLEaccel.c:1227
getpix_24
static Uint32 getpix_24(Uint8 *srcbuf)
Definition: SDL_RLEaccel.c:1239

Definition at line 1256 of file SDL_RLEaccel.c.

Referenced by RLEColorkeySurface().