Skip to content

Commit

Permalink
Merge pull request #1607 from s-trinh/fix_cv_mul_api_version_esoteric…
Browse files Browse the repository at this point in the history
…_platform

Fix build error with cv::v_mul when OpenCV >= 4.9 && < 4.11 on exotic platforms
  • Loading branch information
fspindle authored Mar 10, 2025
2 parents c14cb6a + 719d323 commit edba767
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions modules/tracker/mbt/src/depth/vpMbtFaceDepthDense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,21 @@
#endif

#if (VISP_HAVE_OPENCV_VERSION >= 0x040101 || (VISP_HAVE_OPENCV_VERSION < 0x040000 && VISP_HAVE_OPENCV_VERSION >= 0x030407)) && USE_SIMD_CODE

// See: https://github.com/lagadic/visp/issues/1606
// 0x040B00 --> (4<<16 | 11<<8 | 0)
// Only starting from OpenCV 4.11 cv::v_mul is available for all the platforms
// So if OpenCV >= 4.11 || OpenCV < 4.9 --> use OpenCV HAL API
// Otherwise, only if between >= 4.9 && < 4.11 and on regular platform (X86 && ARM64) --> use OpenCV HAL API
#if (VISP_HAVE_OPENCV_VERSION >= 0x040B00) || (VISP_HAVE_OPENCV_VERSION < 0x040900) || \
( (VISP_HAVE_OPENCV_VERSION >= 0x040900) && (VISP_HAVE_OPENCV_VERSION < 0x040B00) && (USE_SSE || USE_NEON) )
#define USE_OPENCV_HAL 1
#include <opencv2/core/simd_intrinsics.hpp>
#include <opencv2/core/hal/intrin.hpp>
#endif

#endif

#if !USE_OPENCV_HAL && (USE_SSE || USE_NEON)
#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
#include <cstdint>
Expand Down

0 comments on commit edba767

Please sign in to comment.