Commit 74680f5c4c242e97358948f58ffcf352e3fb56a6

Ozkan Sezer 2022-03-21T18:56:56

regenerated SDL_blit_auto.c.

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;