Merged r3261:3262 from branches/SDL-1.2: MMX/YUV with __OPTIMIZE__.
"Mac OS X/x86 won't build the MMX/YUV inline assembly without optimizations enabled (not enough registers), so for now, we only build it if we see the __OPTIMIZE__ #define, which GCC provides when you build at -O1 or higher." --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%402528
This commit is contained in:
parent
280618d6f5
commit
01b58163f3
2 changed files with 4 additions and 4 deletions
|
@ -21,7 +21,7 @@
|
||||||
*/
|
*/
|
||||||
#include "SDL_config.h"
|
#include "SDL_config.h"
|
||||||
|
|
||||||
#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
|
#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES
|
||||||
|
|
||||||
#include "SDL_stdinc.h"
|
#include "SDL_stdinc.h"
|
||||||
|
|
||||||
|
|
|
@ -117,7 +117,7 @@ struct SDL_SW_YUVTexture
|
||||||
|
|
||||||
/* The colorspace conversion functions */
|
/* The colorspace conversion functions */
|
||||||
|
|
||||||
#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
|
#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES
|
||||||
extern void Color565DitherYV12MMX1X(int *colortab, Uint32 * rgb_2_pix,
|
extern void Color565DitherYV12MMX1X(int *colortab, Uint32 * rgb_2_pix,
|
||||||
unsigned char *lum, unsigned char *cr,
|
unsigned char *lum, unsigned char *cr,
|
||||||
unsigned char *cb, unsigned char *out,
|
unsigned char *cb, unsigned char *out,
|
||||||
|
@ -978,7 +978,7 @@ SDL_SW_SetupYUVDisplay(SDL_SW_YUVTexture * swdata, Uint32 target_format)
|
||||||
case SDL_PIXELFORMAT_YV12:
|
case SDL_PIXELFORMAT_YV12:
|
||||||
case SDL_PIXELFORMAT_IYUV:
|
case SDL_PIXELFORMAT_IYUV:
|
||||||
if (SDL_BYTESPERPIXEL(target_format) == 2) {
|
if (SDL_BYTESPERPIXEL(target_format) == 2) {
|
||||||
#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
|
#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES
|
||||||
/* inline assembly functions */
|
/* inline assembly functions */
|
||||||
if (SDL_HasMMX() && (Rmask == 0xF800) &&
|
if (SDL_HasMMX() && (Rmask == 0xF800) &&
|
||||||
(Gmask == 0x07E0) && (Bmask == 0x001F)
|
(Gmask == 0x07E0) && (Bmask == 0x001F)
|
||||||
|
@ -999,7 +999,7 @@ SDL_SW_SetupYUVDisplay(SDL_SW_YUVTexture * swdata, Uint32 target_format)
|
||||||
swdata->Display2X = Color24DitherYV12Mod2X;
|
swdata->Display2X = Color24DitherYV12Mod2X;
|
||||||
}
|
}
|
||||||
if (SDL_BYTESPERPIXEL(target_format) == 4) {
|
if (SDL_BYTESPERPIXEL(target_format) == 4) {
|
||||||
#if (__GNUC__ > 2) && defined(__i386__) && SDL_ASSEMBLY_ROUTINES
|
#if (__GNUC__ > 2) && defined(__i386__) && __OPTIMIZE__ && SDL_ASSEMBLY_ROUTINES
|
||||||
/* inline assembly functions */
|
/* inline assembly functions */
|
||||||
if (SDL_HasMMX() && (Rmask == 0x00FF0000) &&
|
if (SDL_HasMMX() && (Rmask == 0x00FF0000) &&
|
||||||
(Gmask == 0x0000FF00) &&
|
(Gmask == 0x0000FF00) &&
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue