src/video/SDL_blit.h
author Sam Lantinga
Fri, 17 Aug 2007 06:40:12 +0000
changeset 2263 900c35d8e8fd
parent 2262 bee005ace1bf
child 2266 e61ad15a205f
permissions -rw-r--r--
More work in progress, still doesn't compile...
     1 /*
     2     SDL - Simple DirectMedia Layer
     3     Copyright (C) 1997-2006 Sam Lantinga
     4 
     5     This library is free software; you can redistribute it and/or
     6     modify it under the terms of the GNU Lesser General Public
     7     License as published by the Free Software Foundation; either
     8     version 2.1 of the License, or (at your option) any later version.
     9 
    10     This library is distributed in the hope that it will be useful,
    11     but WITHOUT ANY WARRANTY; without even the implied warranty of
    12     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    13     Lesser General Public License for more details.
    14 
    15     You should have received a copy of the GNU Lesser General Public
    16     License along with this library; if not, write to the Free Software
    17     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
    18 
    19     Sam Lantinga
    20     slouken@libsdl.org
    21 */
    22 #include "SDL_config.h"
    23 
    24 #ifndef _SDL_blit_h
    25 #define _SDL_blit_h
    26 
    27 #ifdef __MMX__
    28 #include <mmintrin.h>
    29 #endif
    30 #ifdef __3dNOW__
    31 #include <mm3dnow.h>
    32 #endif
    33 #ifdef __SSE__
    34 #include <xmmintrin.h>
    35 #endif
    36 #ifdef __SSE2__
    37 #include <emmintrin.h>
    38 #endif
    39 
    40 #include "SDL_cpuinfo.h"
    41 #include "SDL_endian.h"
    42 
    43 /* SDL blit copy flags */
    44 #define SDL_COPY_MODULATE_COLOR     0x0001
    45 #define SDL_COPY_MODULATE_ALPHA     0x0002
    46 #define SDL_COPY_MASK               0x0010
    47 #define SDL_COPY_BLEND              0x0020
    48 #define SDL_COPY_ADD                0x0040
    49 #define SDL_COPY_MOD                0x0080
    50 #define SDL_COPY_COLORKEY           0x0100
    51 #define SDL_COPY_NEAREST            0x0200
    52 
    53 /* SDL blit CPU flags */
    54 #define SDL_CPU_ANY                 0x0000
    55 #define SDL_CPU_MMX                 0x0001
    56 #define SDL_CPU_3DNOW               0x0002
    57 #define SDL_CPU_SSE                 0x0004
    58 #define SDL_CPU_SSE2                0x0008
    59 #define SDL_CPU_ALTIVEC_PREFETCH    0x0010
    60 #define SDL_CPU_ALTIVEC_NOPREFETCH  0x0020
    61 
    62 typedef struct {
    63     Uint8 *src;
    64     int src_w, src_h;
    65     int src_pitch;
    66     Uint8 *dst;
    67     int dst_w, dst_h;
    68     int dst_pitch;
    69     SDL_PixelFormat *src_fmt;
    70     SDL_PixelFormat *dst_fmt;
    71     Uint8 *table;
    72     int flags;
    73     Uint32 colorkey;
    74     Uint8 r, g, b, a;
    75 } SDL_BlitInfo;
    76 
    77 typedef void (SDLCALL * SDL_BlitFunc)(SDL_BlitInfo *info);
    78 
    79 typedef struct {
    80     Uint32 src_format;
    81     Uint32 dst_format;
    82     int flags;
    83     int cpu;
    84     SDL_BlitFunc func;
    85 } SDL_BlitFuncEntry;
    86 
    87 /* Blit mapping definition */
    88 typedef struct SDL_BlitMap
    89 {
    90     SDL_Surface *dst;
    91     int identity;
    92     SDL_blit blit;
    93     void *data;
    94     SDL_BlitInfo info;
    95 
    96     /* the version count matches the destination; mismatch indicates
    97        an invalid mapping */
    98     unsigned int format_version;
    99 } SDL_BlitMap;
   100 
   101 /* Functions found in SDL_blit.c */
   102 extern int SDL_CalculateBlit(SDL_Surface * surface);
   103 
   104 /* Blit function tables in SDL_blit_*.c */
   105 extern SDL_BlitFuncEntry SDL_BlitFuncTable0[];
   106 extern SDL_BlitFuncEntry SDL_BlitFuncTable1[];
   107 extern SDL_BlitFuncEntry SDL_BlitFuncTableN[];
   108 
   109 /*
   110  * Useful macros for blitting routines
   111  */
   112 
   113 #if defined(__GNUC__)
   114 #define DECLARE_ALIGNED(t,v,a)  t __attribute__((aligned(a))) v
   115 #elif defined(_MSC_VER)
   116 #define DECLARE_ALIGNED(t,v,a)  __declspec(align(a)) t v
   117 #else
   118 #define DECLARE_ALIGNED(t,v,a)  t v
   119 #endif
   120 
   121 #define FORMAT_EQUAL(A, B)						\
   122     ((A)->BitsPerPixel == (B)->BitsPerPixel				\
   123      && ((A)->Rmask == (B)->Rmask) && ((A)->Amask == (B)->Amask))
   124 
   125 /* Load pixel of the specified format from a buffer and get its R-G-B values */
   126 /* FIXME: rescale values to 0..255 here? */
   127 #define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)				\
   128 {									\
   129 	r = (((Pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss); 		\
   130 	g = (((Pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss); 		\
   131 	b = (((Pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss); 		\
   132 }
   133 #define RGB_FROM_RGB565(Pixel, r, g, b)					\
   134 {									\
   135 	r = (((Pixel&0xF800)>>11)<<3);		 			\
   136 	g = (((Pixel&0x07E0)>>5)<<2); 					\
   137 	b = ((Pixel&0x001F)<<3); 					\
   138 }
   139 #define RGB_FROM_RGB555(Pixel, r, g, b)					\
   140 {									\
   141 	r = (((Pixel&0x7C00)>>10)<<3);		 			\
   142 	g = (((Pixel&0x03E0)>>5)<<3); 					\
   143 	b = ((Pixel&0x001F)<<3); 					\
   144 }
   145 #define RGB_FROM_RGB888(Pixel, r, g, b)					\
   146 {									\
   147 	r = ((Pixel&0xFF0000)>>16);		 			\
   148 	g = ((Pixel&0xFF00)>>8);		 			\
   149 	b = (Pixel&0xFF);			 			\
   150 }
   151 #define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel)				   \
   152 do {									   \
   153 	switch (bpp) {							   \
   154 		case 2:							   \
   155 			Pixel = *((Uint16 *)(buf));			   \
   156 		break;							   \
   157 									   \
   158 		case 3: {						   \
   159 		        Uint8 *B = (Uint8 *)(buf);			   \
   160 			if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {		   \
   161 			        Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \
   162 			} else {					   \
   163 			        Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \
   164 			}						   \
   165 		}							   \
   166 		break;							   \
   167 									   \
   168 		case 4:							   \
   169 			Pixel = *((Uint32 *)(buf));			   \
   170 		break;							   \
   171 									   \
   172 		default:						   \
   173 			Pixel = 0; /* appease gcc */			   \
   174 		break;							   \
   175 	}								   \
   176 } while(0)
   177 
   178 #define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b)			   \
   179 do {									   \
   180 	switch (bpp) {							   \
   181 		case 2:							   \
   182 			Pixel = *((Uint16 *)(buf));			   \
   183 		break;							   \
   184 									   \
   185 		case 3: {						   \
   186 		        Uint8 *B = (Uint8 *)buf;			   \
   187 			if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {		   \
   188 			        Pixel = B[0] + (B[1] << 8) + (B[2] << 16); \
   189 			} else {					   \
   190 			        Pixel = (B[0] << 16) + (B[1] << 8) + B[2]; \
   191 			}						   \
   192 		}							   \
   193 		break;							   \
   194 									   \
   195 		case 4:							   \
   196 			Pixel = *((Uint32 *)(buf));			   \
   197 		break;							   \
   198 									   \
   199 	        default:						   \
   200 		        Pixel = 0;	/* prevent gcc from complaining */ \
   201 		break;							   \
   202 	}								   \
   203 	RGB_FROM_PIXEL(Pixel, fmt, r, g, b);				   \
   204 } while(0)
   205 
   206 /* Assemble R-G-B values into a specified pixel format and store them */
   207 #define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)				\
   208 {									\
   209 	Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|				\
   210 		((g>>fmt->Gloss)<<fmt->Gshift)|				\
   211 		((b>>fmt->Bloss)<<fmt->Bshift);				\
   212 }
   213 #define RGB565_FROM_RGB(Pixel, r, g, b)					\
   214 {									\
   215 	Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3);			\
   216 }
   217 #define RGB555_FROM_RGB(Pixel, r, g, b)					\
   218 {									\
   219 	Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3);			\
   220 }
   221 #define RGB888_FROM_RGB(Pixel, r, g, b)					\
   222 {									\
   223 	Pixel = (r<<16)|(g<<8)|b;					\
   224 }
   225 #define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b) 				\
   226 {									\
   227 	switch (bpp) {							\
   228 		case 2: {						\
   229 			Uint16 Pixel;					\
   230 									\
   231 			PIXEL_FROM_RGB(Pixel, fmt, r, g, b);		\
   232 			*((Uint16 *)(buf)) = Pixel;			\
   233 		}							\
   234 		break;							\
   235 									\
   236 		case 3: {						\
   237                         if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {		\
   238 			        *((buf)+fmt->Rshift/8) = r;		\
   239 				*((buf)+fmt->Gshift/8) = g;		\
   240 				*((buf)+fmt->Bshift/8) = b;		\
   241 			} else {					\
   242 			        *((buf)+2-fmt->Rshift/8) = r;		\
   243 				*((buf)+2-fmt->Gshift/8) = g;		\
   244 				*((buf)+2-fmt->Bshift/8) = b;		\
   245 			}						\
   246 		}							\
   247 		break;							\
   248 									\
   249 		case 4: {						\
   250 			Uint32 Pixel;					\
   251 									\
   252 			PIXEL_FROM_RGB(Pixel, fmt, r, g, b);		\
   253 			*((Uint32 *)(buf)) = Pixel;			\
   254 		}							\
   255 		break;							\
   256 	}								\
   257 }
   258 #define ASSEMBLE_RGB_AMASK(buf, bpp, fmt, r, g, b, Amask)		\
   259 {									\
   260 	switch (bpp) {							\
   261 		case 2: {						\
   262 			Uint16 *bufp;					\
   263 			Uint16 Pixel;					\
   264 									\
   265 			bufp = (Uint16 *)buf;				\
   266 			PIXEL_FROM_RGB(Pixel, fmt, r, g, b);		\
   267 			*bufp = Pixel | (*bufp & Amask);		\
   268 		}							\
   269 		break;							\
   270 									\
   271 		case 3: {						\
   272                         if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {		\
   273 			        *((buf)+fmt->Rshift/8) = r;		\
   274 				*((buf)+fmt->Gshift/8) = g;		\
   275 				*((buf)+fmt->Bshift/8) = b;		\
   276 			} else {					\
   277 			        *((buf)+2-fmt->Rshift/8) = r;		\
   278 				*((buf)+2-fmt->Gshift/8) = g;		\
   279 				*((buf)+2-fmt->Bshift/8) = b;		\
   280 			}						\
   281 		}							\
   282 		break;							\
   283 									\
   284 		case 4: {						\
   285 			Uint32 *bufp;					\
   286 			Uint32 Pixel;					\
   287 									\
   288 			bufp = (Uint32 *)buf;				\
   289 			PIXEL_FROM_RGB(Pixel, fmt, r, g, b);		\
   290 			*bufp = Pixel | (*bufp & Amask);		\
   291 		}							\
   292 		break;							\
   293 	}								\
   294 }
   295 
   296 /* FIXME: Should we rescale alpha into 0..255 here? */
   297 #define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a)				\
   298 {									\
   299 	r = ((Pixel&fmt->Rmask)>>fmt->Rshift)<<fmt->Rloss; 		\
   300 	g = ((Pixel&fmt->Gmask)>>fmt->Gshift)<<fmt->Gloss; 		\
   301 	b = ((Pixel&fmt->Bmask)>>fmt->Bshift)<<fmt->Bloss; 		\
   302 	a = ((Pixel&fmt->Amask)>>fmt->Ashift)<<fmt->Aloss;	 	\
   303 }
   304 #define RGBA_FROM_8888(Pixel, fmt, r, g, b, a)	\
   305 {						\
   306 	r = (Pixel&fmt->Rmask)>>fmt->Rshift;	\
   307 	g = (Pixel&fmt->Gmask)>>fmt->Gshift;	\
   308 	b = (Pixel&fmt->Bmask)>>fmt->Bshift;	\
   309 	a = (Pixel&fmt->Amask)>>fmt->Ashift;	\
   310 }
   311 #define RGBA_FROM_RGBA8888(Pixel, r, g, b, a)				\
   312 {									\
   313 	r = (Pixel>>24);						\
   314 	g = ((Pixel>>16)&0xFF);						\
   315 	b = ((Pixel>>8)&0xFF);						\
   316 	a = (Pixel&0xFF);						\
   317 }
   318 #define RGBA_FROM_ARGB8888(Pixel, r, g, b, a)				\
   319 {									\
   320 	r = ((Pixel>>16)&0xFF);						\
   321 	g = ((Pixel>>8)&0xFF);						\
   322 	b = (Pixel&0xFF);						\
   323 	a = (Pixel>>24);						\
   324 }
   325 #define RGBA_FROM_ABGR8888(Pixel, r, g, b, a)				\
   326 {									\
   327 	r = (Pixel&0xFF);						\
   328 	g = ((Pixel>>8)&0xFF);						\
   329 	b = ((Pixel>>16)&0xFF);						\
   330 	a = (Pixel>>24);						\
   331 }
   332 #define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)			   \
   333 do {									   \
   334 	switch (bpp) {							   \
   335 		case 2:							   \
   336 			Pixel = *((Uint16 *)(buf));			   \
   337 		break;							   \
   338 									   \
   339 		case 3:	{/* FIXME: broken code (no alpha) */		   \
   340 		        Uint8 *b = (Uint8 *)buf;			   \
   341 			if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {		   \
   342 			        Pixel = b[0] + (b[1] << 8) + (b[2] << 16); \
   343 			} else {					   \
   344 			        Pixel = (b[0] << 16) + (b[1] << 8) + b[2]; \
   345 			}						   \
   346 		}							   \
   347 		break;							   \
   348 									   \
   349 		case 4:							   \
   350 			Pixel = *((Uint32 *)(buf));			   \
   351 		break;							   \
   352 									   \
   353 		default:						   \
   354 		        Pixel = 0; /* stop gcc complaints */		   \
   355 		break;							   \
   356 	}								   \
   357 	RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);			   \
   358 	Pixel &= ~fmt->Amask;						   \
   359 } while(0)
   360 
   361 /* FIXME: this isn't correct, especially for Alpha (maximum != 255) */
   362 #define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)				\
   363 {									\
   364 	Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|				\
   365 		((g>>fmt->Gloss)<<fmt->Gshift)|				\
   366 		((b>>fmt->Bloss)<<fmt->Bshift)|				\
   367 		((a>>fmt->Aloss)<<fmt->Ashift);				\
   368 }
   369 #define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)			\
   370 {									\
   371 	switch (bpp) {							\
   372 		case 2: {						\
   373 			Uint16 Pixel;					\
   374 									\
   375 			PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);	\
   376 			*((Uint16 *)(buf)) = Pixel;			\
   377 		}							\
   378 		break;							\
   379 									\
   380 		case 3: { /* FIXME: broken code (no alpha) */		\
   381                         if(SDL_BYTEORDER == SDL_LIL_ENDIAN) {		\
   382 			        *((buf)+fmt->Rshift/8) = r;		\
   383 				*((buf)+fmt->Gshift/8) = g;		\
   384 				*((buf)+fmt->Bshift/8) = b;		\
   385 			} else {					\
   386 			        *((buf)+2-fmt->Rshift/8) = r;		\
   387 				*((buf)+2-fmt->Gshift/8) = g;		\
   388 				*((buf)+2-fmt->Bshift/8) = b;		\
   389 			}						\
   390 		}							\
   391 		break;							\
   392 									\
   393 		case 4: {						\
   394 			Uint32 Pixel;					\
   395 									\
   396 			PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);	\
   397 			*((Uint32 *)(buf)) = Pixel;			\
   398 		}							\
   399 		break;							\
   400 	}								\
   401 }
   402 
   403 /* Blend the RGB values of two Pixels based on a source alpha value */
   404 #define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB)	\
   405 do {						\
   406 	dR = (((sR-dR)*(A))>>8)+dR;		\
   407 	dG = (((sG-dG)*(A))>>8)+dG;		\
   408 	dB = (((sB-dB)*(A))>>8)+dB;		\
   409 } while(0)
   410 
   411 /* Blend the RGB values of two Pixels based on a source alpha value */
   412 #define ACCURATE_ALPHA_BLEND(sR, sG, sB, sA, dR, dG, dB)	\
   413 do {						\
   414     unsigned tR, tG, tB, tA; \
   415     tA = 255 - sA; \
   416     tR = 1 + (sR * sA) + (dR * tA); \
   417     dR = (tR + (tR >> 8)) >> 8; \
   418     tG = 1 + (sG * sA) + (dG * tA); \
   419     dG = (tG + (tG >> 8)) >> 8; \
   420     tB = 1 + (sB * sA) + (dB * tA); \
   421     dB = (tB + (tB >> 8)) >> 8; \
   422 } while(0)
   423 
   424 
   425 /* This is a very useful loop for optimizing blitters */
   426 #if defined(_MSC_VER) && (_MSC_VER == 1300)
   427 /* There's a bug in the Visual C++ 7 optimizer when compiling this code */
   428 #else
   429 #define USE_DUFFS_LOOP
   430 #endif
   431 #ifdef USE_DUFFS_LOOP
   432 
   433 /* 8-times unrolled loop */
   434 #define DUFFS_LOOP8(pixel_copy_increment, width)			\
   435 { int n = (width+7)/8;							\
   436 	switch (width & 7) {						\
   437 	case 0: do {	pixel_copy_increment;				\
   438 	case 7:		pixel_copy_increment;				\
   439 	case 6:		pixel_copy_increment;				\
   440 	case 5:		pixel_copy_increment;				\
   441 	case 4:		pixel_copy_increment;				\
   442 	case 3:		pixel_copy_increment;				\
   443 	case 2:		pixel_copy_increment;				\
   444 	case 1:		pixel_copy_increment;				\
   445 		} while ( --n > 0 );					\
   446 	}								\
   447 }
   448 
   449 /* 4-times unrolled loop */
   450 #define DUFFS_LOOP4(pixel_copy_increment, width)			\
   451 { int n = (width+3)/4;							\
   452 	switch (width & 3) {						\
   453 	case 0: do {	pixel_copy_increment;				\
   454 	case 3:		pixel_copy_increment;				\
   455 	case 2:		pixel_copy_increment;				\
   456 	case 1:		pixel_copy_increment;				\
   457 		} while ( --n > 0 );					\
   458 	}								\
   459 }
   460 
   461 /* 2 - times unrolled loop */
   462 #define DUFFS_LOOP_DOUBLE2(pixel_copy_increment,			\
   463 				double_pixel_copy_increment, width)	\
   464 { int n, w = width;							\
   465 	if( w & 1 ) {							\
   466 	    pixel_copy_increment;					\
   467 	    w--;							\
   468 	}								\
   469 	if ( w > 0 )	{						\
   470 	    n = ( w + 2) / 4;						\
   471 	    switch( w & 2 ) {						\
   472 	    case 0: do {	double_pixel_copy_increment;		\
   473 	    case 2:		double_pixel_copy_increment;		\
   474 		    } while ( --n > 0 );					\
   475 	    }								\
   476 	}								\
   477 }
   478 
   479 /* 2 - times unrolled loop 4 pixels */
   480 #define DUFFS_LOOP_QUATRO2(pixel_copy_increment,			\
   481 				double_pixel_copy_increment,		\
   482 				quatro_pixel_copy_increment, width)	\
   483 { int n, w = width;								\
   484         if(w & 1) {							\
   485 	  pixel_copy_increment;						\
   486 	  w--;								\
   487 	}								\
   488 	if(w & 2) {							\
   489 	  double_pixel_copy_increment;					\
   490 	  w -= 2;							\
   491 	}								\
   492 	if ( w > 0 ) {							\
   493 	    n = ( w + 7 ) / 8;						\
   494 	    switch( w & 4 ) {						\
   495 	    case 0: do {	quatro_pixel_copy_increment;		\
   496 	    case 4:		quatro_pixel_copy_increment;		\
   497 		    } while ( --n > 0 );					\
   498 	    }								\
   499 	}								\
   500 }
   501 
   502 /* Use the 8-times version of the loop by default */
   503 #define DUFFS_LOOP(pixel_copy_increment, width)				\
   504 	DUFFS_LOOP8(pixel_copy_increment, width)
   505 
   506 #else
   507 
   508 /* Don't use Duff's device to unroll loops */
   509 #define DUFFS_LOOP_DOUBLE2(pixel_copy_increment,			\
   510 			 double_pixel_copy_increment, width)		\
   511 { int n = width;								\
   512     if( n & 1 ) {							\
   513 	pixel_copy_increment;						\
   514 	n--;								\
   515     }									\
   516     n=n>>1;								\
   517     for(; n > 0; --n) {   						\
   518 	double_pixel_copy_increment;					\
   519     }									\
   520 }
   521 
   522 /* Don't use Duff's device to unroll loops */
   523 #define DUFFS_LOOP_QUATRO2(pixel_copy_increment,			\
   524 				double_pixel_copy_increment,		\
   525 				quatro_pixel_copy_increment, width)	\
   526 { int n = width;								\
   527         if(n & 1) {							\
   528 	  pixel_copy_increment;						\
   529 	  n--;								\
   530 	}								\
   531 	if(n & 2) {							\
   532 	  double_pixel_copy_increment;					\
   533 	  n -= 2;							\
   534 	}								\
   535 	n=n>>2;								\
   536 	for(; n > 0; --n) {   						\
   537 	  quatro_pixel_copy_increment;					\
   538         }								\
   539 }
   540 
   541 /* Don't use Duff's device to unroll loops */
   542 #define DUFFS_LOOP(pixel_copy_increment, width)				\
   543 { int n;								\
   544 	for ( n=width; n > 0; --n ) {					\
   545 		pixel_copy_increment;					\
   546 	}								\
   547 }
   548 #define DUFFS_LOOP8(pixel_copy_increment, width)			\
   549 	DUFFS_LOOP(pixel_copy_increment, width)
   550 #define DUFFS_LOOP4(pixel_copy_increment, width)			\
   551 	DUFFS_LOOP(pixel_copy_increment, width)
   552 
   553 #endif /* USE_DUFFS_LOOP */
   554 
   555 /* Prevent Visual C++ 6.0 from printing out stupid warnings */
   556 #if defined(_MSC_VER) && (_MSC_VER >= 600)
   557 #pragma warning(disable: 4550)
   558 #endif
   559 
   560 #endif /* _SDL_blit_h */
   561 /* vi: set ts=4 sw=4 expandtab: */