comparison src/video/SDL_yuv_sw.c @ 2172:bef26cfc8f79

Fixed compiling YUV code
author Sam Lantinga <slouken@libsdl.org>
date Wed, 11 Jul 2007 14:50:21 +0000
parents 07f084fe97d0
children 2ff40f30af31
comparison
equal deleted inserted replaced
2171:4bd2dc41fc15 2172:bef26cfc8f79
979 case SDL_PIXELFORMAT_IYUV: 979 case SDL_PIXELFORMAT_IYUV:
980 if (SDL_BYTESPERPIXEL(target_format) == 2) { 980 if (SDL_BYTESPERPIXEL(target_format) == 2) {
981 #if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES 981 #if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
982 /* inline assembly functions */ 982 /* inline assembly functions */
983 if (SDL_HasMMX() && (Rmask == 0xF800) && 983 if (SDL_HasMMX() && (Rmask == 0xF800) &&
984 (Gmask == 0x07E0) && (Bmask == 0x001F) && (width & 15) == 0) { 984 (Gmask == 0x07E0) && (Bmask == 0x001F)
985 && (swdata->texture->w & 15) == 0) {
985 /*printf("Using MMX 16-bit 565 dither\n");*/ 986 /*printf("Using MMX 16-bit 565 dither\n");*/
986 swdata->Display1X = Color565DitherYV12MMX1X; 987 swdata->Display1X = Color565DitherYV12MMX1X;
987 } else { 988 } else {
988 /*printf("Using C 16-bit dither\n");*/ 989 /*printf("Using C 16-bit dither\n");*/
989 swdata->Display1X = Color16DitherYV12Mod1X; 990 swdata->Display1X = Color16DitherYV12Mod1X;
1000 if (SDL_BYTESPERPIXEL(target_format) == 4) { 1001 if (SDL_BYTESPERPIXEL(target_format) == 4) {
1001 #if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES 1002 #if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
1002 /* inline assembly functions */ 1003 /* inline assembly functions */
1003 if (SDL_HasMMX() && (Rmask == 0x00FF0000) && 1004 if (SDL_HasMMX() && (Rmask == 0x00FF0000) &&
1004 (Gmask == 0x0000FF00) && 1005 (Gmask == 0x0000FF00) &&
1005 (Bmask == 0x000000FF) && (width & 15) == 0) { 1006 (Bmask == 0x000000FF) && (swdata->texture->w & 15) == 0) {
1006 /*printf("Using MMX 32-bit dither\n");*/ 1007 /*printf("Using MMX 32-bit dither\n");*/
1007 swdata->Display1X = ColorRGBDitherYV12MMX1X; 1008 swdata->Display1X = ColorRGBDitherYV12MMX1X;
1008 } else { 1009 } else {
1009 /*printf("Using C 32-bit dither\n");*/ 1010 /*printf("Using C 32-bit dither\n");*/
1010 swdata->Display1X = Color32DitherYV12Mod1X; 1011 swdata->Display1X = Color32DitherYV12Mod1X;