21 #include "../SDL_internal.h" 33 void *
dst,
int dst_pitch);
37 const void *
src,
int src_pitch,
42 sizeof(
int) ==
sizeof(
Sint32) &&
sizeof(
size_t) >=
sizeof(
Sint32));
61 if (surface ==
NULL) {
97 if (surface->
w && surface->
h) {
166 if (surface !=
NULL) {
171 surface->
pitch = pitch;
189 if (surface !=
NULL) {
194 surface->
pitch = pitch;
204 return SDL_SetError(
"SDL_SetSurfacePalette() passed a NULL surface");
324 for (y = surface->
h; y--;) {
326 for (x = surface->
w; x--;) {
327 if ((*spot &
mask) == ckey) {
332 row += surface->
pitch / 2;
348 for (y = surface->
h; y--;) {
350 for (x = surface->
w; x--;) {
351 if ((*spot & mask) == ckey) {
356 row += surface->
pitch / 4;
382 if (r != 0xFF || g != 0xFF || b != 0xFF) {
497 switch (surface->
map->
528 full_rect.
w = surface->
w;
529 full_rect.
h = surface->
h;
542 if (surface && rect) {
563 if ((src->
map->
dst != dst) ||
577 return (src->
map->
blit(src, srcrect, dst, dstrect));
586 int srcx, srcy,
w,
h;
590 return SDL_SetError(
"SDL_UpperBlit: passed a NULL surface");
593 return SDL_SetError(
"Surfaces must not be locked during blit");
597 if (dstrect ==
NULL) {
598 fulldst.
x = fulldst.
y = 0;
615 maxw = src->
w - srcx;
626 maxh = src->
h - srcy;
641 dx = clip->
x - dstrect->
x;
647 dx = dstrect->
x + w - clip->
x - clip->
w;
651 dy = clip->
y - dstrect->
y;
657 dy = dstrect->
y + h - clip->
y - clip->
h;
668 if (w > 0 && h > 0) {
672 sr.
w = dstrect->
w =
w;
673 sr.
h = dstrect->
h =
h;
676 dstrect->
w = dstrect->
h = 0;
684 double src_x0, src_y0, src_x1, src_y1;
685 double dst_x0, dst_y0, dst_x1, dst_y1;
687 double scaling_w, scaling_h;
693 return SDL_SetError(
"SDL_UpperBlitScaled: passed a NULL surface");
696 return SDL_SetError(
"Surfaces must not be locked during blit");
699 if (
NULL == srcrect) {
707 if (
NULL == dstrect) {
715 if (dst_w == src_w && dst_h == src_h) {
720 scaling_w = (double)dst_w / src_w;
721 scaling_h = (double)dst_h / src_h;
723 if (
NULL == dstrect) {
731 dst_x1 = dst_x0 + dst_w - 1;
732 dst_y1 = dst_y0 + dst_h - 1;
735 if (
NULL == srcrect) {
743 src_x1 = src_x0 + src_w - 1;
744 src_y1 = src_y0 + src_h - 1;
749 dst_x0 -= src_x0 * scaling_w;
753 if (src_x1 >= src->
w) {
754 dst_x1 -= (src_x1 - src->
w + 1) * scaling_w;
759 dst_y0 -= src_y0 * scaling_h;
763 if (src_y1 >= src->
h) {
764 dst_y1 -= (src_y1 - src->
h + 1) * scaling_h;
778 src_x0 -= dst_x0 / scaling_w;
783 src_x1 -= (dst_x1 - dst->
clip_rect.
w + 1) / scaling_w;
788 src_y0 -= dst_y0 / scaling_h;
793 src_y1 -= (dst_y1 - dst->
clip_rect.
h + 1) / scaling_h;
810 final_dst.
w = (int)
SDL_floor(dst_x1 - dst_x0 + 1.5);
811 final_dst.
h = (int)
SDL_floor(dst_y1 - dst_y0 + 1.5);
819 *dstrect = final_dst;
821 if (final_dst.
w == 0 || final_dst.
h == 0 ||
822 final_src.
w <= 0 || final_src.
h <= 0) {
838 static const Uint32 complex_copy_flags = (
947 if (convert ==
NULL) {
975 bounds.
w = surface->
w;
976 bounds.
h = surface->
h;
1005 }
else if (format->
Amask) {
1014 if (set_colorkey_by_color) {
1017 int converted_colorkey = 0;
1103 surface->
pitch = pitch;
1109 blitmap->
info.
r = 0xFF;
1110 blitmap->
info.
g = 0xFF;
1111 blitmap->
info.
b = 0xFF;
1112 blitmap->
info.
a = 0xFF;
1113 surface->
map = blitmap;
1124 Uint32 src_format,
const void *
src,
int src_pitch,
1125 Uint32 dst_format,
void *
dst,
int dst_pitch)
1131 void *nonconst_src = (
void *) src;
1142 if (src_format == dst_format) {
1146 switch (src_format) {
1151 width = 4 * ((width + 1) / 2);
1152 for (i = height; i--;) {
1154 src = (
const Uint8*)src + src_pitch;
1155 dst = (
Uint8*)dst + dst_pitch;
1164 for (i = height; i--;) {
1166 src = (
const Uint8*)src + src_pitch;
1167 dst = (
Uint8*)dst + dst_pitch;
1173 SDL_memcpy(dst, src, 2 * ((width + 1)/2) * ((height+1)/2));
1178 width = (width + 1) / 2;
1179 height = (height + 1) / 2;
1180 src_pitch = (src_pitch + 1) / 2;
1181 dst_pitch = (dst_pitch + 1) / 2;
1182 for (i = height * 2; i--;) {
1184 src = (
const Uint8*)src + src_pitch;
1185 dst = (
Uint8*)dst + dst_pitch;
1189 height = (height + 1) / 2;
1190 width = (width + 1) / 2;
1191 src_pitch = (src_pitch + 1) / 2;
1192 dst_pitch = (dst_pitch + 1) / 2;
1193 for (i = height; i--;) {
1195 src = (
const Uint8*)src + 2 * src_pitch;
1196 dst = (
Uint8*)dst + 2 * dst_pitch;
1208 for (i = height; i--;) {
1210 src = (
const Uint8*)src + src_pitch;
1211 dst = (
Uint8*)dst + dst_pitch;
1272 &src_surface, &src_fmt, &src_blitmap)) {
1276 &dst_surface, &dst_fmt, &dst_blitmap)) {
1285 return SDL_LowerBlit(&src_surface, &rect, &dst_surface, &rect);
1294 if (surface ==
NULL) {
1305 while (surface->
locked > 0) {
1327 #define CLAMP(val) ((val) > 0 ? ((val) < 255 ? (val) : 255) : 0) 1332 #define MAKE_Y(r, g, b) (int)( 0.29900f * (r) + 0.58700f * (g) + 0.11400f * (b)) 1333 #define MAKE_U(r, g, b) (int)(-0.16874f * (r) - 0.33126f * (g) + 0.50000f * (b) + 128) 1334 #define MAKE_V(r, g, b) (int)( 0.50000f * (r) - 0.41869f * (g) - 0.08131f * (b) + 128) 1336 #define MAKE_R(y, u, v) CLAMP((int)((y) + 1.40200f * ((v) - 128))) 1337 #define MAKE_G(y, u, v) CLAMP((int)((y) - 0.34414f * ((u) - 128) - 0.71414f * ((v) - 128))) 1338 #define MAKE_B(y, u, v) CLAMP((int)((y) + 1.77200f * ((u) - 128) )) 1343 #define MAKE_Y(r, g, b) ((( 66 * (r) + 129 * (g) + 25 * (b) + 128) >> 8) + 16) 1344 #define MAKE_U(r, g, b) ((( -38 * (r) - 74 * (g) + 112 * (b) + 128) >> 8) + 128) 1345 #define MAKE_V(r, g, b) ((( 112 * (r) - 94 * (g) - 18 * (b) + 128) >> 8) + 128) 1347 #define MAKE_R(y, u, v) CLAMP(( 298 * ((y) - 16) + 409 * ((v) - 128) + 128) >> 8) 1348 #define MAKE_G(y, u, v) CLAMP(( 298 * ((y) - 16) - 100 * ((u) - 128) - 208 * ((v) - 128) + 128) >> 8) 1349 #define MAKE_B(y, u, v) CLAMP(( 298 * ((y) - 16) + 516 * ((u) - 128) + 128) >> 8) 1357 void *
dst,
int dst_pitch)
1359 const int sz_plane = width *
height;
1360 const int sz_plane_chroma = ((width + 1) / 2) * ((height + 1) / 2);
1361 const int width_remainder = (width & 0x1);
1362 const int width_half = width / 2;
1363 const int curr_row_padding = dst_pitch - 4 *
width;
1369 #define WRITE_RGB_PIXEL(y, u, v) \ 1370 *((Uint32*)curr_row) = \ 1371 (MAKE_B((y), (u), (v)) \ 1372 | (MAKE_G((y), (u), (v)) << 8) \ 1373 | (MAKE_R((y), (u), (v)) << 16) \ 1388 const Uint8 *plane_u = (src_format ==
SDL_PIXELFORMAT_YV12 ? plane_y + sz_plane + sz_plane_chroma : plane_y + sz_plane);
1389 const Uint8 *plane_v = (src_format ==
SDL_PIXELFORMAT_YV12 ? plane_y + sz_plane : plane_y + sz_plane + sz_plane_chroma);
1391 for (j = 0; j <
height; j++) {
1392 for (i = 0; i < width_half; i++) {
1393 const Uint8 u = *plane_u++;
1394 const Uint8 v = *plane_v++;
1395 const Uint8 y = *plane_y++;
1400 if (width_remainder) {
1401 const Uint8 u = *plane_u++;
1402 const Uint8 v = *plane_v++;
1403 const Uint8 y = *plane_y++;
1407 if ((j & 0
x1) == 0
x0) {
1408 plane_u -= width_half + width_remainder;
1409 plane_v -= width_half + width_remainder;
1411 curr_row += curr_row_padding;
1416 const Uint8 *plane_interleaved_uv = plane_y + sz_plane;
1417 for (j = 0; j <
height; j++) {
1418 for (i = 0; i < width_half; i++) {
1419 const Uint8 y = *plane_y++;
1421 const Uint8 u = *plane_interleaved_uv++;
1422 const Uint8 v = *plane_interleaved_uv++;
1426 if (width_remainder) {
1427 const Uint8 y = *plane_y++;
1428 const Uint8 u = *plane_interleaved_uv++;
1429 const Uint8 v = *plane_interleaved_uv++;
1433 if ((j & 0
x1) == 0
x0) {
1434 plane_interleaved_uv -= 2 * (width_half + width_remainder);
1436 curr_row += curr_row_padding;
1441 const Uint8 *plane_interleaved_uv = plane_y + sz_plane;
1442 for (j = 0; j <
height; j++) {
1443 for (i = 0; i < width_half; i++) {
1444 const Uint8 y = *plane_y++;
1446 const Uint8 v = *plane_interleaved_uv++;
1447 const Uint8 u = *plane_interleaved_uv++;
1451 if (width_remainder) {
1452 const Uint8 y = *plane_y++;
1453 const Uint8 v = *plane_interleaved_uv++;
1454 const Uint8 u = *plane_interleaved_uv++;
1458 if ((j & 0
x1) == 0
x0) {
1459 plane_interleaved_uv -= 2 * (width_half + width_remainder);
1461 curr_row += curr_row_padding;
1473 #define READ_PACKED_YUV(var1, var2, var3, var4) \ 1474 const Uint8 var1 = plane[0]; \ 1475 const Uint8 var2 = plane[1]; \ 1476 const Uint8 var3 = plane[2]; \ 1477 const Uint8 var4 = plane[3]; \ 1482 for (j = 0; j <
height; j++) {
1483 for (i = 0; i < width_half; i++) {
1488 if (width_remainder) {
1493 curr_row += curr_row_padding;
1498 for (j = 0; j <
height; j++) {
1499 for (i = 0; i < width_half; i++) {
1504 if (width_remainder) {
1509 curr_row += curr_row_padding;
1514 for (j = 0; j <
height; j++) {
1515 for (i = 0; i < width_half; i++) {
1520 if (width_remainder) {
1525 curr_row += curr_row_padding;
1528 #undef READ_PACKED_YUV 1532 #undef WRITE_RGB_PIXEL 1539 const int src_pitch_x_2 = src_pitch * 2;
1540 const int sz_plane = width *
height;
1541 const int sz_plane_chroma = ((width + 1) / 2) * ((height + 1) / 2);
1542 const int height_half = height / 2;
1543 const int height_remainder = (height & 0x1);
1544 const int width_half = width / 2;
1545 const int width_remainder = (width & 0x1);
1557 const Uint8 *curr_row, *next_row;
1562 Uint8 *plane_interleaved_uv = plane_y + sz_plane;
1564 curr_row = (
const Uint8*)src;
1567 for (j = 0; j <
height; j++) {
1568 for (i = 0; i <
width; i++) {
1569 const Uint8 b = curr_row[4 * i + 0];
1570 const Uint8 g = curr_row[4 * i + 1];
1571 const Uint8 r = curr_row[4 * i + 2];
1572 *plane_y++ =
MAKE_Y(r, g, b);
1574 curr_row += src_pitch;
1577 curr_row = (
const Uint8*)src;
1578 next_row = (
const Uint8*)src;
1579 next_row += src_pitch;
1583 #define READ_2x2_PIXELS \ 1584 const Uint32 p1 = ((const Uint32 *)curr_row)[2 * i]; \ 1585 const Uint32 p2 = ((const Uint32 *)curr_row)[2 * i + 1]; \ 1586 const Uint32 p3 = ((const Uint32 *)next_row)[2 * i]; \ 1587 const Uint32 p4 = ((const Uint32 *)next_row)[2 * i + 1]; \ 1588 const Uint32 b = ((p1 & 0x000000ff) + (p2 & 0x000000ff) + (p3 & 0x000000ff) + (p4 & 0x000000ff)) >> 2; \ 1589 const Uint32 g = ((p1 & 0x0000ff00) + (p2 & 0x0000ff00) + (p3 & 0x0000ff00) + (p4 & 0x0000ff00)) >> 10; \ 1590 const Uint32 r = ((p1 & 0x00ff0000) + (p2 & 0x00ff0000) + (p3 & 0x00ff0000) + (p4 & 0x00ff0000)) >> 18; \ 1594 #define READ_2x2_PIXELS \ 1595 const Uint8 b = (curr_row[8 * i + 0] + curr_row[8 * i + 4] \ 1596 + next_row[8 * i + 0] + next_row[8 * i + 4] ) >> 2; \ 1597 const Uint8 g = (curr_row[8 * i + 1] + curr_row[8 * i + 5] \ 1598 + next_row[8 * i + 1] + next_row[8 * i + 5] ) >> 2; \ 1599 const Uint8 r = (curr_row[8 * i + 2] + curr_row[8 * i + 6] \ 1600 + next_row[8 * i + 2] + next_row[8 * i + 6] ) >> 2; \ 1604 #define READ_2x1_PIXELS \ 1605 const Uint8 b = (curr_row[8 * i + 0] + next_row[8 * i + 0]) >> 1; \ 1606 const Uint8 g = (curr_row[8 * i + 1] + next_row[8 * i + 1]) >> 1; \ 1607 const Uint8 r = (curr_row[8 * i + 2] + next_row[8 * i + 2]) >> 1; \ 1609 #define READ_1x2_PIXELS \ 1610 const Uint8 b = (curr_row[8 * i + 0] + curr_row[8 * i + 4]) >> 1; \ 1611 const Uint8 g = (curr_row[8 * i + 1] + curr_row[8 * i + 5]) >> 1; \ 1612 const Uint8 r = (curr_row[8 * i + 2] + curr_row[8 * i + 6]) >> 1; \ 1614 #define READ_1x1_PIXEL \ 1615 const Uint8 b = curr_row[8 * i + 0]; \ 1616 const Uint8 g = curr_row[8 * i + 1]; \ 1617 const Uint8 r = curr_row[8 * i + 2]; \ 1622 for (j = 0; j < height_half; j++) {
1623 for (i = 0; i < width_half; i++) {
1628 if (width_remainder) {
1633 curr_row += src_pitch_x_2;
1634 next_row += src_pitch_x_2;
1636 if (height_remainder) {
1637 for (i = 0; i < width_half; i++) {
1642 if (width_remainder) {
1651 for (j = 0; j < height_half; j++) {
1652 for (i = 0; i < width_half; i++) {
1654 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1655 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1657 if (width_remainder) {
1659 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1660 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1662 curr_row += src_pitch_x_2;
1663 next_row += src_pitch_x_2;
1665 if (height_remainder) {
1666 for (i = 0; i < width_half; i++) {
1668 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1669 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1671 if (width_remainder) {
1673 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1674 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1680 for (j = 0; j < height_half; j++) {
1681 for (i = 0; i < width_half; i++) {
1683 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1684 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1686 if (width_remainder) {
1688 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1689 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1691 curr_row += src_pitch_x_2;
1692 next_row += src_pitch_x_2;
1694 if (height_remainder) {
1695 for (i = 0; i < width_half; i++) {
1697 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1698 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1700 if (width_remainder) {
1702 *plane_interleaved_uv++ =
MAKE_V(
r,
g,
b);
1703 *plane_interleaved_uv++ =
MAKE_U(
r,
g,
b);
1707 #undef READ_2x2_PIXELS 1708 #undef READ_2x1_PIXELS 1709 #undef READ_1x2_PIXELS 1710 #undef READ_1x1_PIXEL 1721 #define READ_TWO_RGB_PIXELS \ 1722 const Uint8 b = curr_row[8 * i + 0]; \ 1723 const Uint8 g = curr_row[8 * i + 1]; \ 1724 const Uint8 r = curr_row[8 * i + 2]; \ 1725 const Uint8 b1 = curr_row[8 * i + 4]; \ 1726 const Uint8 g1 = curr_row[8 * i + 5]; \ 1727 const Uint8 r1 = curr_row[8 * i + 6]; \ 1728 const Uint8 B = (b + b1) >> 1; \ 1729 const Uint8 G = (g + g1) >> 1; \ 1730 const Uint8 R = (r + r1) >> 1; \ 1732 #define READ_ONE_RGB_PIXEL \ 1733 const Uint8 b = curr_row[8 * i + 0]; \ 1734 const Uint8 g = curr_row[8 * i + 1]; \ 1735 const Uint8 r = curr_row[8 * i + 2]; \ 1740 for (j = 0; j <
height; j++) {
1741 for (i = 0; i < width_half; i++) {
1746 *plane++ =
MAKE_Y(r1, g1, b1);
1749 if (width_remainder) {
1757 curr_row += src_pitch;
1762 for (j = 0; j <
height; j++) {
1763 for (i = 0; i < width_half; i++) {
1769 *plane++ =
MAKE_Y(r1, g1, b1);
1771 if (width_remainder) {
1779 curr_row += src_pitch;
1784 for (j = 0; j <
height; j++) {
1785 for (i = 0; i < width_half; i++) {
1790 *plane++ =
MAKE_Y(r1, g1, b1);
1793 if (width_remainder) {
1801 curr_row += src_pitch;
1804 #undef READ_TWO_RGB_PIXELS 1805 #undef READ_ONE_RGB_PIXEL int SDL_GetColorKey(SDL_Surface *surface, Uint32 *key)
Gets the color key (transparent pixel) in a blittable surface.
#define SDL_COPY_MODULATE_COLOR
static int SDL_ConvertPixels_YUV_to_ARGB8888(int width, int height, Uint32 src_format, const void *src, void *dst, int dst_pitch)
GLdouble GLdouble GLdouble r
void SDL_UnlockSurface(SDL_Surface *surface)
SDL_bool SDL_SetClipRect(SDL_Surface *surface, const SDL_Rect *rect)
#define READ_TWO_RGB_PIXELS
GLuint GLfloat GLfloat GLfloat x1
#define SDL_COPY_COLORKEY
int SDL_SetSurfaceRLE(SDL_Surface *surface, int flag)
Sets the RLE acceleration hint for a surface.
#define WRITE_RGB_PIXEL(y, u, v)
GLint GLint GLint GLint GLint x
#define SDL_ISPIXELFORMAT_INDEXED(format)
int SDL_LockSurface(SDL_Surface *surface)
Sets up a surface for directly accessing the pixels.
SDL_Surface * SDL_ConvertSurfaceFormat(SDL_Surface *surface, Uint32 pixel_format, Uint32 flags)
SDL_BlendMode
The blend mode used in SDL_RenderCopy() and drawing operations.
#define READ_PACKED_YUV(var1, var2, var3, var4)
#define SDL_MasksToPixelFormatEnum
SDL_Surface * SDL_ConvertSurface(SDL_Surface *surface, const SDL_PixelFormat *format, Uint32 flags)
GLfloat GLfloat GLfloat GLfloat h
static SDL_INLINE SDL_bool SDL_CreateSurfaceOnStack(int width, int height, Uint32 pixel_format, void *pixels, int pitch, SDL_Surface *surface, SDL_PixelFormat *format, SDL_BlitMap *blitmap)
int SDL_SetSurfaceColorMod(SDL_Surface *surface, Uint8 r, Uint8 g, Uint8 b)
Set an additional color value used in blit operations.
A collection of pixels used in software blitting.
int SDL_SetSurfaceAlphaMod(SDL_Surface *surface, Uint8 alpha)
Set an additional alpha value used in blit operations.
int SDL_UpperBlitScaled(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
int SDL_SetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode blendMode)
Set the blend mode used for blit operations.
void SDL_UnRLESurface(SDL_Surface *surface, int recode)
static void SDL_ConvertColorkeyToAlpha(SDL_Surface *surface)
#define SDL_BYTESPERPIXEL(X)
Uint32 dst_palette_version
SDL_Surface * SDL_DuplicateSurface(SDL_Surface *surface)
#define SDL_COPY_RLE_COLORKEY
#define SDL_MAX_SINT32
A signed 32-bit integer type.
#define SDL_InvalidParamError(param)
#define SDL_IntersectRect
int SDL_LowerBlit(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
int SDL_SetColorKey(SDL_Surface *surface, int flag, Uint32 key)
Sets the color key (transparent pixel) in a blittable surface.
int SDL_UpperBlit(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
GLfloat GLfloat GLfloat alpha
GLint GLint GLsizei width
void SDL_GetClipRect(SDL_Surface *surface, SDL_Rect *rect)
Uint32 src_palette_version
#define SDL_COPY_RLE_DESIRED
static SDL_BlendMode blendMode
void SDL_InvalidateMap(SDL_BlitMap *map)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define READ_ONE_RGB_PIXEL
#define SDL_ALPHA_TRANSPARENT
SDL_Surface * SDL_CreateRGBSurfaceWithFormat(Uint32 flags, int width, int height, int depth, Uint32 format)
SDL_COMPILE_TIME_ASSERT(surface_size_assumptions, sizeof(int)==sizeof(Sint32) &&sizeof(size_t) >=sizeof(Sint32))
int SDL_MapSurface(SDL_Surface *src, SDL_Surface *dst)
int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
Set the palette used by a surface.
int SDL_GetSurfaceBlendMode(SDL_Surface *surface, SDL_BlendMode *blendMode)
Get the blend mode used for blit operations.
int SDL_ConvertPixels(int width, int height, Uint32 src_format, const void *src, int src_pitch, Uint32 dst_format, void *dst, int dst_pitch)
Copy a block of pixels of one format to another format.
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
GLubyte GLubyte GLubyte GLubyte w
GLint GLint GLint GLint GLint GLint y
SDL_Surface * SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 format)
int SDL_GetSurfaceAlphaMod(SDL_Surface *surface, Uint8 *alpha)
Get the additional alpha value used in blit operations.
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
int SDL_InitFormat(SDL_PixelFormat *format, Uint32 pixel_format)
void SDL_FreeSurface(SDL_Surface *surface)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
int SDL_RLESurface(SDL_Surface *surface)
#define SDL_OutOfMemory()
GLint GLint GLsizei GLsizei GLsizei depth
SDL_Surface * SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
GLint GLint GLsizei GLsizei height
#define SDL_COPY_MODULATE_ALPHA
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
#define SDL_COPY_RLE_ALPHAKEY
int SDL_LowerBlitScaled(SDL_Surface *src, SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
SDL_BlitMap * SDL_AllocBlitMap(void)
int SDL_CalculatePitch(SDL_Surface *surface)
#define SDL_ISPIXELFORMAT_FOURCC(format)
SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask)
GLboolean GLboolean GLboolean b
void SDL_FreeBlitMap(SDL_BlitMap *map)
int SDL_GetSurfaceColorMod(SDL_Surface *surface, Uint8 *r, Uint8 *g, Uint8 *b)
Get the additional color value used in blit operations.
#define SDL_SetPixelFormatPalette
#define SDL_Unsupported()
A rectangle, with the origin at the upper left.
static int SDL_ConvertPixels_ARGB8888_to_YUV(int width, int height, const void *src, int src_pitch, Uint32 dst_format, void *dst)