src/video/SDL_blit.h
author Sam Lantinga
Sat, 06 Jul 2013 21:17:09 -0700
changeset 7364 e21bd6987b86
parent 7191 75360622e65f
child 7373 5e6efd29b461
permissions -rw-r--r--
Added 8-bit RGB source surface support to NtoN blitters
     1 /*
     2   Simple DirectMedia Layer
     3   Copyright (C) 1997-2013 Sam Lantinga <slouken@libsdl.org>
     4 
     5   This software is provided 'as-is', without any express or implied
     6   warranty.  In no event will the authors be held liable for any damages
     7   arising from the use of this software.
     8 
     9   Permission is granted to anyone to use this software for any purpose,
    10   including commercial applications, and to alter it and redistribute it
    11   freely, subject to the following restrictions:
    12 
    13   1. The origin of this software must not be misrepresented; you must not
    14      claim that you wrote the original software. If you use this software
    15      in a product, an acknowledgment in the product documentation would be
    16      appreciated but is not required.
    17   2. Altered source versions must be plainly marked as such, and must not be
    18      misrepresented as being the original software.
    19   3. This notice may not be removed or altered from any source distribution.
    20 */
    21 #include "SDL_config.h"
    22 
    23 #ifndef _SDL_blit_h
    24 #define _SDL_blit_h
    25 
    26 #include "SDL_cpuinfo.h"
    27 #include "SDL_endian.h"
    28 #include "SDL_surface.h"
    29 
    30 /* Table to do pixel byte expansion */
    31 extern Uint8* SDL_expand_byte[9];
    32 
    33 /* SDL blit copy flags */
    34 #define SDL_COPY_MODULATE_COLOR     0x00000001
    35 #define SDL_COPY_MODULATE_ALPHA     0x00000002
    36 #define SDL_COPY_BLEND              0x00000010
    37 #define SDL_COPY_ADD                0x00000020
    38 #define SDL_COPY_MOD                0x00000040
    39 #define SDL_COPY_COLORKEY           0x00000100
    40 #define SDL_COPY_NEAREST            0x00000200
    41 #define SDL_COPY_RLE_DESIRED        0x00001000
    42 #define SDL_COPY_RLE_COLORKEY       0x00002000
    43 #define SDL_COPY_RLE_ALPHAKEY       0x00004000
    44 #define SDL_COPY_RLE_MASK           (SDL_COPY_RLE_DESIRED|SDL_COPY_RLE_COLORKEY|SDL_COPY_RLE_ALPHAKEY)
    45 
    46 /* SDL blit CPU flags */
    47 #define SDL_CPU_ANY                 0x00000000
    48 #define SDL_CPU_MMX                 0x00000001
    49 #define SDL_CPU_3DNOW               0x00000002
    50 #define SDL_CPU_SSE                 0x00000004
    51 #define SDL_CPU_SSE2                0x00000008
    52 #define SDL_CPU_ALTIVEC_PREFETCH    0x00000010
    53 #define SDL_CPU_ALTIVEC_NOPREFETCH  0x00000020
    54 
    55 typedef struct
    56 {
    57     Uint8 *src;
    58     int src_w, src_h;
    59     int src_pitch;
    60     int src_skip;
    61     Uint8 *dst;
    62     int dst_w, dst_h;
    63     int dst_pitch;
    64     int dst_skip;
    65     SDL_PixelFormat *src_fmt;
    66     SDL_PixelFormat *dst_fmt;
    67     Uint8 *table;
    68     int flags;
    69     Uint32 colorkey;
    70     Uint8 r, g, b, a;
    71 } SDL_BlitInfo;
    72 
    73 typedef void (SDLCALL * SDL_BlitFunc) (SDL_BlitInfo * info);
    74 
    75 typedef struct
    76 {
    77     Uint32 src_format;
    78     Uint32 dst_format;
    79     int flags;
    80     int cpu;
    81     SDL_BlitFunc func;
    82 } SDL_BlitFuncEntry;
    83 
    84 /* Blit mapping definition */
    85 typedef struct SDL_BlitMap
    86 {
    87     SDL_Surface *dst;
    88     int identity;
    89     SDL_blit blit;
    90     void *data;
    91     SDL_BlitInfo info;
    92 
    93     /* the version count matches the destination; mismatch indicates
    94        an invalid mapping */
    95     Uint32 dst_palette_version;
    96     Uint32 src_palette_version;
    97 } SDL_BlitMap;
    98 
    99 /* Functions found in SDL_blit.c */
   100 extern int SDL_CalculateBlit(SDL_Surface * surface);
   101 
   102 /* Functions found in SDL_blit_*.c */
   103 extern SDL_BlitFunc SDL_CalculateBlit0(SDL_Surface * surface);
   104 extern SDL_BlitFunc SDL_CalculateBlit1(SDL_Surface * surface);
   105 extern SDL_BlitFunc SDL_CalculateBlitN(SDL_Surface * surface);
   106 extern SDL_BlitFunc SDL_CalculateBlitA(SDL_Surface * surface);
   107 
   108 /*
   109  * Useful macros for blitting routines
   110  */
   111 
   112 #if defined(__GNUC__)
   113 #define DECLARE_ALIGNED(t,v,a)  t __attribute__((aligned(a))) v
   114 #elif defined(_MSC_VER)
   115 #define DECLARE_ALIGNED(t,v,a)  __declspec(align(a)) t v
   116 #else
   117 #define DECLARE_ALIGNED(t,v,a)  t v
   118 #endif
   119 
   120 /* Load pixel of the specified format from a buffer and get its R-G-B values */
   121 #define RGB_FROM_PIXEL(Pixel, fmt, r, g, b)                             \
   122 {                                                                       \
   123     r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \
   124     g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \
   125     b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \
   126 }
   127 #define RGB_FROM_RGB565(Pixel, r, g, b)                                 \
   128     {                                                                   \
   129     r = SDL_expand_byte[3][((Pixel&0xF800)>>11)];                       \
   130     g = SDL_expand_byte[2][((Pixel&0x07E0)>>5)];                        \
   131     b = SDL_expand_byte[3][(Pixel&0x001F)];                             \
   132 }
   133 #define RGB_FROM_RGB555(Pixel, r, g, b)                                 \
   134 {                                                                       \
   135     r = SDL_expand_byte[3][((Pixel&0x7C00)>>10)];                       \
   136     g = SDL_expand_byte[3][((Pixel&0x03E0)>>5)];                        \
   137     b = SDL_expand_byte[3][(Pixel&0x001F)];                             \
   138 }
   139 #define RGB_FROM_RGB888(Pixel, r, g, b)                                 \
   140 {                                                                       \
   141     r = ((Pixel&0xFF0000)>>16);                                         \
   142     g = ((Pixel&0xFF00)>>8);                                            \
   143     b = (Pixel&0xFF);                                                   \
   144 }
   145 #define RETRIEVE_RGB_PIXEL(buf, bpp, Pixel)                             \
   146 do {                                                                    \
   147     switch (bpp) {                                                      \
   148         case 1:                                                         \
   149             Pixel = *((Uint8 *)(buf));                                  \
   150         break;                                                          \
   151                                                                         \
   152         case 2:                                                         \
   153             Pixel = *((Uint16 *)(buf));                                 \
   154         break;                                                          \
   155                                                                         \
   156         case 3: {                                                       \
   157             Uint8 *B = (Uint8 *)(buf);                                  \
   158             if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
   159                 Pixel = B[0] + (B[1] << 8) + (B[2] << 16);              \
   160             } else {                                                    \
   161                 Pixel = (B[0] << 16) + (B[1] << 8) + B[2];              \
   162             }                                                           \
   163         }                                                               \
   164         break;                                                          \
   165                                                                         \
   166         case 4:                                                         \
   167             Pixel = *((Uint32 *)(buf));                                 \
   168         break;                                                          \
   169                                                                         \
   170         default:                                                        \
   171                 Pixel = 0; /* stop gcc complaints */                    \
   172         break;                                                          \
   173     }                                                                   \
   174 } while (0)
   175 
   176 #define DISEMBLE_RGB(buf, bpp, fmt, Pixel, r, g, b)                     \
   177 do {                                                                    \
   178     switch (bpp) {                                                      \
   179         case 1:                                                         \
   180             Pixel = *((Uint8 *)(buf));                                  \
   181             RGB_FROM_PIXEL(Pixel, fmt, r, g, b);                        \
   182         break;                                                          \
   183                                                                         \
   184         case 2:                                                         \
   185             Pixel = *((Uint16 *)(buf));                                 \
   186             RGB_FROM_PIXEL(Pixel, fmt, r, g, b);                        \
   187         break;                                                          \
   188                                                                         \
   189         case 3: {                                                       \
   190             Pixel = 0;                                                  \
   191             if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
   192                 r = *((buf)+fmt->Rshift/8);                             \
   193                 g = *((buf)+fmt->Gshift/8);                             \
   194                 b = *((buf)+fmt->Bshift/8);                             \
   195             } else {                                                    \
   196                 r = *((buf)+2-fmt->Rshift/8);                           \
   197                 g = *((buf)+2-fmt->Gshift/8);                           \
   198                 b = *((buf)+2-fmt->Bshift/8);                           \
   199             }                                                           \
   200         }                                                               \
   201         break;                                                          \
   202                                                                         \
   203         case 4:                                                         \
   204             Pixel = *((Uint32 *)(buf));                                 \
   205             RGB_FROM_PIXEL(Pixel, fmt, r, g, b);                        \
   206         break;                                                          \
   207                                                                         \
   208         default:                                                        \
   209                 /* stop gcc complaints */                               \
   210                 Pixel = 0;                                              \
   211                 r = g = b = 0;                                          \
   212         break;                                                          \
   213     }                                                                   \
   214 } while (0)
   215 
   216 /* Assemble R-G-B values into a specified pixel format and store them */
   217 #define PIXEL_FROM_RGB(Pixel, fmt, r, g, b)                             \
   218 {                                                                       \
   219     Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|                             \
   220         ((g>>fmt->Gloss)<<fmt->Gshift)|                                 \
   221         ((b>>fmt->Bloss)<<fmt->Bshift)|                                 \
   222         fmt->Amask;                                                     \
   223 }
   224 #define RGB565_FROM_RGB(Pixel, r, g, b)                                 \
   225 {                                                                       \
   226     Pixel = ((r>>3)<<11)|((g>>2)<<5)|(b>>3);                            \
   227 }
   228 #define RGB555_FROM_RGB(Pixel, r, g, b)                                 \
   229 {                                                                       \
   230     Pixel = ((r>>3)<<10)|((g>>3)<<5)|(b>>3);                            \
   231 }
   232 #define RGB888_FROM_RGB(Pixel, r, g, b)                                 \
   233 {                                                                       \
   234     Pixel = (r<<16)|(g<<8)|b;                                           \
   235 }
   236 #define ARGB8888_FROM_RGBA(Pixel, r, g, b, a)                           \
   237 {                                                                       \
   238     Pixel = (a<<24)|(r<<16)|(g<<8)|b;                                   \
   239 }
   240 #define RGBA8888_FROM_RGBA(Pixel, r, g, b, a)                           \
   241 {                                                                       \
   242     Pixel = (r<<24)|(g<<16)|(b<<8)|a;                                   \
   243 }
   244 #define ABGR8888_FROM_RGBA(Pixel, r, g, b, a)                           \
   245 {                                                                       \
   246     Pixel = (a<<24)|(b<<16)|(g<<8)|r;                                   \
   247 }
   248 #define BGRA8888_FROM_RGBA(Pixel, r, g, b, a)                           \
   249 {                                                                       \
   250     Pixel = (b<<24)|(g<<16)|(r<<8)|a;                                   \
   251 }
   252 #define ASSEMBLE_RGB(buf, bpp, fmt, r, g, b)                            \
   253 {                                                                       \
   254     switch (bpp) {                                                      \
   255         case 1: {                                                       \
   256             Uint8 Pixel;                                                \
   257                                                                         \
   258             PIXEL_FROM_RGB(Pixel, fmt, r, g, b);                        \
   259             *((Uint8 *)(buf)) = Pixel;                                  \
   260         }                                                               \
   261         break;                                                          \
   262                                                                         \
   263         case 2: {                                                       \
   264             Uint16 Pixel;                                               \
   265                                                                         \
   266             PIXEL_FROM_RGB(Pixel, fmt, r, g, b);                        \
   267             *((Uint16 *)(buf)) = Pixel;                                 \
   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 Pixel;                                               \
   286                                                                         \
   287             PIXEL_FROM_RGB(Pixel, fmt, r, g, b);                        \
   288             *((Uint32 *)(buf)) = Pixel;                                 \
   289         }                                                               \
   290         break;                                                          \
   291     }                                                                   \
   292 }
   293 
   294 /* FIXME: Should we rescale alpha into 0..255 here? */
   295 #define RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a)                         \
   296 {                                                                       \
   297     r = SDL_expand_byte[fmt->Rloss][((Pixel&fmt->Rmask)>>fmt->Rshift)]; \
   298     g = SDL_expand_byte[fmt->Gloss][((Pixel&fmt->Gmask)>>fmt->Gshift)]; \
   299     b = SDL_expand_byte[fmt->Bloss][((Pixel&fmt->Bmask)>>fmt->Bshift)]; \
   300     a = SDL_expand_byte[fmt->Aloss][((Pixel&fmt->Amask)>>fmt->Ashift)]; \
   301 }
   302 #define RGBA_FROM_8888(Pixel, fmt, r, g, b, a)                          \
   303 {                                                                       \
   304     r = (Pixel&fmt->Rmask)>>fmt->Rshift;                                \
   305     g = (Pixel&fmt->Gmask)>>fmt->Gshift;                                \
   306     b = (Pixel&fmt->Bmask)>>fmt->Bshift;                                \
   307     a = (Pixel&fmt->Amask)>>fmt->Ashift;                                \
   308 }
   309 #define RGBA_FROM_RGBA8888(Pixel, r, g, b, a)                           \
   310 {                                                                       \
   311     r = (Pixel>>24);                                                    \
   312     g = ((Pixel>>16)&0xFF);                                             \
   313     b = ((Pixel>>8)&0xFF);                                              \
   314     a = (Pixel&0xFF);                                                   \
   315 }
   316 #define RGBA_FROM_ARGB8888(Pixel, r, g, b, a)                           \
   317 {                                                                       \
   318     r = ((Pixel>>16)&0xFF);                                             \
   319     g = ((Pixel>>8)&0xFF);                                              \
   320     b = (Pixel&0xFF);                                                   \
   321     a = (Pixel>>24);                                                    \
   322 }
   323 #define RGBA_FROM_ABGR8888(Pixel, r, g, b, a)                           \
   324 {                                                                       \
   325     r = (Pixel&0xFF);                                                   \
   326     g = ((Pixel>>8)&0xFF);                                              \
   327     b = ((Pixel>>16)&0xFF);                                             \
   328     a = (Pixel>>24);                                                    \
   329 }
   330 #define RGBA_FROM_BGRA8888(Pixel, r, g, b, a)                           \
   331 {                                                                       \
   332     r = ((Pixel>>8)&0xFF);                                              \
   333     g = ((Pixel>>16)&0xFF);                                             \
   334     b = (Pixel>>24);                                                    \
   335     a = (Pixel&0xFF);                                                   \
   336 }
   337 #define DISEMBLE_RGBA(buf, bpp, fmt, Pixel, r, g, b, a)                 \
   338 do {                                                                    \
   339     switch (bpp) {                                                      \
   340         case 1:                                                         \
   341             Pixel = *((Uint8 *)(buf));                                  \
   342             RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);                    \
   343         break;                                                          \
   344                                                                         \
   345         case 2:                                                         \
   346             Pixel = *((Uint16 *)(buf));                                 \
   347             RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);                    \
   348         break;                                                          \
   349                                                                         \
   350         case 3: {                                                       \
   351             Pixel = 0;                                                  \
   352             if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
   353                 r = *((buf)+fmt->Rshift/8);                             \
   354                 g = *((buf)+fmt->Gshift/8);                             \
   355                 b = *((buf)+fmt->Bshift/8);                             \
   356             } else {                                                    \
   357                 r = *((buf)+2-fmt->Rshift/8);                           \
   358                 g = *((buf)+2-fmt->Gshift/8);                           \
   359                 b = *((buf)+2-fmt->Bshift/8);                           \
   360             }                                                           \
   361             a = 0xFF;                                                   \
   362         }                                                               \
   363         break;                                                          \
   364                                                                         \
   365         case 4:                                                         \
   366             Pixel = *((Uint32 *)(buf));                                 \
   367             RGBA_FROM_PIXEL(Pixel, fmt, r, g, b, a);                    \
   368         break;                                                          \
   369                                                                         \
   370         default:                                                        \
   371             /* stop gcc complaints */                                   \
   372             Pixel = 0;                                                  \
   373             r = g = b = a = 0;                                          \
   374         break;                                                          \
   375     }                                                                   \
   376 } while (0)
   377 
   378 /* FIXME: this isn't correct, especially for Alpha (maximum != 255) */
   379 #define PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a)                         \
   380 {                                                                       \
   381     Pixel = ((r>>fmt->Rloss)<<fmt->Rshift)|                             \
   382         ((g>>fmt->Gloss)<<fmt->Gshift)|                                 \
   383         ((b>>fmt->Bloss)<<fmt->Bshift)|                                 \
   384         ((a>>fmt->Aloss)<<fmt->Ashift);                                 \
   385 }
   386 #define ASSEMBLE_RGBA(buf, bpp, fmt, r, g, b, a)                        \
   387 {                                                                       \
   388     switch (bpp) {                                                      \
   389         case 1: {                                                       \
   390             Uint8 Pixel;                                                \
   391                                                                         \
   392             PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);                    \
   393             *((Uint8 *)(buf)) = Pixel;                                  \
   394         }                                                               \
   395         break;                                                          \
   396                                                                         \
   397         case 2: {                                                       \
   398             Uint16 Pixel;                                               \
   399                                                                         \
   400             PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);                    \
   401             *((Uint16 *)(buf)) = Pixel;                                 \
   402         }                                                               \
   403         break;                                                          \
   404                                                                         \
   405         case 3: {                                                       \
   406             if (SDL_BYTEORDER == SDL_LIL_ENDIAN) {                      \
   407                 *((buf)+fmt->Rshift/8) = r;                             \
   408                 *((buf)+fmt->Gshift/8) = g;                             \
   409                 *((buf)+fmt->Bshift/8) = b;                             \
   410             } else {                                                    \
   411                 *((buf)+2-fmt->Rshift/8) = r;                           \
   412                 *((buf)+2-fmt->Gshift/8) = g;                           \
   413                 *((buf)+2-fmt->Bshift/8) = b;                           \
   414             }                                                           \
   415         }                                                               \
   416         break;                                                          \
   417                                                                         \
   418         case 4: {                                                       \
   419             Uint32 Pixel;                                               \
   420                                                                         \
   421             PIXEL_FROM_RGBA(Pixel, fmt, r, g, b, a);                    \
   422             *((Uint32 *)(buf)) = Pixel;                                 \
   423         }                                                               \
   424         break;                                                          \
   425     }                                                                   \
   426 }
   427 
   428 /* Blend the RGB values of two Pixels based on a source alpha value */
   429 #define ALPHA_BLEND(sR, sG, sB, A, dR, dG, dB)                          \
   430 do {                                                                    \
   431     dR = ((((int)(sR-dR)*(int)A)/255)+dR);                              \
   432     dG = ((((int)(sG-dG)*(int)A)/255)+dG);                              \
   433     dB = ((((int)(sB-dB)*(int)A)/255)+dB);                              \
   434 } while(0)
   435 
   436 
   437 /* This is a very useful loop for optimizing blitters */
   438 #if defined(_MSC_VER) && (_MSC_VER == 1300)
   439 /* There's a bug in the Visual C++ 7 optimizer when compiling this code */
   440 #else
   441 #define USE_DUFFS_LOOP
   442 #endif
   443 #ifdef USE_DUFFS_LOOP
   444 
   445 /* 8-times unrolled loop */
   446 #define DUFFS_LOOP8(pixel_copy_increment, width)                        \
   447 { int n = (width+7)/8;                                                  \
   448     switch (width & 7) {                                                \
   449     case 0: do {    pixel_copy_increment;                               \
   450     case 7:     pixel_copy_increment;                                   \
   451     case 6:     pixel_copy_increment;                                   \
   452     case 5:     pixel_copy_increment;                                   \
   453     case 4:     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 /* 4-times unrolled loop */
   462 #define DUFFS_LOOP4(pixel_copy_increment, width)                        \
   463 { int n = (width+3)/4;                                                  \
   464     switch (width & 3) {                                                \
   465     case 0: do {    pixel_copy_increment;                               \
   466     case 3:     pixel_copy_increment;                                   \
   467     case 2:     pixel_copy_increment;                                   \
   468     case 1:     pixel_copy_increment;                                   \
   469         } while (--n > 0);                                              \
   470     }                                                                   \
   471 }
   472 
   473 /* Use the 8-times version of the loop by default */
   474 #define DUFFS_LOOP(pixel_copy_increment, width)                         \
   475     DUFFS_LOOP8(pixel_copy_increment, width)
   476 
   477 /* Special version of Duff's device for even more optimization */
   478 #define DUFFS_LOOP_124(pixel_copy_increment1,                           \
   479                        pixel_copy_increment2,                           \
   480                        pixel_copy_increment4, width)                    \
   481 { int n = width;                                                        \
   482     if (n & 1) {                                                        \
   483         pixel_copy_increment1; n -= 1;                                  \
   484     }                                                                   \
   485     if (n & 2) {                                                        \
   486         pixel_copy_increment2; n -= 2;                                  \
   487     }                                                                   \
   488     if (n) {                                                            \
   489         n = (n+7)/ 8;                                                   \
   490         switch (n & 4) {                                                \
   491         case 0: do {    pixel_copy_increment4;                          \
   492         case 4:     pixel_copy_increment4;                              \
   493             } while (--n > 0);                                          \
   494         }                                                               \
   495     }                                                                   \
   496 }
   497 
   498 #else
   499 
   500 /* Don't use Duff's device to unroll loops */
   501 #define DUFFS_LOOP(pixel_copy_increment, width)                         \
   502 { int n;                                                                \
   503     for ( n=width; n > 0; --n ) {                                       \
   504         pixel_copy_increment;                                           \
   505     }                                                                   \
   506 }
   507 #define DUFFS_LOOP8(pixel_copy_increment, width)                        \
   508     DUFFS_LOOP(pixel_copy_increment, width)
   509 #define DUFFS_LOOP4(pixel_copy_increment, width)                        \
   510     DUFFS_LOOP(pixel_copy_increment, width)
   511 #define DUFFS_LOOP_124(pixel_copy_increment1,                           \
   512                        pixel_copy_increment2,                           \
   513                        pixel_copy_increment4, width)                    \
   514     DUFFS_LOOP(pixel_copy_increment1, width)
   515 
   516 #endif /* USE_DUFFS_LOOP */
   517 
   518 /* Prevent Visual C++ 6.0 from printing out stupid warnings */
   519 #if defined(_MSC_VER) && (_MSC_VER >= 600)
   520 #pragma warning(disable: 4550)
   521 #endif
   522 
   523 #endif /* _SDL_blit_h */
   524 
   525 /* vi: set ts=4 sw=4 expandtab: */