richgel999 / jpeg-compressor

C++ JPEG compression/fuzzed low-RAM JPEG decompression codec with Public Domain or Apache 2.0 license
216 stars 56 forks source link

Fix detection of SSE2 with Visual Studio #13

Closed akien-mga closed 4 years ago

akien-mga commented 4 years ago

The previous code assumed that SSE2 is available when building with Visual Studio, but that's not accurate on ARM with UWP.

SSE2 could also be enabled on x86 if _M_IX86_FP == 2, but it requires checking first that it's not actually set to 2 for AVX, AVX2 or AVX512 (see https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019), so I left it out for this quick fix.

richgel999 commented 4 years ago

Got it - Thanks a lot!