SDL: Update SDL_blit_auto.c

From e88d78462e63c6d964f70d3d1f836e24929adbc6 Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Thu, 4 Mar 2021 14:36:33 +0100
Subject: [PATCH] Update SDL_blit_auto.c

---
 src/video/SDL_blit_auto.c | 288 +++++++++++++++++++-------------------
 1 file changed, 144 insertions(+), 144 deletions(-)

diff --git a/src/video/SDL_blit_auto.c b/src/video/SDL_blit_auto.c
index 3bc735ae3..0a487b708 100644
--- a/src/video/SDL_blit_auto.c
+++ b/src/video/SDL_blit_auto.c
@@ -35,15 +35,15 @@ static void SDL_Blit_RGB888_RGB888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -118,15 +118,15 @@ static void SDL_Blit_RGB888_RGB888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -211,15 +211,15 @@ static void SDL_Blit_RGB888_RGB888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -325,15 +325,15 @@ static void SDL_Blit_RGB888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -396,15 +396,15 @@ static void SDL_Blit_RGB888_BGR888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -482,15 +482,15 @@ static void SDL_Blit_RGB888_BGR888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -575,15 +575,15 @@ static void SDL_Blit_RGB888_BGR888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -689,15 +689,15 @@ static void SDL_Blit_RGB888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -761,15 +761,15 @@ static void SDL_Blit_RGB888_ARGB8888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -849,15 +849,15 @@ static void SDL_Blit_RGB888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -948,15 +948,15 @@ static void SDL_Blit_RGB888_ARGB8888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1064,15 +1064,15 @@ static void SDL_Blit_RGB888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1137,15 +1137,15 @@ static void SDL_Blit_BGR888_RGB888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1223,15 +1223,15 @@ static void SDL_Blit_BGR888_RGB888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1316,15 +1316,15 @@ static void SDL_Blit_BGR888_RGB888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1430,15 +1430,15 @@ static void SDL_Blit_BGR888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1499,15 +1499,15 @@ static void SDL_Blit_BGR888_BGR888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1582,15 +1582,15 @@ static void SDL_Blit_BGR888_BGR888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1675,15 +1675,15 @@ static void SDL_Blit_BGR888_BGR888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1789,15 +1789,15 @@ static void SDL_Blit_BGR888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1861,15 +1861,15 @@ static void SDL_Blit_BGR888_ARGB8888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -1949,15 +1949,15 @@ static void SDL_Blit_BGR888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2048,15 +2048,15 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2164,15 +2164,15 @@ static void SDL_Blit_BGR888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2237,15 +2237,15 @@ static void SDL_Blit_ARGB8888_RGB888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2331,15 +2331,15 @@ static void SDL_Blit_ARGB8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2432,15 +2432,15 @@ static void SDL_Blit_ARGB8888_RGB888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2547,15 +2547,15 @@ static void SDL_Blit_ARGB8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2621,15 +2621,15 @@ static void SDL_Blit_ARGB8888_BGR888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2715,15 +2715,15 @@ static void SDL_Blit_ARGB8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2816,15 +2816,15 @@ static void SDL_Blit_ARGB8888_BGR888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -2931,15 +2931,15 @@ static void SDL_Blit_ARGB8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3003,15 +3003,15 @@ static void SDL_Blit_ARGB8888_ARGB8888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3096,15 +3096,15 @@ static void SDL_Blit_ARGB8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3204,15 +3204,15 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3324,15 +3324,15 @@ static void SDL_Blit_ARGB8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3400,15 +3400,15 @@ static void SDL_Blit_RGBA8888_RGB888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3494,15 +3494,15 @@ static void SDL_Blit_RGBA8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3595,15 +3595,15 @@ static void SDL_Blit_RGBA8888_RGB888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3710,15 +3710,15 @@ static void SDL_Blit_RGBA8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3784,15 +3784,15 @@ static void SDL_Blit_RGBA8888_BGR888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3878,15 +3878,15 @@ static void SDL_Blit_RGBA8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -3979,15 +3979,15 @@ static void SDL_Blit_RGBA8888_BGR888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4094,15 +4094,15 @@ static void SDL_Blit_RGBA8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4168,15 +4168,15 @@ static void SDL_Blit_RGBA8888_ARGB8888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4264,15 +4264,15 @@ static void SDL_Blit_RGBA8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4372,15 +4372,15 @@ static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4492,15 +4492,15 @@ static void SDL_Blit_RGBA8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4568,15 +4568,15 @@ static void SDL_Blit_ABGR8888_RGB888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4662,15 +4662,15 @@ static void SDL_Blit_ABGR8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4763,15 +4763,15 @@ static void SDL_Blit_ABGR8888_RGB888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4878,15 +4878,15 @@ static void SDL_Blit_ABGR8888_RGB888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -4952,15 +4952,15 @@ static void SDL_Blit_ABGR8888_BGR888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5046,15 +5046,15 @@ static void SDL_Blit_ABGR8888_BGR888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5147,15 +5147,15 @@ static void SDL_Blit_ABGR8888_BGR888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5262,15 +5262,15 @@ static void SDL_Blit_ABGR8888_BGR888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5336,15 +5336,15 @@ static void SDL_Blit_ABGR8888_ARGB8888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5432,15 +5432,15 @@ static void SDL_Blit_ABGR8888_ARGB8888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5540,15 +5540,15 @@ static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5660,15 +5660,15 @@ static void SDL_Blit_ABGR8888_ARGB8888_Modulate_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5736,15 +5736,15 @@ static void SDL_Blit_BGRA8888_RGB888_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5830,15 +5830,15 @@ static void SDL_Blit_BGRA8888_RGB888_Blend_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
     incx = (info->src_w << 16) / info->dst_w;
+    posy = incy / 2;
 
     while (info->dst_h--) {
         Uint32 *src = 0;
         Uint32 *dst = (Uint32 *)info->dst;
         int n = info->dst_w;
-        posx = 0;
+        posx = incx / 2;
 
         srcy = posy >> 16;
         while (n--) {
@@ -5931,15 +5931,15 @@ static void SDL_Blit_BGRA8888_RGB888_Modulate_Scale(SDL_BlitInfo *info)
     Uint32 posy, posx;
     int incy, incx;
 
-    posy = 0;
     incy = (info->src_h << 16) / info->dst_h;
  

(Patch may be truncated, please check the link at the top of this post.)