diff options
author | DRC <dcommander@users.sourceforge.net> | 2009-04-03 11:27:17 +0000 |
---|---|---|
committer | DRC <dcommander@users.sourceforge.net> | 2009-04-03 11:27:17 +0000 |
commit | bec58d8137ebc0f5cfb85af2b9b19345d98e8fda (patch) | |
tree | d30121c23f7300e3d60facc22c3733f825788a50 | |
parent | 146d0b27e95622c58e4e3f6186248f610fb6c51a (diff) | |
download | tigervnc-bec58d8137ebc0f5cfb85af2b9b19345d98e8fda.tar.gz tigervnc-bec58d8137ebc0f5cfb85af2b9b19345d98e8fda.zip |
Add environment variables to force MMX/SSE2 code path selection
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@3743 3789f03b-4d11-0410-bbf8-ca57d06f2519
-rw-r--r-- | common/jpeg/jsimd.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/common/jpeg/jsimd.c b/common/jpeg/jsimd.c index 32489116..7f81ddad 100644 --- a/common/jpeg/jsimd.c +++ b/common/jpeg/jsimd.c @@ -40,11 +40,18 @@ static unsigned int simd_support = ~0; LOCAL(void) init_simd (void) { +#ifdef WITH_SIMD + char *env = NULL; +#endif if (simd_support != ~0) return; #ifdef WITH_SIMD simd_support = jpeg_simd_cpu_support(); + if((env=getenv("JSIMD_FORCEMMX"))!=NULL && !strcmp(env, "1")) + simd_support = JSIMD_MMX; + else if((env=getenv("JSIMD_FORCESSE2"))!=NULL && !strcmp(env, "1")) + simd_support = JSIMD_SSE2; #else simd_support = JSIMD_NONE; #endif |