Processor optimization flags in OpenCV

2.6k Views Asked by At

I'm building an application that uses OpenCV that will run on a variety of Windows computers (using Win7, Win8, Win10).

Now I have discovered that my application crashes randomly at some computers. After a lot of googling I have realized that enabling SSE3 in OpenCV can cause Illegal Instruction crashes on processors that doesn't support SSE3.

http://answers.opencv.org/question/18001/illegal-instruction-when-running-any-compiled-opencv-demo-binary-sse3-flag/

https://bugs.launchpad.net/linuxmint/+bug/1258259

So this is my question: Does anyone of you know which processor flags are "safe". I understand what they do, but I don't know how common it is for a processor to support, for instance, SSE42.

In other words: Which of these flags do you think I should disable when I compile OpenCV?

OCV_OPTION:

ENABLE_SSE
ENABLE_SSE2
ENABLE_SSE3
ENABLE_SSSE3
ENABLE_SSE41
ENABLE_SSE42
ENABLE_POPCNT
ENABLE_AVX
ENABLE_AVX2
ENABLE_FMA3
0

There are 0 best solutions below