regenerated SDL_blit_auto.c.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112
diff --git a/src/video/SDL_blit_auto.c b/src/video/SDL_blit_auto.c
index 359c1bd..f64511f 100644
--- a/src/video/SDL_blit_auto.c
+++ b/src/video/SDL_blit_auto.c
@@ -756,7 +756,6 @@ static void SDL_Blit_RGB888_ARGB8888_Scale(SDL_BlitInfo *info)
{
Uint32 pixel;
const Uint32 A = 0xFF;
- Uint32 R, G, B;
int srcy, srcx;
Uint32 posy, posx;
int incy, incx;
@@ -776,8 +775,7 @@ static void SDL_Blit_RGB888_ARGB8888_Scale(SDL_BlitInfo *info)
srcx = posx >> 16;
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
pixel = *src;
- R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
- pixel = (A << 24) | (R << 16) | (G << 8) | B;
+ pixel |= (A << 24);
*dst = pixel;
posx += incx;
++dst;
@@ -2232,7 +2230,6 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info)
{
Uint32 pixel;
- Uint32 R, G, B;
int srcy, srcx;
Uint32 posy, posx;
int incy, incx;
@@ -2252,8 +2249,7 @@ static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info)
srcx = posx >> 16;
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
pixel = *src;
- R = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); B = (Uint8)pixel;
- pixel = (R << 16) | (G << 8) | B;
+ pixel &= 0xFFFFFF;
*dst = pixel;
posx += incx;
++dst;
@@ -3395,7 +3391,6 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info)
{
Uint32 pixel;
- Uint32 R, G, B;
int srcy, srcx;
Uint32 posy, posx;
int incy, incx;
@@ -3415,8 +3410,7 @@ static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info)
srcx = posx >> 16;
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 = (R << 16) | (G << 8) | B;
+ pixel >>= 8;
*dst = pixel;
posx += incx;
++dst;
@@ -4163,7 +4157,6 @@ static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
static void SDL_Blit_RGBA8888_ARGB8888_Scale(SDL_BlitInfo *info)
{
Uint32 pixel;
- Uint32 R, G, B, A;
int srcy, srcx;
Uint32 posy, posx;
int incy, incx;
@@ -4183,8 +4176,7 @@ static void SDL_Blit_RGBA8888_ARGB8888_Scale(SDL_BlitInfo *info)
srcx = posx >> 16;
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 = (A << 24) | (R << 16) | (G << 8) | B;
+ pixel = (pixel >> 8) | (pixel << 24);
*dst = pixel;
posx += incx;
++dst;
@@ -4947,7 +4939,6 @@ static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info)
{
Uint32 pixel;
- Uint32 R, G, B;
int srcy, srcx;
Uint32 posy, posx;
int incy, incx;
@@ -4967,8 +4958,7 @@ static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info)
srcx = posx >> 16;
src = (Uint32 *)(info->src + (srcy * info->src_pitch) + (srcx * 4));
pixel = *src;
- B = (Uint8)(pixel >> 16); G = (Uint8)(pixel >> 8); R = (Uint8)pixel;
- pixel = (B << 16) | (G << 8) | R;
+ pixel &= 0xFFFFFF;
*dst = pixel;
posx += incx;
++dst;
@@ -6115,7 +6105,6 @@ static void SDL_Blit_BGRA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
static void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info)
{
Uint32 pixel;
- Uint32 R, G, B;
int srcy, srcx;
Uint32 posy, posx;
int incy, incx;
@@ -6135,8 +6124,7 @@ static void SDL_Blit_BGRA8888_BGR888_Scale(SDL_BlitInfo *info)
srcx = posx >> 16;
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 = (B << 16) | (G << 8) | R;
+ pixel >>= 8;
*dst = pixel;
posx += incx;
++dst;