src/video/SDL_yuv_sw.c
changeset 1413 40edc79b0926
parent 1402 d910939febfa
child 1428 5f52867ba65c
equal deleted inserted replaced
1412:a8181c4040b8 1413:40edc79b0926
   119 };
   119 };
   120 
   120 
   121 
   121 
   122 /* The colorspace conversion functions */
   122 /* The colorspace conversion functions */
   123 
   123 
       
   124 #if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
   124 extern void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix,
   125 extern void Color565DitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix,
   125                                      unsigned char *lum, unsigned char *cr,
   126                                      unsigned char *lum, unsigned char *cr,
   126                                      unsigned char *cb, unsigned char *out,
   127                                      unsigned char *cb, unsigned char *out,
   127                                      int rows, int cols, int mod );
   128                                      int rows, int cols, int mod );
   128 extern void ColorRGBDitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix,
   129 extern void ColorRGBDitherYV12MMX1X( int *colortab, Uint32 *rgb_2_pix,
   129                                      unsigned char *lum, unsigned char *cr,
   130                                      unsigned char *lum, unsigned char *cr,
   130                                      unsigned char *cb, unsigned char *out,
   131                                      unsigned char *cb, unsigned char *out,
   131                                      int rows, int cols, int mod );
   132                                      int rows, int cols, int mod );
       
   133 #endif 
   132 
   134 
   133 static void Color16DitherYV12Mod1X( int *colortab, Uint32 *rgb_2_pix,
   135 static void Color16DitherYV12Mod1X( int *colortab, Uint32 *rgb_2_pix,
   134                                     unsigned char *lum, unsigned char *cr,
   136                                     unsigned char *lum, unsigned char *cr,
   135                                     unsigned char *cb, unsigned char *out,
   137                                     unsigned char *cb, unsigned char *out,
   136                                     int rows, int cols, int mod )
   138                                     int rows, int cols, int mod )
  1057 	/* You have chosen wisely... */
  1059 	/* You have chosen wisely... */
  1058 	switch (format) {
  1060 	switch (format) {
  1059 	    case SDL_YV12_OVERLAY:
  1061 	    case SDL_YV12_OVERLAY:
  1060 	    case SDL_IYUV_OVERLAY:
  1062 	    case SDL_IYUV_OVERLAY:
  1061 		if ( display->format->BytesPerPixel == 2 ) {
  1063 		if ( display->format->BytesPerPixel == 2 ) {
  1062 #if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
  1064 #if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
  1063 			/* inline assembly functions */
  1065 			/* inline assembly functions */
  1064 			if ( SDL_HasMMX() && (Rmask == 0xF800) &&
  1066 			if ( SDL_HasMMX() && (Rmask == 0xF800) &&
  1065 			                     (Gmask == 0x07E0) &&
  1067 			                     (Gmask == 0x07E0) &&
  1066 				             (Bmask == 0x001F) &&
  1068 				             (Bmask == 0x001F) &&
  1067 			                     (width & 15) == 0) {
  1069 			                     (width & 15) == 0) {
  1079 		if ( display->format->BytesPerPixel == 3 ) {
  1081 		if ( display->format->BytesPerPixel == 3 ) {
  1080 			swdata->Display1X = Color24DitherYV12Mod1X;
  1082 			swdata->Display1X = Color24DitherYV12Mod1X;
  1081 			swdata->Display2X = Color24DitherYV12Mod2X;
  1083 			swdata->Display2X = Color24DitherYV12Mod2X;
  1082 		}
  1084 		}
  1083 		if ( display->format->BytesPerPixel == 4 ) {
  1085 		if ( display->format->BytesPerPixel == 4 ) {
  1084 #if defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
  1086 #if 0 /*defined(__GNUC__) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES*/
  1085 			/* inline assembly functions */
  1087 			/* inline assembly functions */
  1086 			if ( SDL_HasMMX() && (Rmask == 0x00FF0000) &&
  1088 			if ( SDL_HasMMX() && (Rmask == 0x00FF0000) &&
  1087 			                     (Gmask == 0x0000FF00) &&
  1089 			                     (Gmask == 0x0000FF00) &&
  1088 				             (Bmask == 0x000000FF) && 
  1090 				             (Bmask == 0x000000FF) && 
  1089 			                     (width & 15) == 0) {
  1091 			                     (width & 15) == 0) {