src/video/SDL_blit_N.c
changeset 7208 414ad123be9b
parent 6885 700f1b25f77f
child 7364 e21bd6987b86
     1.1 --- a/src/video/SDL_blit_N.c	Tue May 21 23:35:45 2013 -0400
     1.2 +++ b/src/video/SDL_blit_N.c	Tue May 21 22:01:18 2013 -0700
     1.3 @@ -275,7 +275,7 @@
     1.4      vector unsigned int v16 = vec_add(v8, v8);
     1.5      vector unsigned short v2 = vec_splat_u16(2);
     1.6      vector unsigned short v3 = vec_splat_u16(3);
     1.7 -    /* 
     1.8 +    /*
     1.9         0x10 - 0x1f is the alpha
    1.10         0x00 - 0x0e evens are the red
    1.11         0x01 - 0x0f odds are zero
    1.12 @@ -422,7 +422,7 @@
    1.13      vector unsigned int v16 = vec_add(v8, v8);
    1.14      vector unsigned short v1 = vec_splat_u16(1);
    1.15      vector unsigned short v3 = vec_splat_u16(3);
    1.16 -    /* 
    1.17 +    /*
    1.18         0x10 - 0x1f is the alpha
    1.19         0x00 - 0x0e evens are the red
    1.20         0x01 - 0x0f odds are zero
    1.21 @@ -876,18 +876,18 @@
    1.22  
    1.23  /* This is now endian dependent */
    1.24  #if SDL_BYTEORDER == SDL_LIL_ENDIAN
    1.25 -#define HI	1
    1.26 -#define LO	0
    1.27 +#define HI  1
    1.28 +#define LO  0
    1.29  #else /* SDL_BYTEORDER == SDL_BIG_ENDIAN */
    1.30 -#define HI	0
    1.31 -#define LO	1
    1.32 +#define HI  0
    1.33 +#define LO  1
    1.34  #endif
    1.35  
    1.36  /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */
    1.37  #define RGB888_RGB332(dst, src) { \
    1.38 -	dst = (Uint8)((((src)&0x00E00000)>>16)| \
    1.39 -	              (((src)&0x0000E000)>>11)| \
    1.40 -	              (((src)&0x000000C0)>>6)); \
    1.41 +    dst = (Uint8)((((src)&0x00E00000)>>16)| \
    1.42 +                  (((src)&0x0000E000)>>11)| \
    1.43 +                  (((src)&0x000000C0)>>6)); \
    1.44  }
    1.45  static void
    1.46  Blit_RGB888_index8(SDL_BlitInfo * info)
    1.47 @@ -913,11 +913,11 @@
    1.48      if (map == NULL) {
    1.49          while (height--) {
    1.50  #ifdef USE_DUFFS_LOOP
    1.51 -			/* *INDENT-OFF* */
    1.52 -			DUFFS_LOOP(
    1.53 -				RGB888_RGB332(*dst++, *src);
    1.54 -			, width);
    1.55 -			/* *INDENT-ON* */
    1.56 +            /* *INDENT-OFF* */
    1.57 +            DUFFS_LOOP(
    1.58 +                RGB888_RGB332(*dst++, *src);
    1.59 +            , width);
    1.60 +            /* *INDENT-ON* */
    1.61  #else
    1.62              for (c = width / 4; c; --c) {
    1.63                  /* Pack RGB into 8bit pixel */
    1.64 @@ -949,13 +949,13 @@
    1.65  
    1.66          while (height--) {
    1.67  #ifdef USE_DUFFS_LOOP
    1.68 -			/* *INDENT-OFF* */
    1.69 -			DUFFS_LOOP(
    1.70 -				RGB888_RGB332(Pixel, *src);
    1.71 -				*dst++ = map[Pixel];
    1.72 -				++src;
    1.73 -			, width);
    1.74 -			/* *INDENT-ON* */
    1.75 +            /* *INDENT-OFF* */
    1.76 +            DUFFS_LOOP(
    1.77 +                RGB888_RGB332(Pixel, *src);
    1.78 +                *dst++ = map[Pixel];
    1.79 +                ++src;
    1.80 +            , width);
    1.81 +            /* *INDENT-ON* */
    1.82  #else
    1.83              for (c = width / 4; c; --c) {
    1.84                  /* Pack RGB into 8bit pixel */
    1.85 @@ -995,17 +995,17 @@
    1.86  
    1.87  /* Special optimized blit for RGB 8-8-8 --> RGB 5-5-5 */
    1.88  #define RGB888_RGB555(dst, src) { \
    1.89 -	*(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \
    1.90 -	                            (((*src)&0x0000F800)>>6)| \
    1.91 -	                            (((*src)&0x000000F8)>>3)); \
    1.92 +    *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>9)| \
    1.93 +                                (((*src)&0x0000F800)>>6)| \
    1.94 +                                (((*src)&0x000000F8)>>3)); \
    1.95  }
    1.96  #define RGB888_RGB555_TWO(dst, src) { \
    1.97 -	*(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \
    1.98 -	                     (((src[HI])&0x0000F800)>>6)| \
    1.99 -	                     (((src[HI])&0x000000F8)>>3))<<16)| \
   1.100 -	                     (((src[LO])&0x00F80000)>>9)| \
   1.101 -	                     (((src[LO])&0x0000F800)>>6)| \
   1.102 -	                     (((src[LO])&0x000000F8)>>3); \
   1.103 +    *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>9)| \
   1.104 +                         (((src[HI])&0x0000F800)>>6)| \
   1.105 +                         (((src[HI])&0x000000F8)>>3))<<16)| \
   1.106 +                         (((src[LO])&0x00F80000)>>9)| \
   1.107 +                         (((src[LO])&0x0000F800)>>6)| \
   1.108 +                         (((src[LO])&0x000000F8)>>3); \
   1.109  }
   1.110  static void
   1.111  Blit_RGB888_RGB555(SDL_BlitInfo * info)
   1.112 @@ -1028,13 +1028,13 @@
   1.113  
   1.114  #ifdef USE_DUFFS_LOOP
   1.115      while (height--) {
   1.116 -		/* *INDENT-OFF* */
   1.117 -		DUFFS_LOOP(
   1.118 -			RGB888_RGB555(dst, src);
   1.119 -			++src;
   1.120 -			++dst;
   1.121 -		, width);
   1.122 -		/* *INDENT-ON* */
   1.123 +        /* *INDENT-OFF* */
   1.124 +        DUFFS_LOOP(
   1.125 +            RGB888_RGB555(dst, src);
   1.126 +            ++src;
   1.127 +            ++dst;
   1.128 +        , width);
   1.129 +        /* *INDENT-ON* */
   1.130          src += srcskip;
   1.131          dst += dstskip;
   1.132      }
   1.133 @@ -1119,17 +1119,17 @@
   1.134  
   1.135  /* Special optimized blit for RGB 8-8-8 --> RGB 5-6-5 */
   1.136  #define RGB888_RGB565(dst, src) { \
   1.137 -	*(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \
   1.138 -	                            (((*src)&0x0000FC00)>>5)| \
   1.139 -	                            (((*src)&0x000000F8)>>3)); \
   1.140 +    *(Uint16 *)(dst) = (Uint16)((((*src)&0x00F80000)>>8)| \
   1.141 +                                (((*src)&0x0000FC00)>>5)| \
   1.142 +                                (((*src)&0x000000F8)>>3)); \
   1.143  }
   1.144  #define RGB888_RGB565_TWO(dst, src) { \
   1.145 -	*(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \
   1.146 -	                     (((src[HI])&0x0000FC00)>>5)| \
   1.147 -	                     (((src[HI])&0x000000F8)>>3))<<16)| \
   1.148 -	                     (((src[LO])&0x00F80000)>>8)| \
   1.149 -	                     (((src[LO])&0x0000FC00)>>5)| \
   1.150 -	                     (((src[LO])&0x000000F8)>>3); \
   1.151 +    *(Uint32 *)(dst) = (((((src[HI])&0x00F80000)>>8)| \
   1.152 +                         (((src[HI])&0x0000FC00)>>5)| \
   1.153 +                         (((src[HI])&0x000000F8)>>3))<<16)| \
   1.154 +                         (((src[LO])&0x00F80000)>>8)| \
   1.155 +                         (((src[LO])&0x0000FC00)>>5)| \
   1.156 +                         (((src[LO])&0x000000F8)>>3); \
   1.157  }
   1.158  static void
   1.159  Blit_RGB888_RGB565(SDL_BlitInfo * info)
   1.160 @@ -1152,13 +1152,13 @@
   1.161  
   1.162  #ifdef USE_DUFFS_LOOP
   1.163      while (height--) {
   1.164 -		/* *INDENT-OFF* */
   1.165 -		DUFFS_LOOP(
   1.166 -			RGB888_RGB565(dst, src);
   1.167 -			++src;
   1.168 -			++dst;
   1.169 -		, width);
   1.170 -		/* *INDENT-ON* */
   1.171 +        /* *INDENT-OFF* */
   1.172 +        DUFFS_LOOP(
   1.173 +            RGB888_RGB565(dst, src);
   1.174 +            ++src;
   1.175 +            ++dst;
   1.176 +        , width);
   1.177 +        /* *INDENT-ON* */
   1.178          src += srcskip;
   1.179          dst += dstskip;
   1.180      }
   1.181 @@ -1265,14 +1265,14 @@
   1.182  
   1.183  #ifdef USE_DUFFS_LOOP
   1.184      while (height--) {
   1.185 -		/* *INDENT-OFF* */
   1.186 -		DUFFS_LOOP(
   1.187 -		{
   1.188 -			*dst++ = RGB565_32(dst, src, map);
   1.189 -			src += 2;
   1.190 -		},
   1.191 -		width);
   1.192 -		/* *INDENT-ON* */
   1.193 +        /* *INDENT-OFF* */
   1.194 +        DUFFS_LOOP(
   1.195 +        {
   1.196 +            *dst++ = RGB565_32(dst, src, map);
   1.197 +            src += 2;
   1.198 +        },
   1.199 +        width);
   1.200 +        /* *INDENT-ON* */
   1.201          src += srcskip;
   1.202          dst += dstskip;
   1.203      }
   1.204 @@ -1863,9 +1863,9 @@
   1.205  /* Special optimized blit for RGB 8-8-8 --> RGB 3-3-2 */
   1.206  #ifndef RGB888_RGB332
   1.207  #define RGB888_RGB332(dst, src) { \
   1.208 -	dst = (((src)&0x00E00000)>>16)| \
   1.209 -	      (((src)&0x0000E000)>>11)| \
   1.210 -	      (((src)&0x000000C0)>>6); \
   1.211 +    dst = (((src)&0x00E00000)>>16)| \
   1.212 +          (((src)&0x0000E000)>>11)| \
   1.213 +          (((src)&0x000000C0)>>6); \
   1.214  }
   1.215  #endif
   1.216  static void
   1.217 @@ -1892,13 +1892,13 @@
   1.218  
   1.219  #ifdef USE_DUFFS_LOOP
   1.220      while (height--) {
   1.221 -		/* *INDENT-OFF* */
   1.222 -		DUFFS_LOOP(
   1.223 -			RGB888_RGB332(Pixel, *src);
   1.224 -			*dst++ = map[Pixel];
   1.225 -			++src;
   1.226 -		, width);
   1.227 -		/* *INDENT-ON* */
   1.228 +        /* *INDENT-OFF* */
   1.229 +        DUFFS_LOOP(
   1.230 +            RGB888_RGB332(Pixel, *src);
   1.231 +            *dst++ = map[Pixel];
   1.232 +            ++src;
   1.233 +        , width);
   1.234 +        /* *INDENT-ON* */
   1.235          src += srcskip;
   1.236          dst += dstskip;
   1.237      }
   1.238 @@ -1969,20 +1969,20 @@
   1.239      if (map == NULL) {
   1.240          while (height--) {
   1.241  #ifdef USE_DUFFS_LOOP
   1.242 -			/* *INDENT-OFF* */
   1.243 -			DUFFS_LOOP(
   1.244 -				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.245 -								sR, sG, sB);
   1.246 -				if ( 1 ) {
   1.247 -				  	/* Pack RGB into 8bit pixel */
   1.248 -				  	*dst = ((sR>>5)<<(3+2))|
   1.249 -					        ((sG>>5)<<(2)) |
   1.250 -					        ((sB>>6)<<(0)) ;
   1.251 -				}
   1.252 -				dst++;
   1.253 -				src += srcbpp;
   1.254 -			, width);
   1.255 -			/* *INDENT-ON* */
   1.256 +            /* *INDENT-OFF* */
   1.257 +            DUFFS_LOOP(
   1.258 +                DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.259 +                                sR, sG, sB);
   1.260 +                if ( 1 ) {
   1.261 +                    /* Pack RGB into 8bit pixel */
   1.262 +                    *dst = ((sR>>5)<<(3+2))|
   1.263 +                            ((sG>>5)<<(2)) |
   1.264 +                            ((sB>>6)<<(0)) ;
   1.265 +                }
   1.266 +                dst++;
   1.267 +                src += srcbpp;
   1.268 +            , width);
   1.269 +            /* *INDENT-ON* */
   1.270  #else
   1.271              for (c = width; c; --c) {
   1.272                  DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
   1.273 @@ -2001,20 +2001,20 @@
   1.274      } else {
   1.275          while (height--) {
   1.276  #ifdef USE_DUFFS_LOOP
   1.277 -			/* *INDENT-OFF* */
   1.278 -			DUFFS_LOOP(
   1.279 -				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.280 -								sR, sG, sB);
   1.281 -				if ( 1 ) {
   1.282 -				  	/* Pack RGB into 8bit pixel */
   1.283 -				  	*dst = map[((sR>>5)<<(3+2))|
   1.284 -						   ((sG>>5)<<(2))  |
   1.285 -						   ((sB>>6)<<(0))  ];
   1.286 -				}
   1.287 -				dst++;
   1.288 -				src += srcbpp;
   1.289 -			, width);
   1.290 -			/* *INDENT-ON* */
   1.291 +            /* *INDENT-OFF* */
   1.292 +            DUFFS_LOOP(
   1.293 +                DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.294 +                                sR, sG, sB);
   1.295 +                if ( 1 ) {
   1.296 +                    /* Pack RGB into 8bit pixel */
   1.297 +                    *dst = map[((sR>>5)<<(3+2))|
   1.298 +                           ((sG>>5)<<(2))  |
   1.299 +                           ((sB>>6)<<(0))  ];
   1.300 +                }
   1.301 +                dst++;
   1.302 +                src += srcbpp;
   1.303 +            , width);
   1.304 +            /* *INDENT-ON* */
   1.305  #else
   1.306              for (c = width; c; --c) {
   1.307                  DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
   1.308 @@ -2051,15 +2051,15 @@
   1.309          Uint32 mask = (info->a >> dstfmt->Aloss) << dstfmt->Ashift;
   1.310  
   1.311          while (height--) {
   1.312 -			/* *INDENT-OFF* */
   1.313 -			DUFFS_LOOP(
   1.314 -			{
   1.315 -				*dst = *src | mask;
   1.316 -				++dst;
   1.317 -				++src;
   1.318 -			},
   1.319 -			width);
   1.320 -			/* *INDENT-ON* */
   1.321 +            /* *INDENT-OFF* */
   1.322 +            DUFFS_LOOP(
   1.323 +            {
   1.324 +                *dst = *src | mask;
   1.325 +                ++dst;
   1.326 +                ++src;
   1.327 +            },
   1.328 +            width);
   1.329 +            /* *INDENT-ON* */
   1.330              src = (Uint32 *) ((Uint8 *) src + srcskip);
   1.331              dst = (Uint32 *) ((Uint8 *) dst + dstskip);
   1.332          }
   1.333 @@ -2068,15 +2068,15 @@
   1.334          Uint32 mask = srcfmt->Rmask | srcfmt->Gmask | srcfmt->Bmask;
   1.335  
   1.336          while (height--) {
   1.337 -			/* *INDENT-OFF* */
   1.338 -			DUFFS_LOOP(
   1.339 -			{
   1.340 -				*dst = *src & mask;
   1.341 -				++dst;
   1.342 -				++src;
   1.343 -			},
   1.344 -			width);
   1.345 -			/* *INDENT-ON* */
   1.346 +            /* *INDENT-OFF* */
   1.347 +            DUFFS_LOOP(
   1.348 +            {
   1.349 +                *dst = *src & mask;
   1.350 +                ++dst;
   1.351 +                ++src;
   1.352 +            },
   1.353 +            width);
   1.354 +            /* *INDENT-ON* */
   1.355              src = (Uint32 *) ((Uint8 *) src + srcskip);
   1.356              dst = (Uint32 *) ((Uint8 *) dst + dstskip);
   1.357          }
   1.358 @@ -2099,20 +2099,20 @@
   1.359      unsigned alpha = dstfmt->Amask ? info->a : 0;
   1.360  
   1.361      while (height--) {
   1.362 -		/* *INDENT-OFF* */
   1.363 -		DUFFS_LOOP(
   1.364 -		{
   1.365 +        /* *INDENT-OFF* */
   1.366 +        DUFFS_LOOP(
   1.367 +        {
   1.368              Uint32 Pixel;
   1.369 -			unsigned sR;
   1.370 -			unsigned sG;
   1.371 -			unsigned sB;
   1.372 -			DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
   1.373 -			ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha);
   1.374 -			dst += dstbpp;
   1.375 -			src += srcbpp;
   1.376 -		},
   1.377 -		width);
   1.378 -		/* *INDENT-ON* */
   1.379 +            unsigned sR;
   1.380 +            unsigned sG;
   1.381 +            unsigned sB;
   1.382 +            DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel, sR, sG, sB);
   1.383 +            ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha);
   1.384 +            dst += dstbpp;
   1.385 +            src += srcbpp;
   1.386 +        },
   1.387 +        width);
   1.388 +        /* *INDENT-ON* */
   1.389          src += srcskip;
   1.390          dst += dstskip;
   1.391      }
   1.392 @@ -2170,43 +2170,43 @@
   1.393  
   1.394      if (palmap == NULL) {
   1.395          while (height--) {
   1.396 -			/* *INDENT-OFF* */
   1.397 -			DUFFS_LOOP(
   1.398 -			{
   1.399 -				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.400 -								sR, sG, sB);
   1.401 -				if ( (Pixel & rgbmask) != ckey ) {
   1.402 -				  	/* Pack RGB into 8bit pixel */
   1.403 -				  	*dst = (Uint8)(((sR>>5)<<(3+2))|
   1.404 -						           ((sG>>5)<<(2)) |
   1.405 -						           ((sB>>6)<<(0)));
   1.406 -				}
   1.407 -				dst++;
   1.408 -				src += srcbpp;
   1.409 -			},
   1.410 -			width);
   1.411 -			/* *INDENT-ON* */
   1.412 +            /* *INDENT-OFF* */
   1.413 +            DUFFS_LOOP(
   1.414 +            {
   1.415 +                DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.416 +                                sR, sG, sB);
   1.417 +                if ( (Pixel & rgbmask) != ckey ) {
   1.418 +                    /* Pack RGB into 8bit pixel */
   1.419 +                    *dst = (Uint8)(((sR>>5)<<(3+2))|
   1.420 +                                   ((sG>>5)<<(2)) |
   1.421 +                                   ((sB>>6)<<(0)));
   1.422 +                }
   1.423 +                dst++;
   1.424 +                src += srcbpp;
   1.425 +            },
   1.426 +            width);
   1.427 +            /* *INDENT-ON* */
   1.428              src += srcskip;
   1.429              dst += dstskip;
   1.430          }
   1.431      } else {
   1.432          while (height--) {
   1.433 -			/* *INDENT-OFF* */
   1.434 -			DUFFS_LOOP(
   1.435 -			{
   1.436 -				DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.437 -								sR, sG, sB);
   1.438 -				if ( (Pixel & rgbmask) != ckey ) {
   1.439 -				  	/* Pack RGB into 8bit pixel */
   1.440 -				  	*dst = (Uint8)palmap[((sR>>5)<<(3+2))|
   1.441 -							             ((sG>>5)<<(2))  |
   1.442 -							             ((sB>>6)<<(0))  ];
   1.443 -				}
   1.444 -				dst++;
   1.445 -				src += srcbpp;
   1.446 -			},
   1.447 -			width);
   1.448 -			/* *INDENT-ON* */
   1.449 +            /* *INDENT-OFF* */
   1.450 +            DUFFS_LOOP(
   1.451 +            {
   1.452 +                DISEMBLE_RGB(src, srcbpp, srcfmt, Pixel,
   1.453 +                                sR, sG, sB);
   1.454 +                if ( (Pixel & rgbmask) != ckey ) {
   1.455 +                    /* Pack RGB into 8bit pixel */
   1.456 +                    *dst = (Uint8)palmap[((sR>>5)<<(3+2))|
   1.457 +                                         ((sG>>5)<<(2))  |
   1.458 +                                         ((sB>>6)<<(0))  ];
   1.459 +                }
   1.460 +                dst++;
   1.461 +                src += srcbpp;
   1.462 +            },
   1.463 +            width);
   1.464 +            /* *INDENT-ON* */
   1.465              src += srcskip;
   1.466              dst += dstskip;
   1.467          }
   1.468 @@ -2231,17 +2231,17 @@
   1.469      ckey &= rgbmask;
   1.470  
   1.471      while (height--) {
   1.472 -		/* *INDENT-OFF* */
   1.473 -		DUFFS_LOOP(
   1.474 -		{
   1.475 -			if ( (*srcp & rgbmask) != ckey ) {
   1.476 -				*dstp = *srcp;
   1.477 -			}
   1.478 -			dstp++;
   1.479 -			srcp++;
   1.480 -		},
   1.481 -		width);
   1.482 -		/* *INDENT-ON* */
   1.483 +        /* *INDENT-OFF* */
   1.484 +        DUFFS_LOOP(
   1.485 +        {
   1.486 +            if ( (*srcp & rgbmask) != ckey ) {
   1.487 +                *dstp = *srcp;
   1.488 +            }
   1.489 +            dstp++;
   1.490 +            srcp++;
   1.491 +        },
   1.492 +        width);
   1.493 +        /* *INDENT-ON* */
   1.494          srcp += srcskip;
   1.495          dstp += dstskip;
   1.496      }
   1.497 @@ -2268,23 +2268,23 @@
   1.498      ckey &= rgbmask;
   1.499  
   1.500      while (height--) {
   1.501 -		/* *INDENT-OFF* */
   1.502 -		DUFFS_LOOP(
   1.503 -		{
   1.504 +        /* *INDENT-OFF* */
   1.505 +        DUFFS_LOOP(
   1.506 +        {
   1.507              Uint32 Pixel;
   1.508 -			unsigned sR;
   1.509 -			unsigned sG;
   1.510 -			unsigned sB;
   1.511 -			RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel);
   1.512 -			if ( (Pixel & rgbmask) != ckey ) {
   1.513 +            unsigned sR;
   1.514 +            unsigned sG;
   1.515 +            unsigned sB;
   1.516 +            RETRIEVE_RGB_PIXEL(src, srcbpp, Pixel);
   1.517 +            if ( (Pixel & rgbmask) != ckey ) {
   1.518                  RGB_FROM_PIXEL(Pixel, srcfmt, sR, sG, sB);
   1.519 -				ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha);
   1.520 -			}
   1.521 -			dst += dstbpp;
   1.522 -			src += srcbpp;
   1.523 -		},
   1.524 -		width);
   1.525 -		/* *INDENT-ON* */
   1.526 +                ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, alpha);
   1.527 +            }
   1.528 +            dst += dstbpp;
   1.529 +            src += srcbpp;
   1.530 +        },
   1.531 +        width);
   1.532 +        /* *INDENT-ON* */
   1.533          src += srcskip;
   1.534          dst += dstskip;
   1.535      }
   1.536 @@ -2315,18 +2315,18 @@
   1.537      ckey &= rgbmask;
   1.538  
   1.539      while (height--) {
   1.540 -		/* *INDENT-OFF* */
   1.541 -		DUFFS_LOOP(
   1.542 -		{
   1.543 -			DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
   1.544 -			if ( (Pixel & rgbmask) != ckey ) {
   1.545 -				  ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA);
   1.546 -			}
   1.547 -			dst += dstbpp;
   1.548 -			src += srcbpp;
   1.549 -		},
   1.550 -		width);
   1.551 -		/* *INDENT-ON* */
   1.552 +        /* *INDENT-OFF* */
   1.553 +        DUFFS_LOOP(
   1.554 +        {
   1.555 +            DISEMBLE_RGBA(src, srcbpp, srcfmt, Pixel, sR, sG, sB, sA);
   1.556 +            if ( (Pixel & rgbmask) != ckey ) {
   1.557 +                  ASSEMBLE_RGBA(dst, dstbpp, dstfmt, sR, sG, sB, sA);
   1.558 +            }
   1.559 +            dst += dstbpp;
   1.560 +            src += srcbpp;
   1.561 +        },
   1.562 +        width);
   1.563 +        /* *INDENT-ON* */
   1.564          src += srcskip;
   1.565          dst += dstskip;
   1.566      }
   1.567 @@ -2436,7 +2436,6 @@
   1.568      case 0:
   1.569          blitfun = NULL;
   1.570          if (dstfmt->BitsPerPixel == 8) {
   1.571 -            /* We assume 8-bit destinations are palettized */
   1.572              if ((srcfmt->BytesPerPixel == 4) &&
   1.573                  (srcfmt->Rmask == 0x00FF0000) &&
   1.574                  (srcfmt->Gmask == 0x0000FF00) &&