init_simd(void) { #ifndef NO_GETENV char *env = NULL; #endif if (simd_support != ~0U) return; simd_support = jpeg_simd_cpu_support(); #ifndef NO_GETENV /* Force different settings through environment variables */ env = getenv("JSIMD_FORCESSE2"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support &= JSIMD_SSE2; env = getenv("JSIMD_FORCEAVX2"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support &= JSIMD_AVX2; env = getenv("JSIMD_FORCENONE"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support = 0; env = getenv("JSIMD_NOHUFFENC"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_huffman = 0; #endif }
init_simd (void) { char *env = NULL; if (simd_support != ~0U) return; simd_support = jpeg_simd_cpu_support(); /* Force different settings through environment variables */ env = getenv("JSIMD_FORCEMMX"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support &= JSIMD_MMX; env = getenv("JSIMD_FORCE3DNOW"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support &= JSIMD_3DNOW|JSIMD_MMX; env = getenv("JSIMD_FORCESSE"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support &= JSIMD_SSE|JSIMD_MMX; env = getenv("JSIMD_FORCESSE2"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support &= JSIMD_SSE2; env = getenv("JSIMD_FORCENONE"); if ((env != NULL) && (strcmp(env, "1") == 0)) simd_support = 0; }
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 }