-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Description
System Information
OpenCV version: OpenCV 4.10.0-dev (git commit d6b674a)
OS: Mac OS 14.1.1
Toolchain: Emscripten 3.1.38 (also tested with latest 3.1.72)
Detailed description
OpenCV emscripten build fails if simd options are enabled.
Building with: mkdir build && cd build && python3 ../platforms/js/build_js.py --emscripten_dir "$EMSDK/upstream/emscripten" --threads --simd --build_wasm .
fails with error:
modules/imgproc/src/color_yuv.simd.hpp:477:23: error: no matching function for call to 'v_shr'
y11 = v_shr(v_reinterpret_as_u32(v_add(v_dotprod(bg11, bg2y), v_dotprod(rd11, r12y))), shift);
The required function is present in the file modules/core/include/opencv2/core/hal/intrin_wasm.hpp but has a misspelling in the title (uppercase V). Same error also present in file modules/core/include/opencv2/core/hal/intrin_lasx.hpp. Fixing this results in a correct build.
Error is present in branch 4.x and branch 5.x.
Steps to reproduce
mkdir build && cd build && python3 ../platforms/js/build_js.py --emscripten_dir "$EMSDK/upstream/emscripten" --threads --simd --build_wasm .
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)