diff --git a/.github/workflows/snapshot-macos-opencv.yml b/.github/workflows/snapshot-macos-opencv.yml deleted file mode 100644 index e589382..0000000 --- a/.github/workflows/snapshot-macos-opencv.yml +++ /dev/null @@ -1,86 +0,0 @@ -# TEMP spike: capture a macOS-arm64 FULL-profile compat.opencv config snapshot on -# a real macos-15 runner (core/imgproc/imgcodecs/highgui/videoio + WITH_FFMPEG — -# module parity with linux), emit the descriptor via gen_descriptor.py, upload it. -# Builds a static ffmpeg 8.1.2 prefix first (cmake's videoio-FFmpeg discovery; -# consumers get the libs from the compat.ffmpeg dependency instead). -name: snapshot-macos-opencv -on: { workflow_dispatch: {}, push: { branches: [feat/opencv-3platform, feat/opencv-full-func] } } -jobs: - snapshot: - runs-on: macos-15 - timeout-minutes: 120 - steps: - - uses: actions/checkout@v4 - - run: brew install cmake ninja nasm - - run: pip3 install --break-system-packages numpy || pip3 install numpy - - name: fetch sources (ffmpeg 8.1.2 + opencv 5.0.0) - run: | - set -eux - curl -L -fsS -o ffmpeg.tar.gz https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.gz - echo "32faba5ef67340d54724941eae1425580791195312a4fd13bf6f820a2818bf22 ffmpeg.tar.gz" | shasum -a 256 -c - - tar -xzf ffmpeg.tar.gz - curl -L -fsS -o opencv.tar.gz https://github.com/opencv/opencv/archive/refs/tags/5.0.0.tar.gz - echo "b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095 opencv.tar.gz" | shasum -a 256 -c - - tar -xzf opencv.tar.gz - echo "OPENCV_SRC=$PWD/opencv-5.0.0" >> "$GITHUB_ENV" - # Headless highgui on macOS to MATCH linux (same API surface, no GUI backend): - # mcpp cannot compile window_cocoa.mm (.mm/Objective-C++ unsupported), and - # OpenCV 5 has no WITH_COCOA switch — HAVE_COCOA is set unconditionally on - # APPLE+clang in cmake/OpenCVFindLibsGUI.cmake. Neutralize that one line so the - # highgui elseif-chain falls through to the headless path (like linux w/o GTK/Qt). - sed -i.bak 's/set(HAVE_COCOA YES)/message(STATUS "mcpp: HAVE_COCOA disabled -> headless highgui (matches linux)")/' \ - "$PWD/opencv-5.0.0/cmake/OpenCVFindLibsGUI.cmake" - grep -n 'HAVE_COCOA\|mcpp: HAVE_COCOA' "$PWD/opencv-5.0.0/cmake/OpenCVFindLibsGUI.cmake" || true - - name: build static ffmpeg prefix (videoio backend discovery) - run: | - set -eux - mkdir ffbuild && cd ffbuild - ../ffmpeg-8.1.2/configure --cc=clang --prefix="$PWD/../ffprefix" \ - --enable-shared --disable-static --disable-programs --disable-doc \ - --disable-autodetect --enable-pic - make -j"$(sysctl -n hw.ncpu)" && make install - echo "FFMPEG_PREFIX=$PWD/../ffprefix" >> "$GITHUB_ENV" - - name: cmake configure opencv (full profile, aarch64, ffmpeg videoio) - run: | - set -eux - PKG_CONFIG_LIBDIR="$FFMPEG_PREFIX/lib/pkgconfig" \ - cmake -G Ninja -S "$OPENCV_SRC" -B bld -DCMAKE_BUILD_TYPE=Release \ - -DBUILD_LIST=core,imgproc,imgcodecs,highgui,videoio,dnn \ - -DBUILD_SHARED_LIBS=OFF -DBUILD_ZLIB=ON -DBUILD_PNG=ON -DBUILD_JPEG=ON \ - -DWITH_TIFF=OFF -DWITH_WEBP=OFF -DWITH_OPENJPEG=OFF -DWITH_JASPER=OFF \ - -DWITH_OPENEXR=OFF -DWITH_AVIF=OFF -DWITH_JPEGXL=OFF -DWITH_IMGCODEC_GIF=OFF \ - -DWITH_OPENCL=OFF -DWITH_IPP=OFF -DWITH_LAPACK=OFF -DWITH_EIGEN=OFF -DWITH_ITT=OFF \ - -DWITH_QT=OFF -DWITH_OPENGL=OFF -DWITH_FFMPEG=ON -DWITH_GSTREAMER=OFF \ - -DWITH_AVFOUNDATION=OFF -DWITH_V4L=OFF -DWITH_OBSENSOR=OFF \ - -DWITH_PROTOBUF=ON -DBUILD_PROTOBUF=ON -DWITH_CAROTENE=OFF -DWITH_FLATBUFFERS=OFF \ - -DWITH_KLEIDICV=OFF -DWITH_NDSRVP=OFF -DWITH_HAL_RVV=OFF \ - -DWITH_UNIFONT=OFF -DWITH_ADE=OFF \ - -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF \ - -DBUILD_opencv_apps=OFF -DBUILD_JAVA=OFF -DBUILD_opencv_python3=OFF - - name: reference build (materialize generators) + dump commands - run: | - ninja -C bld -k 0 > bld/ninja-build.log 2>&1 || true - ninja -C bld -t commands > bld/ninja-cmds.log - grep -q cap_ffmpeg bld/ninja-cmds.log || { echo 'FATAL: cap_ffmpeg not compiled — ffmpeg videoio backend not active'; exit 1; } - echo "cap_ffmpeg TUs: $(grep -c cap_ffmpeg bld/ninja-cmds.log)" - - name: gen descriptor - run: | - set -eux - FFMPEG_PREFIX="$FFMPEG_PREFIX" python3 tools/compat-opencv/gen_descriptor.py \ - "$OPENCV_SRC" bld 5.0.0 \ - b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095 \ - compat.opencv.macgen.lua - sed -e 's/^ linux = {/ macosx = {/' \ - -e 's/name = "compat.opencv"/name = "compat.opencvmac"/' \ - compat.opencv.macgen.lua > compat.opencvmac.lua - grep -oE '\.(neon[a-z0-9_]*|fp16)\.cpp' bld/ninja-cmds.log | sort | uniq -c || true - - uses: actions/upload-artifact@v4 - if: always() - with: - name: opencv-macos-full-snapshot - path: | - compat.opencvmac.lua - compat.opencv.macgen.lua - bld/cvconfig.h - bld/ninja-cmds.log - bld/ninja-build.log diff --git a/.github/workflows/snapshot-windows-opencv.yml b/.github/workflows/snapshot-windows-opencv.yml deleted file mode 100644 index a421ebd..0000000 --- a/.github/workflows/snapshot-windows-opencv.yml +++ /dev/null @@ -1,192 +0,0 @@ -# TEMP spike: capture a windows-x86_64 compat.opencv config snapshot on a real -# windows-latest runner using clang-cl (mcpp's windows toolchain is clang targeting -# the MSVC ABI; OpenCV emits GCC-style -mavx2 SIMD flags under CV_CLANG even with -# clang-cl -> mcpp-compatible). CORE profile first (core/imgproc/imgcodecs/highgui, -# headless via WITH_WIN32UI=OFF, WITH_FFMPEG=OFF) to isolate the make-or-break -# question: does mcpp clang-MSVC compile OpenCV's C++ from a clang-cl snapshot. -# videoio+FFmpeg is a follow-up. Uploads the descriptor AND raw artifacts. -name: snapshot-windows-opencv -on: { workflow_dispatch: {}, push: { branches: [feat/opencv-windows-videoio, feat/opencv-full-func, feat/opencv-windows-dnn] } } -jobs: - snapshot: - runs-on: windows-latest - timeout-minutes: 90 - steps: - - uses: actions/checkout@v4 - - uses: ilammy/msvc-dev-cmd@v1 # MSVC SDK headers/libs for clang-cl + cl.exe - - uses: msys2/setup-msys2@v2 # make + pkg-config for the ffmpeg prefix build - with: { msystem: UCRT64, install: 'make diffutils tar pkgconf', path-type: inherit } - - name: tools (llvm/clang-cl, nasm, ninja) - shell: pwsh - run: | - choco install -y --no-progress nasm ninja llvm pkgconfiglite | Out-Null - echo "C:\Program Files\NASM" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 - echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 - # pkgconfiglite installs pkg-config.exe to the choco bin — put it on the - # NATIVE windows PATH so cmake's find_package(PkgConfig) sets PKG_CONFIG_FOUND - echo "C:\ProgramData\chocolatey\bin" | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 - Get-Command pkg-config | Select-Object -ExpandProperty Source - - name: build shared FFmpeg 8.1.2 prefix (MSVC) for cmake videoio discovery - shell: msys2 {0} - run: | - set -eux - curl -L -fsS -o ffmpeg.tar.gz https://ffmpeg.org/releases/ffmpeg-8.1.2.tar.gz - echo "32faba5ef67340d54724941eae1425580791195312a4fd13bf6f820a2818bf22 ffmpeg.tar.gz" | sha256sum -c - - tar -xzf ffmpeg.tar.gz - mkdir ffbuild && cd ffbuild - # windows path prefix so the generated .pc / clang-cl consumption use C:/… not /c/… - PFX="C:/ffprefix" - ../ffmpeg-8.1.2/configure --toolchain=msvc --prefix="$PFX" \ - --enable-shared --disable-static --disable-programs --disable-doc \ - --disable-autodetect --disable-network >cfg.log 2>&1 \ - && echo "FFMPEG CONFIGURE OK" || { echo FAIL; tail -30 cfg.log; exit 1; } - make -j"$(nproc)" >/dev/null 2>&1 && make install - echo "FFPREFIX=$PFX" >> "$GITHUB_ENV" - ls "$PFX/lib/pkgconfig" || true - - name: probe toolchain - shell: bash - run: | - set -eux - which clang-cl cmake ninja nasm - clang-cl --version - - name: fetch + extract OpenCV 5.0.0 - shell: bash - run: | - set -eux - curl -L -fsS -o opencv.tar.gz https://github.com/opencv/opencv/archive/refs/tags/5.0.0.tar.gz - echo "b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095 opencv.tar.gz" | sha256sum -c - - tar -xzf opencv.tar.gz - echo "OPENCV_SRC=$PWD/opencv-5.0.0" >> "$GITHUB_ENV" - # DNN on windows: skip the vendored mlas. Its x86 kernels are GAS/ELF `.S` - # (`.type …,@function`) which clang-cl cannot assemble to COFF. This is exactly - # upstream's OWN fallback — 3rdparty/mlas/CMakeLists.txt bails when no usable - # ASM is present, and DNN uses its built-in fast_gemm (`.cpp` AVX/AVX2 kernels). - # Force that path by returning early from the mlas subdir on WIN32. - MLAS="$PWD/opencv-5.0.0/3rdparty/mlas/CMakeLists.txt" - printf 'if(WIN32)\n message(STATUS "mcpp: skip mlas on windows (GAS .S not COFF-assemblable); DNN uses built-in fast_gemm")\n return()\nendif()\n' | cat - "$MLAS" > "$MLAS.tmp" && mv "$MLAS.tmp" "$MLAS" - head -6 "$MLAS" - # Instrument detect_ffmpeg.cmake: at the very end (after ocv_add_external_target), - # confirm the FindFFMPEG shim drove HAVE_FFMPEG=TRUE and the ocv.3rdparty.ffmpeg - # INTERFACE target got created — that target (not HAVE_FFMPEG itself) is what - # videoio/CMakeLists.txt line 161 gates cap_ffmpeg.cpp on. - DF="$PWD/opencv-5.0.0/modules/videoio/cmake/detect_ffmpeg.cmake" - { - echo '' - echo 'message(STATUS "mcpp-dbg: HAVE_FFMPEG=[${HAVE_FFMPEG}] FFMPEG_FOUND=[${FFMPEG_FOUND}]")' - echo 'message(STATUS "mcpp-dbg: versions avcodec=[${FFMPEG_libavcodec_VERSION}] avformat=[${FFMPEG_libavformat_VERSION}] avutil=[${FFMPEG_libavutil_VERSION}] swscale=[${FFMPEG_libswscale_VERSION}]")' - echo 'message(STATUS "mcpp-dbg: FFMPEG_INCLUDE_DIRS=[${FFMPEG_INCLUDE_DIRS}] FFMPEG_LIBRARIES=[${FFMPEG_LIBRARIES}]")' - echo 'if(TARGET ocv.3rdparty.ffmpeg)' - echo ' message(STATUS "mcpp-dbg: TARGET ocv.3rdparty.ffmpeg CREATED -> cap_ffmpeg.cpp will compile")' - echo 'else()' - echo ' message(STATUS "mcpp-dbg: TARGET ocv.3rdparty.ffmpeg MISSING -> cap_ffmpeg.cpp will NOT compile")' - echo 'endif()' - } >> "$DF" - - name: cmake configure (clang-cl, +videoio via FindFFMPEG shim, headless) - shell: bash - run: | - set -eux - # OpenCV's pkg-config FFmpeg path is UNIX/MINGW-gated (never runs under clang-cl / - # windows-MSVC), and forcing HAVE_FFMPEG at the END of detect_ffmpeg is too late: - # ocv_add_external_target(ffmpeg) — which creates the ocv.3rdparty.ffmpeg target - # that videoio gates cap_ffmpeg.cpp on — has already run/skipped. Use OpenCV's - # sanctioned override OPENCV_FFMPEG_USE_FIND_PACKAGE=FFMPEG + a FindFFMPEG.cmake - # shim: find_package(FFMPEG) runs FIRST in detect_ffmpeg (line 9) → shim sets - # FFMPEG_FOUND → HAVE_FFMPEG=TRUE → version gate passes (real versions) → build - # check skipped → ocv_add_external_target creates the target → cap_ffmpeg compiles. - export PKG_CONFIG_PATH="C:/ffprefix/lib/pkgconfig" - VC=$(pkg-config --modversion libavcodec) - VF=$(pkg-config --modversion libavformat) - VU=$(pkg-config --modversion libavutil) - VS=$(pkg-config --modversion libswscale) - # best-effort import-lib discovery (MSVC shared build names them avcodec.lib etc., - # in lib/ or bin/); non-fatal — the target is created from the includes alone and - # the build check is skipped, so empty LIBS still compiles cap_ffmpeg.cpp. mcpp - # links compat.ffmpeg (windows) at consume time regardless. - echo "=== C:/ffprefix tree (lib + bin) ==="; ls -la C:/ffprefix/lib/ C:/ffprefix/bin/ 2>/dev/null | head -40 || true - LIBS=$( { ls C:/ffprefix/lib/*.lib C:/ffprefix/bin/*.lib 2>/dev/null || true; } | sed 's#\\#/#g' | tr '\n' ';') - echo "ffmpeg versions: avcodec=$VC avformat=$VF avutil=$VU swscale=$VS" - echo "ffmpeg import libs: ${LIBS:-}" - mkdir -p cmakemods - cat > cmakemods/FindFFMPEG.cmake <&1 | tee cfg_out.txt | tail -60 - echo "=== mcpp-dbg (detect_ffmpeg: HAVE_FFMPEG + ocv.3rdparty.ffmpeg target) ===" - grep -a "mcpp-dbg\|mcpp FindFFMPEG" cfg_out.txt || echo "(no mcpp-dbg — detect_ffmpeg didn't reach the tail)" - echo "=== FFmpeg cmake cache vars ===" - grep -iE "FFMPEG" bld/CMakeCache.txt | head -20 || true - - name: reference build (materialize generators) + dump commands - shell: bash - run: | - ninja -C bld -k 0 > bld/ninja-build.log 2>&1 || true - ninja -C bld -t commands > bld/ninja-cmds.log - echo "=== videoio FFmpeg backend active? (cap_ffmpeg must compile) ===" - grep -q cap_ffmpeg bld/ninja-cmds.log && echo "cap_ffmpeg: YES ($(grep -c cap_ffmpeg bld/ninja-cmds.log) TUs)" || echo "FATAL: cap_ffmpeg not compiled — FFmpeg videoio backend inactive" - echo "=== windows cvconfig facts ===" - grep -E "HAVE_WIN32UI|WIN32|HAVE_OPENCV_HIGHGUI|BUILTIN_BACKEND" bld/cvconfig.h bld/*highgui* 2>/dev/null | head || true - echo "=== SIMD dispatch TUs present? ===" - grep -oE '\.(avx[0-9_a-z]*|sse4_[12]|fp16|neon[a-z0-9_]*)\.cpp' bld/ninja-cmds.log | sort | uniq -c || true - echo "=== SIMD flag style (-mavx expected, NOT /arch) ===" - grep -oE '(\-mavx[0-9]*|/arch:[A-Z0-9]+)' bld/ninja-cmds.log | sort | uniq -c || true - - name: gen descriptor (relabel linux->windows; raw artifacts uploaded regardless) - shell: bash - run: | - set -eux - # FFMPEG_PREFIX: gen_descriptor excludes these include dirs (served by the - # compat.ffmpeg dependency) and emits the compat.ffmpeg dep line. - FFMPEG_PREFIX="C:/ffprefix" python tools/compat-opencv/gen_descriptor.py \ - "$OPENCV_SRC" bld 5.0.0 \ - b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095 \ - compat.opencv.wingen.lua || echo "gen_descriptor needs windows tweaks — raw artifacts uploaded for local iteration" - if [ -f compat.opencv.wingen.lua ]; then - # relabel linux->windows (xpm key + per-OS block) and drop linux ldflags - # (-lpthread/-ldl don't exist on windows; the build spike surfaces any - # real LNK deps, added back per-OS afterwards). - sed -e 's/^ linux = {/ windows = {/' \ - -e 's/name = "compat.opencv"/name = "compat.opencvwin"/' \ - -e 's/ldflags = { "-lpthread", "-ldl" }/ldflags = { "-lole32" }/' \ - compat.opencv.wingen.lua > compat.opencvwin.lua || true - echo "=== descriptor head ==="; head -50 compat.opencvwin.lua || true - fi - - uses: actions/upload-artifact@v4 - if: always() - with: - name: opencv-windows-snapshot - path: | - compat.opencvwin.lua - compat.opencv.wingen.lua - bld/cvconfig.h - bld/cv_cpu_config.h - bld/ninja-cmds.log - bld/ninja-build.log diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 61ae161..3a05167 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -11,6 +11,18 @@ on: workflow_dispatch: env: + # 0.0.102: windows command-line ceiling (mcpp#261 — the clang scan rule got + # its P1689 JSON through shell redirection, which forced a `cmd /c` wrapper + # and with it cmd.exe's 8191-char limit; clang-scan-deps -o removes both, and + # $local_includes-carrying rules now fall back to response files). The pin + # matters here because a package consumed FROM the registry sits under a + # ~124-char xpkgs path instead of its own ~23-char checkout, which is what + # pushed the vendored-opencv scan command over the line. Also: purview-include + # depfile tracking extended to Clang (#257 — stale BMI reuse), OS-conditional + # `[build].flags` (#258), and per-OS splices keyed on the resolved target + # rather than the host (#254). + # 0.0.101: per-feature per-glob flags + per-OS features (mcpp#253) — what + # lets opencv select its dnn gemm backend per platform. # 0.0.99: feature dep/feat forwarding (mcpp#243 — a feature can open a # feature OF a dependency, e.g. opencv `dnn` forwarding compat.opencv/dnn); # vendored xlings 0.4.67 for the >=2 index_repo install fix (mcpp#238 / @@ -35,7 +47,7 @@ env: # 0.0.94 fixed feature-gated `sources` under `mcpp test` (mcpp#218); 0.0.91 # added standard = "c++fly" to the resolver grammar, so c++fly descriptors # get the lint WARN below, not a hard grammar-parse rejection. - MCPP_VERSION: "0.0.101" + MCPP_VERSION: "0.0.102" jobs: lint: @@ -184,21 +196,21 @@ jobs: ext: tar.gz mcpp: bin/mcpp xlings: registry/bin/xlings - mcpp_version: "0.0.101" # keep in sync with env.MCPP_VERSION + mcpp_version: "0.0.102" # keep in sync with env.MCPP_VERSION - platform: macos os: macos-15 suffix: macosx-arm64 ext: tar.gz mcpp: bin/mcpp xlings: registry/bin/xlings - mcpp_version: "0.0.101" # keep in sync with env.MCPP_VERSION + mcpp_version: "0.0.102" # keep in sync with env.MCPP_VERSION - platform: windows os: windows-latest suffix: windows-x86_64 ext: zip mcpp: bin/mcpp.exe xlings: registry/bin/xlings.exe - mcpp_version: "0.0.101" # keep in sync with env.MCPP_VERSION + mcpp_version: "0.0.102" # keep in sync with env.MCPP_VERSION env: MCPP_EFFECTIVE: ${{ matrix.mcpp_version }} steps: diff --git a/README.md b/README.md index 074b30c..3490596 100644 --- a/README.md +++ b/README.md @@ -32,13 +32,11 @@ mcpp self config --mirror CN # 切换至国内镜像,默认使用 GLOBAL 上 | 形态 | 示例 | |------|------| -| 原生模块库(Form A) | [`mcpplibs.xpkg`](pkgs/x/xpkg.lua) · [`mcpplibs.tinyhttps`](pkgs/t/tinyhttps.lua) · [`tensorvia-cpu`](pkgs/t/tensorvia-cpu.lua) · [`ffmpeg`](pkgs/f/ffmpeg.lua)(模块层,源码经 `compat.ffmpeg` 直编) · [`opencv`](pkgs/o/opencv.lua)(模块层,源码经 `compat.opencv` 直编) | +| 原生模块库(Form A) | [`mcpplibs.xpkg`](pkgs/x/xpkg.lua) · [`mcpplibs.tinyhttps`](pkgs/t/tinyhttps.lua) · [`tensorvia-cpu`](pkgs/t/tensorvia-cpu.lua) · [`ffmpeg`](pkgs/f/ffmpeg.lua)(模块层,源码经 `compat.ffmpeg` 直编) · [`opencv`](pkgs/o/opencv.lua)(单仓库:模块层与 OpenCV 5 全源码构建同在包内,索引侧只留本描述符) | | C 源码 compat(含 `features`) | [`compat.cjson`](pkgs/c/compat.cjson.lua) · [`compat.zlib`](pkgs/c/compat.zlib.lua) | | header-only(含 `features`) | [`compat.eigen`](pkgs/c/compat.eigen.lua) | -| 数据资产包(feature 依赖专用) | [`compat.opencv-unifont`](pkgs/c/compat.opencv-unifont.lua)(CJK 字体,由 `compat.opencv` 的 `unifont` feature 拉取) | | 外部构建系统(`install()` 从源码构建) | [`compat.openblas`](pkgs/c/compat.openblas.lua)(Make) | | 全源码直编(config 快照 + 源列表,零外部构建系统) | [`compat.ffmpeg`](pkgs/c/compat.ffmpeg.lua)(2281 TU 含 NASM 汇编,28 个目录 glob 声明) | -| 全源码直编 + `build.mcpp` 消费端合成 | [`compat.opencv`](pkgs/c/compat.opencv.lua)(OpenCV 5,458 TU 真实路径直编,SIMD dispatch 保留,字体/内核/jpeg12/16 由包内 build.mcpp 生成,依赖 `compat.ffmpeg` 提供 videoio FFmpeg 后端;feature:`unifont` CJK 字体、`dnn` 深度学习模块(+309 TU 含 protobuf/mlas);旧 install() CMake 形态与过渡别名 `compat.opencv5` 均已移除) | | C++23 module wrapper | [`nlohmann.json`](pkgs/n/nlohmann.json.lua) · [`marzer.tomlplusplus`](pkgs/m/marzer.tomlplusplus.lua) | ### 新增一个包 diff --git a/index.toml b/index.toml index 3d91d19..01fb233 100644 --- a/index.toml +++ b/index.toml @@ -7,5 +7,5 @@ # "floor first, new grammar after" rollout rule mechanically. [index] spec = "1" -min_mcpp = "0.0.101" -latest_mcpp = "0.0.101" +min_mcpp = "0.0.102" +latest_mcpp = "0.0.102" diff --git a/mcpp.toml b/mcpp.toml index 0ed6250..80edec9 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -25,10 +25,6 @@ members = [ "tests/examples/marzer.tomlplusplus", "tests/examples/nlohmann.json", "tests/examples/openblas", - "tests/examples/opencv", - "tests/examples/opencv-win", - "tests/examples/opencv-unifont", - "tests/examples/opencv-dnn", "tests/examples/opencv-module", "tests/examples/opencv-module-dnn", "tests/examples/opencv-module-unifont", diff --git a/pkgs/c/compat.opencv-unifont.lua b/pkgs/c/compat.opencv-unifont.lua deleted file mode 100644 index 3291726..0000000 --- a/pkgs/c/compat.opencv-unifont.lua +++ /dev/null @@ -1,55 +0,0 @@ --- Data-only asset package: the CJK/Unicode fallback font OpenCV embeds when --- built WITH_UNIFONT (WenQuanYiMicroHei.ttf.gz, pinned to the same --- opencv_3rdparty commit as upstream's modules/imgproc/CMakeLists.txt, --- upstream MD5 fb79cf5b4f4c89414f1233f14c2eb273). Consumers never depend on --- it directly — compat.opencv's `unifont` feature pulls it and its --- build.mcpp hex-embeds the COMPRESSED bytes (builtin_font_uni.h, symbol --- OcvBuiltinFontUni), exactly like cmake's ocv_blob2hdr. The payload is a --- raw .gz (not an archive): the installer parks it byte-preserved in the --- store's shared data/runtimedir/, where compat.opencv's build.mcpp finds --- it by name. -package = { - spec = "1", - namespace = "compat", - name = "compat.opencv-unifont", - description = "WenQuanYi Micro Hei font asset for OpenCV putText Unicode/CJK rendering (unifont feature)", - licenses = {"Apache-2.0", "GPL-3.0-only WITH Font-exception-2.0"}, - repo = "https://github.com/vpisarev/opencv_3rdparty", - type = "package", - - -- OS-neutral font blob (WenQuanYiMicroHei.ttf.gz): identical tarball on every - -- platform, so all three xpm keys point at the same asset. build.mcpp hex-embeds - -- it (builtin_font_uni.h) regardless of host. - xpm = { - linux = { ["1.0.0"] = { url = { - GLOBAL = "https://raw.githubusercontent.com/vpisarev/opencv_3rdparty/cc7d85179d69a704bee209aa37ce8a657f2f8b34/WenQuanYiMicroHei.ttf.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/unifont-1.0.0/WenQuanYiMicroHei.ttf.gz", - }, sha256 = "70c5634fe8326a20a18f4d634d08c510f2c05f6613d2d5aa3566f162cc02804f" } }, - macosx = { ["1.0.0"] = { url = { - GLOBAL = "https://raw.githubusercontent.com/vpisarev/opencv_3rdparty/cc7d85179d69a704bee209aa37ce8a657f2f8b34/WenQuanYiMicroHei.ttf.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/unifont-1.0.0/WenQuanYiMicroHei.ttf.gz", - }, sha256 = "70c5634fe8326a20a18f4d634d08c510f2c05f6613d2d5aa3566f162cc02804f" } }, - windows = { ["1.0.0"] = { url = { - GLOBAL = "https://raw.githubusercontent.com/vpisarev/opencv_3rdparty/cc7d85179d69a704bee209aa37ce8a657f2f8b34/WenQuanYiMicroHei.ttf.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/unifont-1.0.0/WenQuanYiMicroHei.ttf.gz", - }, sha256 = "70c5634fe8326a20a18f4d634d08c510f2c05f6613d2d5aa3566f162cc02804f" } }, - }, - - -- data-only: the payload is the font blob itself (parked in the store's - -- shared runtimedir — a raw .gz is not an archive). The mcpp segment is - -- a header-only shell so the resolver can treat it as an ordinary - -- build dependency; nothing is compiled or included from it. - mcpp = { - language = "c++23", - c_standard = "c11", - include_dirs = {}, - sources = { "mcpp_generated/opencv_unifont_anchor.c" }, - -- data-only packages still need a buildable target in mcpp (asio - -- anchor precedent): one empty TU, nothing else. - generated_files = { - ["mcpp_generated/opencv_unifont_anchor.c"] = [==[/* compat.opencv-unifont: data-only font asset package (see descriptor). */ -typedef int opencv_unifont_anchor_t; -]==], - }, - }, -} diff --git a/pkgs/c/compat.opencv.lua b/pkgs/c/compat.opencv.lua deleted file mode 100644 index fe5a2d0..0000000 --- a/pkgs/c/compat.opencv.lua +++ /dev/null @@ -1,11032 +0,0 @@ --- Auto-generated by tools/compat-opencv/merge_opencv.lua — do not edit by hand. --- OpenCV 5.0.0, multi-platform source build (linux-x86_64 + macosx-arm64). --- Each mcpp. block carries that platform's full frozen snapshot (include_dirs, --- SIMD flags, sources, and ALL generated_files — zero global generated_files, per --- mcpp's emplace-no-overwrite rule). Neutral keys (language/deps/targets/features) --- stay top-level. Headless highgui on every platform (BUILTIN_BACKEND=NONE). --- Regenerate: capture per-OS snapshots (snapshot-*-opencv.yml) -> gen_descriptor.py --- -> merge_opencv.lua. -package = { - description = "OpenCV 5.0.0 (core/imgproc/imgcodecs/highgui/videoio incl. FFmpeg backend), full source build with SIMD dispatch", - licenses = { "Apache-2.0" }, - mcpp = { - features = { - unifont = { - defines = { "HAVE_UNIFONT" }, - deps = { ["compat.opencv-unifont"] = "1.0.0" }, - }, - }, - language = "c++23", - linux = { - cflags = { "-msse3", "-w" }, - cxxflags = { "-msse3", "-w" }, - deps = { ["compat.ffmpeg"] = "8.1.2" }, - features = { - dnn = { - defines = { "HAVE_OPENCV_DNN" }, - flags = { - { - defines = { - "ENABLE_PLUGINS", - "HAVE_FLATBUFFERS=1", - "HAVE_MLAS=1", - "HAVE_PROTOBUF=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/dnn/**", - }, - { - defines = { - "BUILD_MLAS_NO_ONNXRUNTIME=1", - "MLAS_GEMM_ONLY=1", - "MLAS_OPENCV_THREADING=1", - "NDEBUG", - "_GNU_SOURCE=1", - "_USE_MATH_DEFINES", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/3rdparty/mlas/**", - }, - { - defines = { - "BUILD_MLAS_NO_ONNXRUNTIME=1", - "MLAS_GEMM_ONLY=1", - "MLAS_OPENCV_THREADING=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/tu/mlasgemm/**", - }, - { - defines = { "HAVE_PTHREAD=1", "NDEBUG" }, - glob = "**/3rdparty/protobuf/**", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx" }, - defines = { - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX", - }, - glob = "**/modules/dnn/**/*.avx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx", "-mf16c", "-mavx2", "-mfma" }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX2", - }, - glob = "**/modules/dnn/**/*.avx2.cpp", - }, - { - cxxflags = { - "-mssse3", - "-msse4.1", - "-mpopcnt", - "-msse4.2", - "-mavx", - "-mf16c", - "-mavx2", - "-mfma", - "-mavx512f", - "-mavx512f", - "-mavx512cd", - "-mavx512f", - "-mavx512cd", - "-mavx512vl", - "-mavx512bw", - "-mavx512dq", - }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX512_COMMON=1", - "CV_CPU_COMPILE_AVX512_SKX=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_AVX_512F=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX512_SKX", - }, - glob = "**/modules/dnn/**/*.avx512_skx.cpp", - }, - { - cxxflags = { "-include", "unistd.h" }, - glob = "*/3rdparty/mlas/lib/platform.cpp", - }, - }, - sources = { - "*/3rdparty/mlas/lib/*.cpp", - "*/3rdparty/mlas/lib/x86_64/*.S", - "*/3rdparty/protobuf/src/google/protobuf/*.cc", - "*/3rdparty/protobuf/src/google/protobuf/io/*.cc", - "*/3rdparty/protobuf/src/google/protobuf/stubs/*.cc", - "*/modules/dnn/misc/caffe/opencv-caffe.pb.cc", - "*/modules/dnn/misc/onnx/opencv-onnx.pb.cc", - "*/modules/dnn/misc/tensorflow/*.cc", - "*/modules/dnn/src/*.cpp", - "*/modules/dnn/src/caffe/caffe_io.cpp", - "*/modules/dnn/src/int8layers/*.cpp", - "*/modules/dnn/src/layers/*.cpp", - "*/modules/dnn/src/layers/cpu_kernels/*.cpp", - "*/modules/dnn/src/onnx/*.cpp", - "*/modules/dnn/src/tensorflow/*.cpp", - "*/modules/dnn/src/tflite/tflite_importer.cpp", - "*/modules/dnn/src/tokenizer/*.cpp", - "mcpp_generated/modules/dnn/int8layers/{conv2_int8_kernels.avx2,layers_common.avx2,layers_common.avx512_skx}.cpp", - "mcpp_generated/modules/dnn/layers/{layers_common.avx,layers_common.avx2,layers_common.avx512_skx}.cpp", - [[ -mcpp_generated/modules/dnn/layers/cpu_kernels/{activation_kernels.avx,activation_kernels.avx2,conv2_depthwise.avx,conv2_depthwise.avx2,conv2_kernels.avx,conv2_kernels.avx2,conv_block.avx,conv_block.avx2,conv_depthwise.avx,conv_depthwise.avx2,conv_winograd_f63.avx,conv_winograd_f63.avx2,fast_gemm_kernels.avx,fast_gemm_kernels.avx2,gridsample_kernels.avx,gridsample_kernels.avx2,nary_eltwise_kernels.avx,nary_eltwise_kernels.avx2,reduce2_kernels.avx,reduce2_kernels.avx2,transpose_kernels.avx,transpose_kernels.avx2}.cpp]], - "mcpp_generated/mlas_hgemm_stub.cpp", - }, - }, - }, - flags = { - { - defines = { - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "OPENCV_ALLOCATOR_STATS_COUNTER_TYPE=long long", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/core/**", - }, - { - defines = { - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/flann/**", - }, - { - defines = { - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/geometry/**", - }, - { - defines = { - "ENABLE_PLUGINS", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/highgui/**", - }, - { - defines = { - "HAVE_IMGCODEC_HDR", - "HAVE_IMGCODEC_PFM", - "HAVE_IMGCODEC_PXM", - "HAVE_IMGCODEC_SUNRASTER", - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/imgcodecs/**", - }, - { - defines = { - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/imgproc/**", - }, - { - defines = { "NDEBUG", "NO_GETENV", "NO_PUTENV" }, - glob = "**/3rdparty/libjpeg-turbo/**", - }, - { - defines = { "BITS_IN_JSAMPLE=12", "NDEBUG", "NO_GETENV", "NO_PUTENV" }, - glob = "**/tu/jpeg12/**", - }, - { - defines = { "BITS_IN_JSAMPLE=16", "NDEBUG", "NO_GETENV", "NO_PUTENV" }, - glob = "**/tu/jpeg16/**", - }, - { - defines = { "HAVE_STDARG_H=1", "HAVE_UNISTD_H=1", "NDEBUG", "PNG_INTEL_SSE_OPT=1" }, - glob = "**/3rdparty/libpng/**", - }, - { - defines = { - "ENABLE_PLUGINS", - "HAVE_CAMV4L2", - "HAVE_FFMPEG", - "HAVE_FFMPEG_LIBAVDEVICE", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/videoio/**", - }, - { - defines = { "HAVE_STDARG_H=1", "HAVE_UNISTD_H=1", "NDEBUG" }, - glob = "**/3rdparty/zlib/**", - }, - { - defines = { "ELF", "NO_GETENV", "NO_PUTENV", "PIC", "__CET__", "__x86_64__" }, - glob = "**/*.asm", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx" }, - defines = { - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX", - }, - glob = "**/modules/core/**/*.avx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx", "-mf16c", "-mavx2", "-mfma" }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX2", - }, - glob = "**/modules/core/**/*.avx2.cpp", - }, - { - cxxflags = { - "-mssse3", - "-msse4.1", - "-mpopcnt", - "-msse4.2", - "-mavx", - "-mf16c", - "-mavx2", - "-mfma", - "-mavx512f", - "-mavx512f", - "-mavx512cd", - "-mavx512f", - "-mavx512cd", - "-mavx512vl", - "-mavx512bw", - "-mavx512dq", - }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX512_COMMON=1", - "CV_CPU_COMPILE_AVX512_SKX=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_AVX_512F=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX512_SKX", - }, - glob = "**/modules/core/**/*.avx512_skx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1" }, - defines = { "CV_CPU_COMPILE_SSE4_1=1", "CV_CPU_COMPILE_SSSE3=1", "CV_CPU_DISPATCH_MODE=SSE4_1" }, - glob = "**/modules/core/**/*.sse4_1.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2" }, - defines = { - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=SSE4_2", - }, - glob = "**/modules/core/**/*.sse4_2.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx" }, - defines = { - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX", - }, - glob = "**/modules/imgproc/**/*.avx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx", "-mf16c", "-mavx2", "-mfma" }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX2", - }, - glob = "**/modules/imgproc/**/*.avx2.cpp", - }, - { - cxxflags = { - "-mssse3", - "-msse4.1", - "-mpopcnt", - "-msse4.2", - "-mavx", - "-mf16c", - "-mavx2", - "-mfma", - "-mavx512f", - "-mavx512f", - "-mavx512cd", - "-mavx512f", - "-mavx512cd", - "-mavx512vl", - "-mavx512bw", - "-mavx512dq", - }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX512_COMMON=1", - "CV_CPU_COMPILE_AVX512_SKX=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_AVX_512F=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX512_SKX", - }, - glob = "**/modules/imgproc/**/*.avx512_skx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1" }, - defines = { "CV_CPU_COMPILE_SSE4_1=1", "CV_CPU_COMPILE_SSSE3=1", "CV_CPU_DISPATCH_MODE=SSE4_1" }, - glob = "**/modules/imgproc/**/*.sse4_1.cpp", - }, - { - defines = { "HAVE_MALLOC_H=1", "HAVE_MEMALIGN=1", "HAVE_POSIX_MEMALIGN=1" }, - glob = "*/modules/core/src/alloc.cpp", - }, - { - defines = { "PARALLEL_ENABLE_PLUGINS=1" }, - glob = "*/modules/core/src/parallel/parallel.cpp", - }, - { - defines = { "HAVE_GETAUXVAL=1" }, - glob = "*/modules/core/src/system.cpp", - }, - }, - generated_files = { - ["build.mcpp"] = [[ -// build.mcpp for compat.opencv — consumer-side synthesis of OpenCV's -// build-time generated files from the frozen config snapshot. Embedded into -// pkgs/c/compat.opencv.lua by tools/compat-opencv5/gen_descriptor.py. -// -// What it does (all pure transforms of files already in the pinned tarball — -// nothing is downloaded, nothing depends on the host): -// 1. blob2hdr — modules/imgproc/fonts/*.ttf.gz → builtin_font_{sans,italic}.h -// (hex byte arrays; faithful port of cmake ocv_blob2hdr) -// 2. cl2cpp — modules//src/opencl/*.cl → opencl_kernels_.{cpp,hpp} -// (comment-strip + string-escape + md5; faithful port of -// cmake/cl2cpp.cmake; content is #ifdef HAVE_OPENCL-guarded -// and inert in this profile, kept byte-faithful anyway) -// 3. tu stubs — ONLY for the libjpeg-turbo BITS_IN_JSAMPLE=12/16 -// same-source re-compiles (one .c, three compiles — plain -// sources cannot express that), driven by -// mcpp_generated/tu_manifest.txt. Every other TU is a real -// tarball path in `sources` since mcpp 0.0.97 (#233/#234 -// fixed). Stub basenames are group-prefixed so jpeg12 and -// jpeg16 never collide (also dodges mcpp#239). -// The raw `mcpp:` stdout protocol is used (no `import mcpp;`) so this file -// has zero non-standard dependencies. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace fs = std::filesystem; - -// ── tiny MD5 (RFC 1321, public-domain style condensed implementation) ──── -namespace md5impl { -struct MD5 { - uint32_t a0 = 0x67452301, b0 = 0xefcdab89, c0 = 0x98badcfe, d0 = 0x10325476; - static const uint32_t K[64]; - static const uint32_t R[64]; - void block(const uint8_t* p) { - uint32_t M[16]; - for (int i = 0; i < 16; i++) - M[i] = (uint32_t)p[i*4] | ((uint32_t)p[i*4+1] << 8) | ((uint32_t)p[i*4+2] << 16) | ((uint32_t)p[i*4+3] << 24); - uint32_t A = a0, B = b0, C = c0, D = d0; - for (int i = 0; i < 64; i++) { - uint32_t F; int g; - if (i < 16) { F = (B & C) | (~B & D); g = i; } - else if (i < 32) { F = (D & B) | (~D & C); g = (5*i + 1) % 16; } - else if (i < 48) { F = B ^ C ^ D; g = (3*i + 5) % 16; } - else { F = C ^ (B | ~D); g = (7*i) % 16; } - F = F + A + K[i] + M[g]; - A = D; D = C; C = B; - B = B + ((F << R[i]) | (F >> (32 - R[i]))); - } - a0 += A; b0 += B; c0 += C; d0 += D; - } - static std::string hex(const std::string& data) { - MD5 m; - uint64_t bits = (uint64_t)data.size() * 8; - std::string buf = data; - buf.push_back((char)0x80); - while (buf.size() % 64 != 56) buf.push_back('\0'); - for (int i = 0; i < 8; i++) buf.push_back((char)((bits >> (8*i)) & 0xff)); - for (size_t o = 0; o < buf.size(); o += 64) m.block((const uint8_t*)buf.data() + o); - char out[33]; - uint32_t w[4] = { m.a0, m.b0, m.c0, m.d0 }; - for (int i = 0; i < 16; i++) - std::snprintf(out + 2*i, 3, "%02x", (w[i/4] >> (8*(i%4))) & 0xff); - return std::string(out, 32); - } -}; -const uint32_t MD5::K[64] = { - 0xd76aa478,0xe8c7b756,0x242070db,0xc1bdceee,0xf57c0faf,0x4787c62a,0xa8304613,0xfd469501, - 0x698098d8,0x8b44f7af,0xffff5bb1,0x895cd7be,0x6b901122,0xfd987193,0xa679438e,0x49b40821, - 0xf61e2562,0xc040b340,0x265e5a51,0xe9b6c7aa,0xd62f105d,0x02441453,0xd8a1e681,0xe7d3fbc8, - 0x21e1cde6,0xc33707d6,0xf4d50d87,0x455a14ed,0xa9e3e905,0xfcefa3f8,0x676f02d9,0x8d2a4c8a, - 0xfffa3942,0x8771f681,0x6d9d6122,0xfde5380c,0xa4beea44,0x4bdecfa9,0xf6bb4b60,0xbebfbc70, - 0x289b7ec6,0xeaa127fa,0xd4ef3085,0x04881d05,0xd9d4d039,0xe6db99e5,0x1fa27cf8,0xc4ac5665, - 0xf4292244,0x432aff97,0xab9423a7,0xfc93a039,0x655b59c3,0x8f0ccc92,0xffeff47d,0x85845dd1, - 0x6fa87e4f,0xfe2ce6e0,0xa3014314,0x4e0811a1,0xf7537e82,0xbd3af235,0x2ad7d2bb,0xeb86d391 }; -const uint32_t MD5::R[64] = { - 7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22, 5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20, - 4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23, 6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21 }; -} // namespace md5impl - -static std::string slurp(const fs::path& p) { - std::ifstream f(p, std::ios::binary); - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot read %s\n", p.string().c_str()); std::exit(1); } - std::ostringstream ss; ss << f.rdbuf(); return ss.str(); -} -static void spew(const fs::path& p, const std::string& content) { - fs::create_directories(p.parent_path()); - // only rewrite when changed: keeps ninja restat-friendly timestamps - if (fs::exists(p)) { - std::ifstream f(p, std::ios::binary); std::ostringstream ss; ss << f.rdbuf(); - if (ss.str() == content) return; - } - std::ofstream f(p, std::ios::binary); - f << content; - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot write %s\n", p.string().c_str()); std::exit(1); } -} - -// ── gunzip (raw inflate over the vendored zlib? not available here) ───── -// The .ttf.gz blobs are embedded AS-IS: cmake's ocv_blob2hdr hex-dumps the -// *compressed* file bytes (OpenCV decompresses at runtime via its zlib), so -// no inflate is needed here — just a hex dump. -static void blob2hdr(const fs::path& blob, const fs::path& hdr, const std::string& var) { - // byte-faithful port of cmake ocv_blob2hdr: 16 bytes per line, ", " - // separators, the very last ", " trimmed. - std::string data = slurp(blob); - std::ostringstream out; - out << "// Auto generated file.\nstatic const unsigned char " << var << "[] =\n{\n"; - char buf[8]; - for (size_t i = 0; i < data.size(); i++) { - std::snprintf(buf, sizeof buf, "0x%02x", (unsigned char)data[i]); - out << buf; - if (i + 1 != data.size()) out << ", "; - if (i % 16 == 15 && i + 1 != data.size()) out << "\n"; - } - out << "\n};\n"; - spew(hdr, out.str()); -} - -// ── cl2cpp (faithful port of cmake/cl2cpp.cmake) ──────────────────────── -static std::string cl_escape(std::string lines) { - std::string t; - // \r removal + trailing \n + tabs→2 spaces - for (char c : lines) if (c != '\r') t.push_back(c); - t.push_back('\n'); - std::string u; - for (char c : t) { if (c == '\t') u += " "; else u.push_back(c); } - // strip /* */ comments (non-greedy scan) - std::string v; v.reserve(u.size()); - for (size_t i = 0; i < u.size();) { - if (i + 1 < u.size() && u[i] == '/' && u[i+1] == '*') { - size_t e = u.find("*/", i + 2); - i = (e == std::string::npos) ? u.size() : e + 2; - } else v.push_back(u[i++]); - } - // strip // comments (with leading spaces) - std::string w; w.reserve(v.size()); - for (size_t i = 0; i < v.size();) { - if (i + 1 < v.size() && v[i] == '/' && v[i+1] == '/') { - while (!w.empty() && w.back() == ' ') w.pop_back(); - size_t e = v.find('\n', i); - i = (e == std::string::npos) ? v.size() : e; // keep the newline - } else w.push_back(v[i++]); - } - // collapse empty lines + leading whitespace per line - std::string x; x.reserve(w.size()); - for (size_t i = 0; i < w.size();) { - if (w[i] == '\n') { - x.push_back('\n'); - size_t j = i + 1; - while (j < w.size() && (w[j] == ' ' || w[j] == '\n')) { - if (w[j] == '\n') { i = j; } - j++; - } - // re-scan: skip spaces directly after newline, and fold newline runs - size_t k = i + 1; - while (k < w.size() && w[k] == ' ') k++; - while (k < w.size() && w[k] == '\n') { k++; i = k - 1; - while (k < w.size() && w[k] == ' ') k++; } - i = k; - } else x.push_back(w[i++]); - } - if (!x.empty() && x.front() == '\n') x.erase(0, 1); - // escape backslash, quote; newline → \n" " - std::string y; - for (char c : x) { - if (c == '\\') y += "\\\\"; - else if (c == '"') y += "\\\""; - else if (c == '\n') y += "\\n\"\n\""; - else y.push_back(c); - } - // drop unneeded trailing quote opener - if (y.size() >= 1 && y.back() == '"') y.pop_back(); - return y; -} - -static void cl2cpp(const fs::path& cl_dir, const fs::path& out_cpp, const fs::path& out_hpp, - const std::string& module_name) { - std::vector cls; - for (auto& e : fs::directory_iterator(cl_dir)) - if (e.path().extension() == ".cl") cls.push_back(e.path()); - std::sort(cls.begin(), cls.end()); - std::string ns = module_name; - if (!ns.empty() && ns[0] >= '0' && ns[0] <= '9') ns = "_" + ns; - std::ostringstream cpp, hpp; - cpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core.hpp\"\n" - << "#include \"cvconfig.h\"\n#include \"" << out_hpp.filename().string() << "\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns - << "\n{\n\nstatic const char* const moduleName = \"" << module_name << "\";\n\n"; - hpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core/ocl.hpp\"\n" - << "#include \"opencv2/core/ocl_genbase.hpp\"\n#include \"opencv2/core/opencl/ocl_defs.hpp\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns << "\n{\n\n"; - for (auto& cl : cls) { - std::string name = cl.stem().string(); - std::string body = cl_escape(slurp(cl)); - std::string hash = md5impl::MD5::hex(body); - cpp << "struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc={moduleName, \"" << name - << "\",\n\"" << body << ", \"" << hash << "\", NULL};\n"; - hpp << "extern struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc;\n"; - } - cpp << "\n}}}\n#endif\n"; - hpp << "\n}}}\n#endif\n"; - spew(out_cpp, cpp.str()); - spew(out_hpp, hpp.str()); -} - -int main() { - const char* man_env = std::getenv("MCPP_MANIFEST_DIR"); - const char* out_env = std::getenv("MCPP_OUT_DIR"); - fs::path man = man_env ? man_env : "."; - if (!out_env) { std::fprintf(stderr, "compat.opencv build.mcpp: MCPP_OUT_DIR unset (mcpp >= 0.0.95 required)\n"); return 1; } - fs::path out = out_env; - fs::path gen = man / "mcpp_generated"; - - // the extracted official tarball wrap dir (opencv-/) - fs::path wrap; - for (auto& e : fs::directory_iterator(man)) { - if (e.is_directory() && e.path().filename().string().rfind("opencv-", 0) == 0 - && fs::exists(e.path() / "modules")) { wrap = e.path(); break; } - } - if (wrap.empty()) { std::fprintf(stderr, "compat.opencv build.mcpp: opencv-* source dir not found under %s\n", man.string().c_str()); return 1; } - - // 1. fonts - blob2hdr(wrap / "modules/imgproc/fonts/Rubik.ttf.gz", out / "builtin_font_sans.h", "OcvBuiltinFontSans"); - blob2hdr(wrap / "modules/imgproc/fonts/Rubik-Italic.ttf.gz", out / "builtin_font_italic.h", "OcvBuiltinFontItalic"); - - // 1b. unifont feature: hex-embed the CJK font pulled in by the - // compat.opencv-unifont dependency. Its raw .gz payload is parked by - // the installer in a shared runtimedir whose location relative to any - // one package shifted across xlings store layouts (0.4.62 -> 0.4.67, - // mcpp 0.0.99), which is why a fixed `/xpkgs// -> - // /runtimedir` hop broke. Anchor instead on the authoritative - // per-dep dir contract (mcpp#241: MCPP_DEP__DIR, emitted under - // both the canonical name and the namespace-stripped short name) and - // walk up probing runtimedir/ at every level; fall back to this - // package's own store location + a bounded search so older mcpp - // (pre-#241) and future layout shifts still resolve. - if (std::getenv("MCPP_FEATURE_UNIFONT")) { - const char* fname = "WenQuanYiMicroHei.ttf.gz"; - fs::path font; - std::error_code ec; - auto probe = [&](const fs::path& base) -> fs::path { - if (base.empty()) return {}; - for (const fs::path& c : { base / fname, - base / "runtimedir" / fname, - base / "data" / "runtimedir" / fname }) - if (fs::exists(c)) return c; - return {}; - }; - std::vector anchors; - if (const char* d = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - if (const char* d = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - anchors.push_back(man); - if (const char* d = std::getenv("MCPP_OUT_DIR")) anchors.emplace_back(d); - // walk up from each anchor, probing runtimedir/ at every level - for (const auto& a : anchors) { - for (fs::path p = a; !p.empty(); p = p.parent_path()) { - if (auto hit = probe(p); !hit.empty()) { font = hit; break; } - if (p == p.root_path()) break; - } - if (!font.empty()) break; - } - // fallback: sweep any opencv-unifont verdir near this package's store dir - if (font.empty()) { - for (auto& e : fs::directory_iterator(man.parent_path().parent_path(), ec)) { - if (e.path().filename().string().find("opencv-unifont") == std::string::npos) continue; - for (auto& v : fs::recursive_directory_iterator(e.path(), ec)) - if (v.path().filename() == fname) { font = v.path(); break; } - if (!font.empty()) break; - } - } - // last resort: bounded recursive search from the nearest store root - if (font.empty()) { - for (const auto& a : anchors) { - fs::path root = a; - for (int up = 0; up < 8 && root.has_parent_path(); ++up) { - if (fs::exists(root / "runtimedir") || fs::exists(root / "xpkgs") - || root.filename() == "data") break; - root = root.parent_path(); - } - long budget = 400000; - for (auto it = fs::recursive_directory_iterator(root, - fs::directory_options::skip_permission_denied, ec); - it != fs::recursive_directory_iterator() && budget-- > 0; it.increment(ec)) { - if (ec) { ec.clear(); continue; } - if (it->path().filename() == fname) { font = it->path(); break; } - } - if (!font.empty()) break; - } - } - if (font.empty()) { - const char* e1 = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR"); - const char* e2 = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR"); - const char* e3 = std::getenv("MCPP_OUT_DIR"); - std::fprintf(stderr, "compat.opencv build.mcpp: unifont feature on but %s not found.\n" - " MCPP_MANIFEST_DIR=%s\n MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR=%s\n" - " MCPP_DEP_OPENCV_UNIFONT_DIR=%s\n MCPP_OUT_DIR=%s\n", - fname, man.string().c_str(), - e1 ? e1 : "(unset)", e2 ? e2 : "(unset)", e3 ? e3 : "(unset)"); - return 1; - } - blob2hdr(font, out / "builtin_font_uni.h", "OcvBuiltinFontUni"); - std::printf("compat.opencv build.mcpp: unifont embedded from %s\n", font.string().c_str()); - } - - // 2. OpenCL kernel embeddings (inert under this profile, byte-faithful) - for (std::string m : { "core", "imgproc", "geometry" }) { - fs::path cl_dir = wrap / "modules" / m / "src" / "opencl"; - if (fs::exists(cl_dir)) - cl2cpp(cl_dir, out / ("clsrc/opencl_kernels_" + m + ".cpp"), - out / ("opencl_kernels_" + m + ".hpp"), m); - } - - // 3. jpeg12/jpeg16 re-compile stubs from the manifest - // line grammar: [?] - // (group-prefixed filename => unique basenames across groups; a - // leading ? guard skips the stub unless MCPP_FEATURE_=1) - std::ifstream mf(gen / "tu_manifest.txt"); - if (!mf) { std::fprintf(stderr, "compat.opencv build.mcpp: mcpp_generated/tu_manifest.txt missing\n"); return 1; } - std::string line; - int stubs = 0; - while (std::getline(mf, line)) { - if (line.empty() || line[0] == '#') continue; - if (line[0] == '?') { - size_t g = line.find('\t'); - if (g == std::string::npos) continue; - std::string feat = line.substr(1, g - 1); - for (char& c : feat) c = (c >= 'a' && c <= 'z') ? char(c - 32) : c; - if (!std::getenv(("MCPP_FEATURE_" + feat).c_str())) continue; - line = line.substr(g + 1); - } - size_t t = line.find('\t'); - if (t == std::string::npos) continue; - std::string grp = line.substr(0, t); - std::string target = line.substr(t + 1); - std::string mangled = grp + "_" + target; - for (char& c : mangled) if (c == '/') c = '_'; - fs::path stub = out / "tu" / grp / mangled; - std::string content = "/* compat.opencv " + grp + " re-compile TU */\n" - "#include \"" + target + "\"\n"; - spew(stub, content); - std::printf("mcpp:generated=%s\n", stub.string().c_str()); - stubs++; - } - - // out/ carries builtin_font_*.h, opencl_kernels_*.hpp, clsrc/ includes - std::printf("mcpp:cxxflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:cflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:rerun-if-changed=%s\n", (gen / "tu_manifest.txt").string().c_str()); - // diagnostics as a non-directive stdout line: stderr writes can interleave - // into the (buffered) stdout directive stream and corrupt a directive. - std::printf("compat.opencv build.mcpp: %d jpeg12/16 stubs, fonts + CL kernels synthesized\n", stubs); - std::fflush(stdout); - return 0; -} -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jconfig.h"] = [[ -/* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". - */ -#define JPEG_LIB_VERSION 70 - -/* libjpeg-turbo version */ -#define LIBJPEG_TURBO_VERSION 3.1.2 - -/* libjpeg-turbo version in integer form */ -#define LIBJPEG_TURBO_VERSION_NUMBER 3001002 - -/* Support arithmetic encoding when using 8-bit samples */ -#define C_ARITH_CODING_SUPPORTED 1 - -/* Support arithmetic decoding when using 8-bit samples */ -#define D_ARITH_CODING_SUPPORTED 1 - -/* Support in-memory source/destination managers */ -#define MEM_SRCDST_SUPPORTED 1 - -/* Use accelerated SIMD routines when using 8-bit samples */ -#define WITH_SIMD 1 - -/* This version of libjpeg-turbo supports run-time selection of data precision, - * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build - * time. However, some downstream software expects the macro to be defined. - * Since 12-bit data precision is an opt-in feature that requires explicitly - * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data - * types, the unmodified portion of the libjpeg API still behaves as if it were - * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data - * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. - */ -#ifndef BITS_IN_JSAMPLE -#define BITS_IN_JSAMPLE 8 -#endif - -#ifdef _WIN32 - -#undef RIGHT_SHIFT_IS_UNSIGNED - -/* Define "boolean" as unsigned char, not int, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - -/* Define "INT32" as int, not long, per Windows custom */ -#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ -typedef short INT16; -typedef signed int INT32; -#endif -#define XMD_H /* prevent jmorecfg.h from redefining it */ - -#else - -/* Define if your (broken) compiler shifts signed values as if they were - unsigned. */ -/* #undef RIGHT_SHIFT_IS_UNSIGNED */ - -#endif -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jconfigint.h"] = [[ -/* libjpeg-turbo build number */ -#define BUILD "opencv-5.0.0-libjpeg-turbo" - -/* How to hide global symbols. */ -#define HIDDEN - -/* Compiler's inline keyword */ -#undef inline - -/* How to obtain function inlining. */ -#define INLINE - -/* How to obtain thread-local storage */ -#define THREAD_LOCAL - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "OpenCV" - -/* Version number of package */ -#define VERSION "3.1.2" - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */ -/* #undef HAVE_BUILTIN_CTZL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTRIN_H */ - -#if defined(_MSC_VER) && defined(HAVE_INTRIN_H) -#if (SIZEOF_SIZE_T == 8) -#define HAVE_BITSCANFORWARD64 -#elif (SIZEOF_SIZE_T == 4) -#define HAVE_BITSCANFORWARD -#endif -#endif - -#if defined(__has_attribute) -#if __has_attribute(fallthrough) -#define FALLTHROUGH __attribute__((fallthrough)); -#else -#define FALLTHROUGH -#endif -#else -#define FALLTHROUGH -#endif - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - */ - -#ifndef BITS_IN_JSAMPLE -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ -#endif - -#undef C_ARITH_CODING_SUPPORTED -#undef D_ARITH_CODING_SUPPORTED -#undef WITH_SIMD - -#if BITS_IN_JSAMPLE == 8 - -/* Support arithmetic encoding */ -#define C_ARITH_CODING_SUPPORTED 1 - -/* Support arithmetic decoding */ -#define D_ARITH_CODING_SUPPORTED 1 - -/* Use accelerated SIMD routines. */ -#define WITH_SIMD 1 - -#endif -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jversion.h"] = [[ -/* - * jversion.h - * - * This file was part of the Independent JPEG Group's software: - * Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding. - * libjpeg-turbo Modifications: - * Copyright (C) 2010, 2012-2024, D. R. Commander. - * For conditions of distribution and use, see the accompanying README.ijg - * file. - * - * This file contains software version identification. - */ - - -#if JPEG_LIB_VERSION >= 80 - -#define JVERSION "8d 15-Jan-2012" - -#elif JPEG_LIB_VERSION >= 70 - -#define JVERSION "7 27-Jun-2009" - -#else - -#define JVERSION "6b 27-Mar-1998" - -#endif - -/* - * NOTE: It is our convention to place the authors in the following order: - * - libjpeg-turbo authors (2009-) in descending order of the date of their - * most recent contribution to the project, then in ascending order of the - * date of their first contribution to the project, then in alphabetical - * order - * - Upstream authors in descending order of the date of the first inclusion of - * their code - */ - -#define JCOPYRIGHT1 \ - "Copyright (C) 2009-2024 D. R. Commander\n" \ - "Copyright (C) 2015, 2020 Google, Inc.\n" \ - "Copyright (C) 2019-2020 Arm Limited\n" \ - "Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \ - "Copyright (C) 2011-2016 Siarhei Siamashka\n" \ - "Copyright (C) 2015 Intel Corporation\n" -#define JCOPYRIGHT2 \ - "Copyright (C) 2013-2014 Linaro Limited\n" \ - "Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \ - "Copyright (C) 2009, 2012 Pierre Ossman for Cendio AB\n" \ - "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \ - "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \ - "Copyright (C) 1999 Ken Murchison\n" \ - "Copyright (C) 1991-2020 Thomas G. Lane, Guido Vollbeding\n" - -#define JCOPYRIGHT_SHORT \ - "Copyright (C) 1991-2025 The libjpeg-turbo Project and many others" -]], - ["mcpp_generated/3rdparty/zlib/zconf.h"] = [[ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compress_z z_compress_z -# define compress2_z z_compress2_z -# define compressBound z_compressBound -# define compressBound_z z_compressBound_z -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_combine_gen z_crc32_combine_gen -# define crc32_combine_gen64 z_crc32_combine_gen64 -# define crc32_combine_op z_crc32_combine_op -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateBound_z z_deflateBound_z -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflateUsed z_deflateUsed -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# define inflate_fixed z_inflate_fixed -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# define uncompress_z z_uncompress_z -# define uncompress2_z z_uncompress2_z -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#ifndef z_const -# ifdef ZLIB_CONST -# define z_const const -# else -# define z_const -# endif -#endif - -#ifdef Z_SOLO -# ifdef _WIN64 - typedef unsigned long long z_size_t; -# else - typedef unsigned long z_size_t; -# endif -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#ifndef Z_HAVE_UNISTD_H -# if defined(__WATCOMC__) || defined(__GO32__) || \ - (defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)) -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#elif defined(__MINGW32__) -# define z_off64_t long long -#elif defined(_WIN32) && !defined(__GNUC__) -# define z_off64_t __int64 -#elif defined(__GO32__) -# define z_off64_t offset_t -#else -# define z_off64_t z_off_t -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ -]], - ["mcpp_generated/custom_hal.hpp"] = [[ -#ifndef _CUSTOM_HAL_INCLUDED_ -#define _CUSTOM_HAL_INCLUDED_ - - - -#endif -]], - ["mcpp_generated/cv_cpu_config.h"] = [[ -// OpenCV CPU baseline features - -#define CV_CPU_COMPILE_SSE 1 -#define CV_CPU_BASELINE_COMPILE_SSE 1 - -#define CV_CPU_COMPILE_SSE2 1 -#define CV_CPU_BASELINE_COMPILE_SSE2 1 - -#define CV_CPU_COMPILE_SSE3 1 -#define CV_CPU_BASELINE_COMPILE_SSE3 1 - -#define CV_CPU_BASELINE_FEATURES 0 \ - , CV_CPU_SSE \ - , CV_CPU_SSE2 \ - , CV_CPU_SSE3 \ - - -// OpenCV supported CPU dispatched features - -#define CV_CPU_DISPATCH_COMPILE_SSE4_1 1 -#define CV_CPU_DISPATCH_COMPILE_SSE4_2 1 -#define CV_CPU_DISPATCH_COMPILE_AVX 1 -#define CV_CPU_DISPATCH_COMPILE_FP16 1 -#define CV_CPU_DISPATCH_COMPILE_AVX2 1 -#define CV_CPU_DISPATCH_COMPILE_AVX512_SKX 1 - - -#define CV_CPU_DISPATCH_FEATURES 0 \ - , CV_CPU_SSE4_1 \ - , CV_CPU_SSE4_2 \ - , CV_CPU_AVX \ - , CV_CPU_FP16 \ - , CV_CPU_AVX2 \ - , CV_CPU_AVX512_SKX \ - -]], - ["mcpp_generated/cvconfig.h"] = [[ -#ifndef OPENCV_CVCONFIG_H_INCLUDED -#define OPENCV_CVCONFIG_H_INCLUDED - -/* OpenCV compiled as static or dynamic libs */ -/* #undef BUILD_SHARED_LIBS */ - -/* OpenCV intrinsics optimized code */ -#define CV_ENABLE_INTRINSICS - -/* OpenCV additional optimized code */ -/* #undef CV_DISABLE_OPTIMIZATION */ - -/* Compile for 'real' NVIDIA GPU architectures */ -#define CUDA_ARCH_BIN "" - -/* NVIDIA GPU features are used */ -#define CUDA_ARCH_FEATURES "" - -/* Compile for 'virtual' NVIDIA PTX architectures */ -#define CUDA_ARCH_PTX "" - -/* AMD's Basic Linear Algebra Subprograms Library*/ -/* #undef HAVE_CLAMDBLAS */ - -/* AMD's OpenCL Fast Fourier Transform Library*/ -/* #undef HAVE_CLAMDFFT */ - -/* Clp support */ -/* #undef HAVE_CLP */ - -/* NVIDIA CUDA Runtime API*/ -/* #undef HAVE_CUDA */ - -/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/ -/* #undef HAVE_CUBLAS */ - -/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/ -/* #undef HAVE_CUDNN */ - -/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/ -/* #undef HAVE_CUFFT */ - -/* DirectX */ -/* #undef HAVE_DIRECTX */ -/* #undef HAVE_DIRECTX_NV12 */ -/* #undef HAVE_D3D11 */ -/* #undef HAVE_D3D10 */ -/* #undef HAVE_D3D9 */ - -/* Eigen Matrix & Linear Algebra Library */ -/* #undef HAVE_EIGEN */ - -/* Geospatial Data Abstraction Library */ -/* #undef HAVE_GDAL */ - -/* Vulkan support */ -/* #undef HAVE_VULKAN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Intel Integrated Performance Primitives */ -/* #undef HAVE_IPP */ -/* #undef HAVE_IPP_ICV */ -/* #undef HAVE_IPP_IW */ -/* #undef HAVE_IPP_IW_LL */ - -/* JPEG-2000 codec */ -/* #undef HAVE_OPENJPEG */ -/* #undef HAVE_JASPER */ - -/* AVIF codec */ -/* #undef HAVE_AVIF */ - -/* IJG JPEG codec */ -#define HAVE_JPEG - -/* JPEG XL codec */ -/* #undef HAVE_JPEGXL */ - -/* GDCM DICOM codec */ -/* #undef HAVE_GDCM */ - -/* NVIDIA Video Decoding API*/ -/* #undef HAVE_NVCUVID */ -/* #undef HAVE_NVCUVID_HEADER */ -/* #undef HAVE_DYNLINK_NVCUVID_HEADER */ - -/* NVIDIA Video Encoding API*/ -/* #undef HAVE_NVCUVENC */ - -/* OpenCL Support */ -/* #undef HAVE_OPENCL */ -/* #undef HAVE_OPENCL_STATIC */ -/* #undef HAVE_OPENCL_SVM */ - -/* NVIDIA OpenCL D3D Extensions support */ -/* #undef HAVE_OPENCL_D3D11_NV */ - -/* OpenEXR codec */ -/* #undef HAVE_OPENEXR */ - -/* OpenGL support*/ -/* #undef HAVE_OPENGL */ - -/* PNG codec */ -#define HAVE_PNG - -/* PNG codec */ -/* #undef HAVE_SPNG */ - -/* Posix threads (pthreads) */ -#define HAVE_PTHREAD - -/* parallel_for with pthreads */ -#define HAVE_PTHREADS_PF - -/* Intel Threading Building Blocks */ -/* #undef HAVE_TBB */ - -/* Ste||ar Group High Performance ParallelX */ -/* #undef HAVE_HPX */ - -/* TIFF codec */ -/* #undef HAVE_TIFF */ - -/* Define if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* VA library (libva) */ -/* #undef HAVE_VA */ - -/* Intel VA-API/OpenCL */ -/* #undef HAVE_VA_INTEL */ - -/* Lapack */ -/* #undef HAVE_LAPACK */ - -/* Library was compiled with functions instrumentation */ -/* #undef ENABLE_INSTRUMENTATION */ - -/* OpenCV trace utilities */ -#define OPENCV_TRACE - -/* The font "uni" (WQY MicroHei) is available */ -/* #undef HAVE_UNIFONT */ - -#endif // OPENCV_CVCONFIG_H_INCLUDED -]], - ["mcpp_generated/mlas_hgemm_stub.cpp"] = [[ -// compat.opencv curated stub: the vendored mlas subset declares and -// calls MlasHGemmSupported but does not vendor its definition (it -// lives in onnxruntime's full mlas). False = fp16 HGemm unsupported, -// which is the truth for this subset; callers fall back. -#include "mlas.h" -bool MLASCALL MlasHGemmSupported(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE) { return false; } -]], - ["mcpp_generated/modules/core/arithm.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/arithm.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/arithm.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/convert.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/convert.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/convert_scale.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/convert_scale.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/count_non_zero.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/count_non_zero.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/has_non_zero.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/has_non_zero.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/mathfuncs_core.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/mathfuncs_core.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.avx512_skx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/matmul.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/matmul.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/mean.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/mean.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/merge.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/merge.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/minmax.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/minmax.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/nan_mask.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/nan_mask.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/norm.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/norm.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/reduce.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/reduce.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.ssse3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/split.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/split.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/split.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/split.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/split.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/stat.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/stat.sse4_2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/sum.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/sum.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.fp16.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin128.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE3 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSSE3 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE4_2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE FP16 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, FP16, AVX, SSE4_2, SSE4_1, SSSE3, SSE3, SSE2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse3.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse4_1.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse4_2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.ssse3.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.avx2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.lasx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin256.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/test/test_intrin512.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin512.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin512.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin512.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/transpose.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.neon.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.rvv.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/transpose.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/version_string.inc"] = [[ -"\n" -"General configuration for OpenCV 5.0.0 =====================================\n" -" Version control: 5.0.0\n" -"\n" -" Platform:\n" -" Timestamp: 2026-07-18T16:08:07Z\n" -" Host: Linux 6.8.0-134-generic x86_64\n" -" CMake: 4.0.2\n" -" CMake generator: Ninja\n" -" CMake build tool: /home/speak/.xlings/subos/current/bin/ninja\n" -" Configuration: Release\n" -" Algorithm Hint: ALGO_HINT_ACCURATE\n" -"\n" -" CPU/HW features:\n" -" Baseline: SSE SSE2 SSE3\n" -" requested: SSE3\n" -" Dispatched code generation: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX\n" -" SSE4_1 (16 files): + SSSE3 SSE4_1\n" -" SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2\n" -" AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX\n" -" FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16\n" -" AVX2 (32 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16 AVX2 FMA3\n" -" AVX512_SKX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16 AVX2 FMA3 AVX_512F AVX512_COMMON AVX512_SKX\n" -"\n" -" C/C++:\n" -" Built as dynamic libs?: NO\n" -" C++ standard: 17\n" -" C++ Compiler: /usr/bin/g++ (ver 13.3.0)\n" -" C++ flags (Release): -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" -" C++ flags (Debug): -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wsuggest-override -Wno-delete-non-virtual-dtor -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse3 -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG\n" -" C Compiler: /usr/bin/gcc\n" -" C flags (Release): -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse3 -fvisibility=hidden -O3 -DNDEBUG -DNDEBUG\n" -" C flags (Debug): -fsigned-char -W -Wall -Wreturn-type -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wuninitialized -Wno-comment -Wimplicit-fallthrough=3 -Wno-strict-overflow -fdiagnostics-show-option -pthread -fomit-frame-pointer -ffunction-sections -fdata-sections -msse3 -fvisibility=hidden -g -O0 -DDEBUG -D_DEBUG\n" -" Linker flags (Release): -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined \n" -" Linker flags (Debug): -Wl,--gc-sections -Wl,--as-needed -Wl,--no-undefined \n" -" ccache: NO\n" -" Precompiled headers: NO\n" -" Extra dependencies: /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/libGLU.so dl m pthread rt\n" -" 3rdparty dependencies: libjpeg-turbo libpng zlib\n" -"\n" -" OpenCV modules:\n" -" To be built: core flann geometry highgui imgcodecs imgproc videoio\n" -" Disabled: world\n" -" Disabled by dependency: calib dnn features java java_bindings_generator js_bindings_generator objc_bindings_generator objdetect photo ptcloud python_bindings_generator python_tests stereo stitching video\n" -" Unavailable: python3 ts\n" -" Applications: -\n" -" Documentation: NO\n" -" Non-free algorithms: NO\n" -"\n" -" GUI: NONE\n" -" VTK support: YES (ver 9.1.0)\n" -"\n" -" Media I/O: \n" -" ZLib: zlib (ver 1.3.2)\n" -" JPEG: build-libjpeg-turbo (ver 3.1.2-70)\n" -" SIMD Support Request: YES\n" -" SIMD Support: YES\n" -" PNG: build (ver 1.6.57)\n" -" SIMD Support Request: YES\n" -" SIMD Support: YES (Intel SSE)\n" -" Metadata Support: EXIF XMP ICC cICP\n" -" GIF: NO\n" -" HDR: YES\n" -" SUNRASTER: YES\n" -" PXM: YES\n" -" PFM: YES\n" -"\n" -" Video I/O:\n" -" FFMPEG: YES\n" -" avcodec: YES (62.28.102)\n" -" avformat: YES (62.12.102)\n" -" avutil: YES (60.26.102)\n" -" swscale: YES (9.5.102)\n" -" avdevice: YES (62.3.102)\n" -" v4l/v4l2: YES (linux/videodev2.h)\n" -" Orbbec: NO\n" -"\n" -" Parallel framework: pthreads\n" -"\n" -" Trace: YES (built-in)\n" -"\n" -" Other third-party libraries:\n" -" VA: NO\n" -" Custom HAL: NO\n" -"\n" -" ONNX Runtime: NO\n" -"\n" -" Python (for build): /home/speak/.xlings/subos/current/bin/python3\n" -"\n" -" Java: \n" -" ant: NO\n" -" Java: YES (ver 21.0.11)\n" -" JNI: /usr/lib/jvm/default-java/include /usr/lib/jvm/default-java/include/linux /usr/lib/jvm/default-java/include\n" -" Java wrappers: NO\n" -" Java tests: NO\n" -"\n" -" Install to: /usr/local\n" -"-----------------------------------------------------------------\n" -"\n" -]], - ["mcpp_generated/modules/dnn/int8layers/conv2_int8_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/conv2_int8_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/conv2_int8_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/int8layers/conv2_int8_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.avx512_skx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/int8layers/layers_common.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, LASX, RVV, AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON_FP16 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON_FP16, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx512_skx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/layers_common.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SVE -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL SVE, NEON, LASX, RVV, AVX512_SKX, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/layers_common.sve.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/highgui/opencv_highgui_config.hpp"] = [[ -// Auto-generated file -#define OPENCV_HIGHGUI_BUILTIN_BACKEND_STR "NONE" - -#define OPENCV_HIGHGUI_WITHOUT_BUILTIN_BACKEND 1 -]], - ["mcpp_generated/modules/imgproc/accum.avx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/accum.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/accum.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/accum.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/accum.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/bilateral_filter.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/box_filter.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/box_filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_hsv.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_hsv.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_rgb.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_rgb.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_yuv.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_yuv.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/filter.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/median_blur.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/median_blur.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/morph.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/morph.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/smooth.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/smooth.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/sumpixels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/sumpixels.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/undistort.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/undistort.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/undistort.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/undistort.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/undistort.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/undistort.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.lasx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.neon.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.neon_fp16.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.rvv.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/warp_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/warp_kernels.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/opencv2/cvconfig.h"] = [[ -#ifndef OPENCV_CVCONFIG_H_INCLUDED -#define OPENCV_CVCONFIG_H_INCLUDED - -/* OpenCV compiled as static or dynamic libs */ -/* #undef BUILD_SHARED_LIBS */ - -/* OpenCV intrinsics optimized code */ -#define CV_ENABLE_INTRINSICS - -/* OpenCV additional optimized code */ -/* #undef CV_DISABLE_OPTIMIZATION */ - -/* Compile for 'real' NVIDIA GPU architectures */ -#define CUDA_ARCH_BIN "" - -/* NVIDIA GPU features are used */ -#define CUDA_ARCH_FEATURES "" - -/* Compile for 'virtual' NVIDIA PTX architectures */ -#define CUDA_ARCH_PTX "" - -/* AMD's Basic Linear Algebra Subprograms Library*/ -/* #undef HAVE_CLAMDBLAS */ - -/* AMD's OpenCL Fast Fourier Transform Library*/ -/* #undef HAVE_CLAMDFFT */ - -/* Clp support */ -/* #undef HAVE_CLP */ - -/* NVIDIA CUDA Runtime API*/ -/* #undef HAVE_CUDA */ - -/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/ -/* #undef HAVE_CUBLAS */ - -/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/ -/* #undef HAVE_CUDNN */ - -/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/ -/* #undef HAVE_CUFFT */ - -/* DirectX */ -/* #undef HAVE_DIRECTX */ -/* #undef HAVE_DIRECTX_NV12 */ -/* #undef HAVE_D3D11 */ -/* #undef HAVE_D3D10 */ -/* #undef HAVE_D3D9 */ - -/* Eigen Matrix & Linear Algebra Library */ -/* #undef HAVE_EIGEN */ - -/* Geospatial Data Abstraction Library */ -/* #undef HAVE_GDAL */ - -/* Vulkan support */ -/* #undef HAVE_VULKAN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Intel Integrated Performance Primitives */ -/* #undef HAVE_IPP */ -/* #undef HAVE_IPP_ICV */ -/* #undef HAVE_IPP_IW */ -/* #undef HAVE_IPP_IW_LL */ - -/* JPEG-2000 codec */ -/* #undef HAVE_OPENJPEG */ -/* #undef HAVE_JASPER */ - -/* AVIF codec */ -/* #undef HAVE_AVIF */ - -/* IJG JPEG codec */ -#define HAVE_JPEG - -/* JPEG XL codec */ -/* #undef HAVE_JPEGXL */ - -/* GDCM DICOM codec */ -/* #undef HAVE_GDCM */ - -/* NVIDIA Video Decoding API*/ -/* #undef HAVE_NVCUVID */ -/* #undef HAVE_NVCUVID_HEADER */ -/* #undef HAVE_DYNLINK_NVCUVID_HEADER */ - -/* NVIDIA Video Encoding API*/ -/* #undef HAVE_NVCUVENC */ - -/* OpenCL Support */ -/* #undef HAVE_OPENCL */ -/* #undef HAVE_OPENCL_STATIC */ -/* #undef HAVE_OPENCL_SVM */ - -/* NVIDIA OpenCL D3D Extensions support */ -/* #undef HAVE_OPENCL_D3D11_NV */ - -/* OpenEXR codec */ -/* #undef HAVE_OPENEXR */ - -/* OpenGL support*/ -/* #undef HAVE_OPENGL */ - -/* PNG codec */ -#define HAVE_PNG - -/* PNG codec */ -/* #undef HAVE_SPNG */ - -/* Posix threads (pthreads) */ -#define HAVE_PTHREAD - -/* parallel_for with pthreads */ -#define HAVE_PTHREADS_PF - -/* Intel Threading Building Blocks */ -/* #undef HAVE_TBB */ - -/* Ste||ar Group High Performance ParallelX */ -/* #undef HAVE_HPX */ - -/* TIFF codec */ -/* #undef HAVE_TIFF */ - -/* Define if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* VA library (libva) */ -/* #undef HAVE_VA */ - -/* Intel VA-API/OpenCL */ -/* #undef HAVE_VA_INTEL */ - -/* Lapack */ -/* #undef HAVE_LAPACK */ - -/* Library was compiled with functions instrumentation */ -/* #undef ENABLE_INSTRUMENTATION */ - -/* OpenCV trace utilities */ -#define OPENCV_TRACE - -/* The font "uni" (WQY MicroHei) is available */ -/* #undef HAVE_UNIFONT */ - -#endif // OPENCV_CVCONFIG_H_INCLUDED -]], - ["mcpp_generated/opencv2/opencv_modules.hpp"] = [[ -/* - * ** File generated automatically, do not modify ** - * - * This file defines the list of modules available in current build configuration - * - * -*/ - -// This definition means that OpenCV is built with enabled non-free code. -// For example, patented algorithms for non-profit/non-commercial use only. -/* #undef OPENCV_ENABLE_NONFREE */ - -#define HAVE_OPENCV_CORE -#define HAVE_OPENCV_FLANN -#define HAVE_OPENCV_GEOMETRY -#define HAVE_OPENCV_HIGHGUI -#define HAVE_OPENCV_IMGCODECS -#define HAVE_OPENCV_IMGPROC -#define HAVE_OPENCV_VIDEOIO - - -]], - ["mcpp_generated/opencv_data_config.hpp"] = [[ - -#define OPENCV_INSTALL_PREFIX "/usr/local" - -#define OPENCV_DATA_INSTALL_PATH "share/opencv5" - -#define OPENCV_BUILD_DIR "" - -#define OPENCV_DATA_BUILD_DIR_SEARCH_PATHS \ - "../opencv-5.0.0/" - -#define OPENCV_INSTALL_DATA_DIR_RELATIVE "../share/opencv5" -]], - ["mcpp_generated/tu_manifest.txt"] = [[ -jpeg12 3rdparty/libjpeg-turbo/src/jcapistd.c -jpeg12 3rdparty/libjpeg-turbo/src/jccolor.c -jpeg12 3rdparty/libjpeg-turbo/src/jcdiffct.c -jpeg12 3rdparty/libjpeg-turbo/src/jclossls.c -jpeg12 3rdparty/libjpeg-turbo/src/jcmainct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcprepct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcsample.c -jpeg12 3rdparty/libjpeg-turbo/src/jdapistd.c -jpeg12 3rdparty/libjpeg-turbo/src/jdcolor.c -jpeg12 3rdparty/libjpeg-turbo/src/jddiffct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdlossls.c -jpeg12 3rdparty/libjpeg-turbo/src/jdmainct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdpostct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdsample.c -jpeg12 3rdparty/libjpeg-turbo/src/jutils.c -jpeg12 3rdparty/libjpeg-turbo/src/jccoefct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcdctmgr.c -jpeg12 3rdparty/libjpeg-turbo/src/jdcoefct.c -jpeg12 3rdparty/libjpeg-turbo/src/jddctmgr.c -jpeg12 3rdparty/libjpeg-turbo/src/jdmerge.c -jpeg12 3rdparty/libjpeg-turbo/src/jfdctfst.c -jpeg12 3rdparty/libjpeg-turbo/src/jfdctint.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctflt.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctfst.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctint.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctred.c -jpeg12 3rdparty/libjpeg-turbo/src/jquant1.c -jpeg12 3rdparty/libjpeg-turbo/src/jquant2.c -jpeg16 3rdparty/libjpeg-turbo/src/jcapistd.c -jpeg16 3rdparty/libjpeg-turbo/src/jccolor.c -jpeg16 3rdparty/libjpeg-turbo/src/jcdiffct.c -jpeg16 3rdparty/libjpeg-turbo/src/jclossls.c -jpeg16 3rdparty/libjpeg-turbo/src/jcmainct.c -jpeg16 3rdparty/libjpeg-turbo/src/jcprepct.c -jpeg16 3rdparty/libjpeg-turbo/src/jcsample.c -jpeg16 3rdparty/libjpeg-turbo/src/jdapistd.c -jpeg16 3rdparty/libjpeg-turbo/src/jdcolor.c -jpeg16 3rdparty/libjpeg-turbo/src/jddiffct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdlossls.c -jpeg16 3rdparty/libjpeg-turbo/src/jdmainct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdpostct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdsample.c -jpeg16 3rdparty/libjpeg-turbo/src/jutils.c -?dnn mlasgemm modules/dnn/src/layers/cpu_kernels/mlas_threading.cpp -]], - }, - include_dirs = { - "mcpp_generated", - "*", - "*/3rdparty/dlpack/include", - "mcpp_generated/3rdparty/libjpeg-turbo", - "*/3rdparty/libjpeg-turbo/src", - "*/3rdparty/libjpeg-turbo/simd/nasm", - "*/3rdparty/libjpeg-turbo/simd/x86_64", - "mcpp_generated/3rdparty/zlib", - "*/3rdparty/zlib", - "*/modules/core/include", - "mcpp_generated/modules/core", - "*/modules/flann/include", - "mcpp_generated/modules/flann", - "*/modules/geometry/include", - "mcpp_generated/modules/geometry", - "*/modules/imgproc/include", - "mcpp_generated/modules/imgproc", - "*/3rdparty/mlas/inc", - "*/3rdparty/mlas/lib", - "*/modules/dnn/include", - "mcpp_generated/modules/dnn", - "*/modules/dnn/misc/caffe", - "*/modules/dnn/misc/tensorflow", - "*/modules/dnn/misc/onnx", - "*/modules/dnn/misc/tflite", - "*/3rdparty/flatbuffers/include", - "*/3rdparty/protobuf/src", - "*/3rdparty/libpng", - "*/modules/imgcodecs/include", - "mcpp_generated/modules/imgcodecs", - "*/modules/videoio/include", - "mcpp_generated/modules/videoio", - "*/modules/highgui/include", - "mcpp_generated/modules/highgui", - }, - ldflags = { "-lpthread", "-ldl" }, - sources = { - "*/3rdparty/libjpeg-turbo/simd/x86_64/jsimd.c", - [[ -*/3rdparty/libjpeg-turbo/src/{jaricom,jcapimin,jcapistd,jcarith,jccoefct,jccolor,jcdctmgr,jcdiffct,jchuff,jcicc,jcinit,jclhuff,jclossls,jcmainct,jcmarker,jcmaster,jcomapi,jcparam,jcphuff,jcprepct,jcsample,jctrans,jdapimin,jdapistd,jdarith,jdatadst,jdatasrc,jdcoefct,jdcolor,jddctmgr,jddiffct,jdhuff,jdicc,jdinput,jdlhuff,jdlossls,jdmainct,jdmarker,jdmaster,jdmerge,jdphuff,jdpostct,jdsample,jdtrans,jerror,jfdctflt,jfdctfst,jfdctint,jidctflt,jidctfst,jidctint,jidctred,jmemmgr,jmemnobs,jpeg_nbits,jquant1,jquant2,jutils}.c]], - "*/3rdparty/libpng/*.c", - "*/3rdparty/libpng/intel/*.c", - "*/3rdparty/zlib/*.c", - "*/modules/core/src/*.cpp", - "*/modules/core/src/opencl/runtime/*.cpp", - "*/modules/core/src/parallel/*.cpp", - "*/modules/core/src/utils/*.cpp", - "*/modules/flann/src/*.cpp", - "*/modules/geometry/src/*.cpp", - "*/modules/geometry/src/ptcloud/*.cpp", - "*/modules/geometry/src/usac/*.cpp", - "*/modules/highgui/src/{backend,roiSelector,window}.cpp", - "*/modules/imgcodecs/src/*.cpp", - [[ -*/modules/imgproc/src/{accum,accum.dispatch,bilateral_filter.dispatch,blend,box_filter.dispatch,canny,clahe,color,color_hsv.dispatch,color_lab,color_rgb.dispatch,color_yuv.dispatch,colormap,connectedcomponents,contours_approx,contours_common,contours_link,contours_new,contours_truco,corner,corner.avx,cornersubpix,demosaicing,deriv,distransform,drawing,drawing_text,emd_new,filter.dispatch,fisheye,floodfill,gabor,generalized_hough,grabcut,histogram,hough,imgwarp,imgwarp.avx2,imgwarp.sse4_1,lsd,main,median_blur.dispatch,morph.dispatch,phasecorr,phasecorr_iterative,pyramids,resize,resize.avx2,resize.sse4_1,samplers,segmentation,smooth.dispatch,spatialgradient,stackblur,stb_truetype,sumpixels.dispatch,tables,templmatch,thresh,undistort.dispatch,utils}.cpp]], - "*/modules/videoio/src/{backend_plugin,backend_static,cap,cap_ffmpeg,cap_images,cap_mjpeg_decoder,cap_mjpeg_encoder,cap_v4l,container_avi,videoio_registry}.cpp", - [[ -mcpp_generated/modules/core/{arithm.avx2,arithm.sse4_1,convert.avx2,convert_scale.avx2,count_non_zero.avx2,has_non_zero.avx2,mathfuncs_core.avx,mathfuncs_core.avx2,matmul.avx2,matmul.avx512_skx,matmul.sse4_1,mean.avx2,merge.avx2,minmax.avx2,minmax.sse4_1,nan_mask.avx2,norm.avx,norm.avx2,norm.sse4_1,reduce.avx2,split.avx2,stat.avx2,stat.sse4_2,sum.avx2,transpose.avx,transpose.avx2}.cpp]], - [[ -mcpp_generated/modules/imgproc/{accum.avx,accum.avx2,accum.sse4_1,bilateral_filter.avx2,bilateral_filter.avx512_skx,box_filter.avx2,box_filter.avx512_skx,box_filter.sse4_1,color_hsv.avx2,color_hsv.sse4_1,color_rgb.avx2,color_rgb.sse4_1,color_yuv.avx2,color_yuv.sse4_1,filter.avx2,filter.sse4_1,median_blur.avx2,median_blur.avx512_skx,median_blur.sse4_1,morph.avx2,morph.sse4_1,smooth.avx2,smooth.sse4_1,sumpixels.avx2,sumpixels.avx512_skx,undistort.avx2,warp_kernels.avx2,warp_kernels.sse4_1}.cpp]], - "*/3rdparty/libjpeg-turbo/simd/x86_64/jsimdcpu.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jfdctflt-sse.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jccolor-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jcgray-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jchuff-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jcphuff-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jcsample-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jdcolor-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jdmerge-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jdsample-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jfdctfst-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jfdctint-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jidctflt-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jidctfst-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jidctint-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jidctred-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jquantf-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jquanti-sse2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jccolor-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jcgray-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jcsample-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jdcolor-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jdmerge-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jdsample-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jfdctint-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jidctint-avx2.asm", - "*/3rdparty/libjpeg-turbo/simd/x86_64/jquanti-avx2.asm", - }, - }, - macosx = { - cflags = { "-w" }, - cxxflags = { "-w" }, - deps = { ["compat.ffmpeg"] = "8.1.2" }, - features = { - dnn = { - defines = { "HAVE_OPENCV_DNN" }, - flags = { - { - defines = { - "ENABLE_PLUGINS", - "HAVE_MLAS=1", - "HAVE_PROTOBUF=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/dnn/**", - }, - { - defines = { - "BUILD_MLAS_NO_ONNXRUNTIME=1", - "MLAS_GEMM_ONLY=1", - "MLAS_OPENCV_THREADING=1", - "NDEBUG", - "_GNU_SOURCE=1", - "_USE_MATH_DEFINES", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/3rdparty/mlas/**", - }, - { - defines = { - "BUILD_MLAS_NO_ONNXRUNTIME=1", - "MLAS_GEMM_ONLY=1", - "MLAS_OPENCV_THREADING=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/tu/mlasgemm/**", - }, - { - defines = { "HAVE_PTHREAD=1", "NDEBUG" }, - glob = "**/3rdparty/protobuf/**", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/int8layers/layers_common.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON_FP16" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon_fp16.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/dnn/layers/layers_common.neon.cpp", - }, - { - cxxflags = { "-include", "unistd.h" }, - glob = "*/3rdparty/mlas/lib/platform.cpp", - }, - }, - sources = { - "*/3rdparty/mlas/lib/*.cpp", - "*/3rdparty/mlas/lib/aarch64/*.S", - "*/3rdparty/protobuf/src/google/protobuf/*.cc", - "*/3rdparty/protobuf/src/google/protobuf/io/*.cc", - "*/3rdparty/protobuf/src/google/protobuf/stubs/*.cc", - "*/modules/dnn/misc/caffe/opencv-caffe.pb.cc", - "*/modules/dnn/misc/onnx/opencv-onnx.pb.cc", - "*/modules/dnn/misc/tensorflow/*.cc", - "*/modules/dnn/src/*.cpp", - "*/modules/dnn/src/caffe/caffe_io.cpp", - "*/modules/dnn/src/int8layers/*.cpp", - "*/modules/dnn/src/layers/*.cpp", - "*/modules/dnn/src/layers/cpu_kernels/*.cpp", - "*/modules/dnn/src/onnx/*.cpp", - "*/modules/dnn/src/tensorflow/*.cpp", - "*/modules/dnn/src/tflite/tflite_importer.cpp", - "*/modules/dnn/src/tokenizer/*.cpp", - "mcpp_generated/modules/dnn/int8layers/layers_common.neon.cpp", - "mcpp_generated/modules/dnn/layers/layers_common.neon.cpp", - [[ -mcpp_generated/modules/dnn/layers/cpu_kernels/{activation_kernels.neon,conv2_depthwise.neon,conv2_kernels.neon,conv_block.neon,conv_block.neon_fp16,conv_winograd_f63.neon,fast_gemm_kernels.neon,gridsample_kernels.neon,nary_eltwise_kernels.neon,reduce2_kernels.neon,transpose_kernels.neon}.cpp]], - "mcpp_generated/mlas_hgemm_stub.cpp", - }, - }, - }, - flags = { - { - defines = { - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "OPENCV_ALLOCATOR_STATS_COUNTER_TYPE=int", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/core/**", - }, - { - defines = { - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/flann/**", - }, - { - defines = { - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/geometry/**", - }, - { - defines = { - "ENABLE_PLUGINS", - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/highgui/**", - }, - { - defines = { - "HAVE_IMGCODEC_HDR", - "HAVE_IMGCODEC_PFM", - "HAVE_IMGCODEC_PXM", - "HAVE_IMGCODEC_SUNRASTER", - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/imgcodecs/**", - }, - { - defines = { - "HAVE_STDARG_H=1", - "HAVE_UNISTD_H=1", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/imgproc/**", - }, - { - defines = { "NDEBUG", "NEON_INTRINSICS", "NO_GETENV", "NO_PUTENV" }, - glob = "**/3rdparty/libjpeg-turbo/**", - }, - { - defines = { "BITS_IN_JSAMPLE=12", "NDEBUG", "NEON_INTRINSICS", "NO_GETENV", "NO_PUTENV" }, - glob = "**/tu/jpeg12/**", - }, - { - defines = { "BITS_IN_JSAMPLE=16", "NDEBUG", "NEON_INTRINSICS", "NO_GETENV", "NO_PUTENV" }, - glob = "**/tu/jpeg16/**", - }, - { - defines = { "HAVE_STDARG_H=1", "HAVE_UNISTD_H=1", "NDEBUG", "PNG_ARM_NEON_OPT=2" }, - glob = "**/3rdparty/libpng/**", - }, - { - defines = { - "ENABLE_PLUGINS", - "HAVE_FFMPEG", - "HAVE_FFMPEG_LIBAVDEVICE", - "NDEBUG", - "_USE_MATH_DEFINES", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/videoio/**", - }, - { - defines = { "HAVE_STDARG_H=1", "HAVE_UNISTD_H=1", "NDEBUG" }, - glob = "**/3rdparty/zlib/**", - }, - { - defines = { "HAVE_POSIX_MEMALIGN=1" }, - glob = "*/modules/core/src/alloc.cpp", - }, - { - defines = { "PARALLEL_ENABLE_PLUGINS=1" }, - glob = "*/modules/core/src/parallel/parallel.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/core/transpose.neon.cpp", - }, - { - defines = { "CV_CPU_DISPATCH_MODE=NEON" }, - glob = "mcpp_generated/modules/imgproc/warp_kernels.neon.cpp", - }, - }, - generated_files = { - ["build.mcpp"] = [[ -// build.mcpp for compat.opencv — consumer-side synthesis of OpenCV's -// build-time generated files from the frozen config snapshot. Embedded into -// pkgs/c/compat.opencv.lua by tools/compat-opencv5/gen_descriptor.py. -// -// What it does (all pure transforms of files already in the pinned tarball — -// nothing is downloaded, nothing depends on the host): -// 1. blob2hdr — modules/imgproc/fonts/*.ttf.gz → builtin_font_{sans,italic}.h -// (hex byte arrays; faithful port of cmake ocv_blob2hdr) -// 2. cl2cpp — modules//src/opencl/*.cl → opencl_kernels_.{cpp,hpp} -// (comment-strip + string-escape + md5; faithful port of -// cmake/cl2cpp.cmake; content is #ifdef HAVE_OPENCL-guarded -// and inert in this profile, kept byte-faithful anyway) -// 3. tu stubs — ONLY for the libjpeg-turbo BITS_IN_JSAMPLE=12/16 -// same-source re-compiles (one .c, three compiles — plain -// sources cannot express that), driven by -// mcpp_generated/tu_manifest.txt. Every other TU is a real -// tarball path in `sources` since mcpp 0.0.97 (#233/#234 -// fixed). Stub basenames are group-prefixed so jpeg12 and -// jpeg16 never collide (also dodges mcpp#239). -// The raw `mcpp:` stdout protocol is used (no `import mcpp;`) so this file -// has zero non-standard dependencies. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace fs = std::filesystem; - -// ── tiny MD5 (RFC 1321, public-domain style condensed implementation) ──── -namespace md5impl { -struct MD5 { - uint32_t a0 = 0x67452301, b0 = 0xefcdab89, c0 = 0x98badcfe, d0 = 0x10325476; - static const uint32_t K[64]; - static const uint32_t R[64]; - void block(const uint8_t* p) { - uint32_t M[16]; - for (int i = 0; i < 16; i++) - M[i] = (uint32_t)p[i*4] | ((uint32_t)p[i*4+1] << 8) | ((uint32_t)p[i*4+2] << 16) | ((uint32_t)p[i*4+3] << 24); - uint32_t A = a0, B = b0, C = c0, D = d0; - for (int i = 0; i < 64; i++) { - uint32_t F; int g; - if (i < 16) { F = (B & C) | (~B & D); g = i; } - else if (i < 32) { F = (D & B) | (~D & C); g = (5*i + 1) % 16; } - else if (i < 48) { F = B ^ C ^ D; g = (3*i + 5) % 16; } - else { F = C ^ (B | ~D); g = (7*i) % 16; } - F = F + A + K[i] + M[g]; - A = D; D = C; C = B; - B = B + ((F << R[i]) | (F >> (32 - R[i]))); - } - a0 += A; b0 += B; c0 += C; d0 += D; - } - static std::string hex(const std::string& data) { - MD5 m; - uint64_t bits = (uint64_t)data.size() * 8; - std::string buf = data; - buf.push_back((char)0x80); - while (buf.size() % 64 != 56) buf.push_back('\0'); - for (int i = 0; i < 8; i++) buf.push_back((char)((bits >> (8*i)) & 0xff)); - for (size_t o = 0; o < buf.size(); o += 64) m.block((const uint8_t*)buf.data() + o); - char out[33]; - uint32_t w[4] = { m.a0, m.b0, m.c0, m.d0 }; - for (int i = 0; i < 16; i++) - std::snprintf(out + 2*i, 3, "%02x", (w[i/4] >> (8*(i%4))) & 0xff); - return std::string(out, 32); - } -}; -const uint32_t MD5::K[64] = { - 0xd76aa478,0xe8c7b756,0x242070db,0xc1bdceee,0xf57c0faf,0x4787c62a,0xa8304613,0xfd469501, - 0x698098d8,0x8b44f7af,0xffff5bb1,0x895cd7be,0x6b901122,0xfd987193,0xa679438e,0x49b40821, - 0xf61e2562,0xc040b340,0x265e5a51,0xe9b6c7aa,0xd62f105d,0x02441453,0xd8a1e681,0xe7d3fbc8, - 0x21e1cde6,0xc33707d6,0xf4d50d87,0x455a14ed,0xa9e3e905,0xfcefa3f8,0x676f02d9,0x8d2a4c8a, - 0xfffa3942,0x8771f681,0x6d9d6122,0xfde5380c,0xa4beea44,0x4bdecfa9,0xf6bb4b60,0xbebfbc70, - 0x289b7ec6,0xeaa127fa,0xd4ef3085,0x04881d05,0xd9d4d039,0xe6db99e5,0x1fa27cf8,0xc4ac5665, - 0xf4292244,0x432aff97,0xab9423a7,0xfc93a039,0x655b59c3,0x8f0ccc92,0xffeff47d,0x85845dd1, - 0x6fa87e4f,0xfe2ce6e0,0xa3014314,0x4e0811a1,0xf7537e82,0xbd3af235,0x2ad7d2bb,0xeb86d391 }; -const uint32_t MD5::R[64] = { - 7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22, 5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20, - 4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23, 6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21 }; -} // namespace md5impl - -static std::string slurp(const fs::path& p) { - std::ifstream f(p, std::ios::binary); - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot read %s\n", p.string().c_str()); std::exit(1); } - std::ostringstream ss; ss << f.rdbuf(); return ss.str(); -} -static void spew(const fs::path& p, const std::string& content) { - fs::create_directories(p.parent_path()); - // only rewrite when changed: keeps ninja restat-friendly timestamps - if (fs::exists(p)) { - std::ifstream f(p, std::ios::binary); std::ostringstream ss; ss << f.rdbuf(); - if (ss.str() == content) return; - } - std::ofstream f(p, std::ios::binary); - f << content; - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot write %s\n", p.string().c_str()); std::exit(1); } -} - -// ── gunzip (raw inflate over the vendored zlib? not available here) ───── -// The .ttf.gz blobs are embedded AS-IS: cmake's ocv_blob2hdr hex-dumps the -// *compressed* file bytes (OpenCV decompresses at runtime via its zlib), so -// no inflate is needed here — just a hex dump. -static void blob2hdr(const fs::path& blob, const fs::path& hdr, const std::string& var) { - // byte-faithful port of cmake ocv_blob2hdr: 16 bytes per line, ", " - // separators, the very last ", " trimmed. - std::string data = slurp(blob); - std::ostringstream out; - out << "// Auto generated file.\nstatic const unsigned char " << var << "[] =\n{\n"; - char buf[8]; - for (size_t i = 0; i < data.size(); i++) { - std::snprintf(buf, sizeof buf, "0x%02x", (unsigned char)data[i]); - out << buf; - if (i + 1 != data.size()) out << ", "; - if (i % 16 == 15 && i + 1 != data.size()) out << "\n"; - } - out << "\n};\n"; - spew(hdr, out.str()); -} - -// ── cl2cpp (faithful port of cmake/cl2cpp.cmake) ──────────────────────── -static std::string cl_escape(std::string lines) { - std::string t; - // \r removal + trailing \n + tabs→2 spaces - for (char c : lines) if (c != '\r') t.push_back(c); - t.push_back('\n'); - std::string u; - for (char c : t) { if (c == '\t') u += " "; else u.push_back(c); } - // strip /* */ comments (non-greedy scan) - std::string v; v.reserve(u.size()); - for (size_t i = 0; i < u.size();) { - if (i + 1 < u.size() && u[i] == '/' && u[i+1] == '*') { - size_t e = u.find("*/", i + 2); - i = (e == std::string::npos) ? u.size() : e + 2; - } else v.push_back(u[i++]); - } - // strip // comments (with leading spaces) - std::string w; w.reserve(v.size()); - for (size_t i = 0; i < v.size();) { - if (i + 1 < v.size() && v[i] == '/' && v[i+1] == '/') { - while (!w.empty() && w.back() == ' ') w.pop_back(); - size_t e = v.find('\n', i); - i = (e == std::string::npos) ? v.size() : e; // keep the newline - } else w.push_back(v[i++]); - } - // collapse empty lines + leading whitespace per line - std::string x; x.reserve(w.size()); - for (size_t i = 0; i < w.size();) { - if (w[i] == '\n') { - x.push_back('\n'); - size_t j = i + 1; - while (j < w.size() && (w[j] == ' ' || w[j] == '\n')) { - if (w[j] == '\n') { i = j; } - j++; - } - // re-scan: skip spaces directly after newline, and fold newline runs - size_t k = i + 1; - while (k < w.size() && w[k] == ' ') k++; - while (k < w.size() && w[k] == '\n') { k++; i = k - 1; - while (k < w.size() && w[k] == ' ') k++; } - i = k; - } else x.push_back(w[i++]); - } - if (!x.empty() && x.front() == '\n') x.erase(0, 1); - // escape backslash, quote; newline → \n" " - std::string y; - for (char c : x) { - if (c == '\\') y += "\\\\"; - else if (c == '"') y += "\\\""; - else if (c == '\n') y += "\\n\"\n\""; - else y.push_back(c); - } - // drop unneeded trailing quote opener - if (y.size() >= 1 && y.back() == '"') y.pop_back(); - return y; -} - -static void cl2cpp(const fs::path& cl_dir, const fs::path& out_cpp, const fs::path& out_hpp, - const std::string& module_name) { - std::vector cls; - for (auto& e : fs::directory_iterator(cl_dir)) - if (e.path().extension() == ".cl") cls.push_back(e.path()); - std::sort(cls.begin(), cls.end()); - std::string ns = module_name; - if (!ns.empty() && ns[0] >= '0' && ns[0] <= '9') ns = "_" + ns; - std::ostringstream cpp, hpp; - cpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core.hpp\"\n" - << "#include \"cvconfig.h\"\n#include \"" << out_hpp.filename().string() << "\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns - << "\n{\n\nstatic const char* const moduleName = \"" << module_name << "\";\n\n"; - hpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core/ocl.hpp\"\n" - << "#include \"opencv2/core/ocl_genbase.hpp\"\n#include \"opencv2/core/opencl/ocl_defs.hpp\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns << "\n{\n\n"; - for (auto& cl : cls) { - std::string name = cl.stem().string(); - std::string body = cl_escape(slurp(cl)); - std::string hash = md5impl::MD5::hex(body); - cpp << "struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc={moduleName, \"" << name - << "\",\n\"" << body << ", \"" << hash << "\", NULL};\n"; - hpp << "extern struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc;\n"; - } - cpp << "\n}}}\n#endif\n"; - hpp << "\n}}}\n#endif\n"; - spew(out_cpp, cpp.str()); - spew(out_hpp, hpp.str()); -} - -int main() { - const char* man_env = std::getenv("MCPP_MANIFEST_DIR"); - const char* out_env = std::getenv("MCPP_OUT_DIR"); - fs::path man = man_env ? man_env : "."; - if (!out_env) { std::fprintf(stderr, "compat.opencv build.mcpp: MCPP_OUT_DIR unset (mcpp >= 0.0.95 required)\n"); return 1; } - fs::path out = out_env; - fs::path gen = man / "mcpp_generated"; - - // the extracted official tarball wrap dir (opencv-/) - fs::path wrap; - for (auto& e : fs::directory_iterator(man)) { - if (e.is_directory() && e.path().filename().string().rfind("opencv-", 0) == 0 - && fs::exists(e.path() / "modules")) { wrap = e.path(); break; } - } - if (wrap.empty()) { std::fprintf(stderr, "compat.opencv build.mcpp: opencv-* source dir not found under %s\n", man.string().c_str()); return 1; } - - // 1. fonts - blob2hdr(wrap / "modules/imgproc/fonts/Rubik.ttf.gz", out / "builtin_font_sans.h", "OcvBuiltinFontSans"); - blob2hdr(wrap / "modules/imgproc/fonts/Rubik-Italic.ttf.gz", out / "builtin_font_italic.h", "OcvBuiltinFontItalic"); - - // 1b. unifont feature: hex-embed the CJK font pulled in by the - // compat.opencv-unifont dependency. Its raw .gz payload is parked by - // the installer in a shared runtimedir whose location relative to any - // one package shifted across xlings store layouts (0.4.62 -> 0.4.67, - // mcpp 0.0.99), which is why a fixed `/xpkgs// -> - // /runtimedir` hop broke. Anchor instead on the authoritative - // per-dep dir contract (mcpp#241: MCPP_DEP__DIR, emitted under - // both the canonical name and the namespace-stripped short name) and - // walk up probing runtimedir/ at every level; fall back to this - // package's own store location + a bounded search so older mcpp - // (pre-#241) and future layout shifts still resolve. - if (std::getenv("MCPP_FEATURE_UNIFONT")) { - const char* fname = "WenQuanYiMicroHei.ttf.gz"; - fs::path font; - std::error_code ec; - auto probe = [&](const fs::path& base) -> fs::path { - if (base.empty()) return {}; - for (const fs::path& c : { base / fname, - base / "runtimedir" / fname, - base / "data" / "runtimedir" / fname }) - if (fs::exists(c)) return c; - return {}; - }; - std::vector anchors; - if (const char* d = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - if (const char* d = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - anchors.push_back(man); - if (const char* d = std::getenv("MCPP_OUT_DIR")) anchors.emplace_back(d); - // walk up from each anchor, probing runtimedir/ at every level - for (const auto& a : anchors) { - for (fs::path p = a; !p.empty(); p = p.parent_path()) { - if (auto hit = probe(p); !hit.empty()) { font = hit; break; } - if (p == p.root_path()) break; - } - if (!font.empty()) break; - } - // fallback: sweep any opencv-unifont verdir near this package's store dir - if (font.empty()) { - for (auto& e : fs::directory_iterator(man.parent_path().parent_path(), ec)) { - if (e.path().filename().string().find("opencv-unifont") == std::string::npos) continue; - for (auto& v : fs::recursive_directory_iterator(e.path(), ec)) - if (v.path().filename() == fname) { font = v.path(); break; } - if (!font.empty()) break; - } - } - // last resort: bounded recursive search from the nearest store root - if (font.empty()) { - for (const auto& a : anchors) { - fs::path root = a; - for (int up = 0; up < 8 && root.has_parent_path(); ++up) { - if (fs::exists(root / "runtimedir") || fs::exists(root / "xpkgs") - || root.filename() == "data") break; - root = root.parent_path(); - } - long budget = 400000; - for (auto it = fs::recursive_directory_iterator(root, - fs::directory_options::skip_permission_denied, ec); - it != fs::recursive_directory_iterator() && budget-- > 0; it.increment(ec)) { - if (ec) { ec.clear(); continue; } - if (it->path().filename() == fname) { font = it->path(); break; } - } - if (!font.empty()) break; - } - } - if (font.empty()) { - const char* e1 = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR"); - const char* e2 = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR"); - const char* e3 = std::getenv("MCPP_OUT_DIR"); - std::fprintf(stderr, "compat.opencv build.mcpp: unifont feature on but %s not found.\n" - " MCPP_MANIFEST_DIR=%s\n MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR=%s\n" - " MCPP_DEP_OPENCV_UNIFONT_DIR=%s\n MCPP_OUT_DIR=%s\n", - fname, man.string().c_str(), - e1 ? e1 : "(unset)", e2 ? e2 : "(unset)", e3 ? e3 : "(unset)"); - return 1; - } - blob2hdr(font, out / "builtin_font_uni.h", "OcvBuiltinFontUni"); - std::printf("compat.opencv build.mcpp: unifont embedded from %s\n", font.string().c_str()); - } - - // 2. OpenCL kernel embeddings (inert under this profile, byte-faithful) - for (std::string m : { "core", "imgproc", "geometry" }) { - fs::path cl_dir = wrap / "modules" / m / "src" / "opencl"; - if (fs::exists(cl_dir)) - cl2cpp(cl_dir, out / ("clsrc/opencl_kernels_" + m + ".cpp"), - out / ("opencl_kernels_" + m + ".hpp"), m); - } - - // 3. jpeg12/jpeg16 re-compile stubs from the manifest - // line grammar: [?] - // (group-prefixed filename => unique basenames across groups; a - // leading ? guard skips the stub unless MCPP_FEATURE_=1) - std::ifstream mf(gen / "tu_manifest.txt"); - if (!mf) { std::fprintf(stderr, "compat.opencv build.mcpp: mcpp_generated/tu_manifest.txt missing\n"); return 1; } - std::string line; - int stubs = 0; - while (std::getline(mf, line)) { - if (line.empty() || line[0] == '#') continue; - if (line[0] == '?') { - size_t g = line.find('\t'); - if (g == std::string::npos) continue; - std::string feat = line.substr(1, g - 1); - for (char& c : feat) c = (c >= 'a' && c <= 'z') ? char(c - 32) : c; - if (!std::getenv(("MCPP_FEATURE_" + feat).c_str())) continue; - line = line.substr(g + 1); - } - size_t t = line.find('\t'); - if (t == std::string::npos) continue; - std::string grp = line.substr(0, t); - std::string target = line.substr(t + 1); - std::string mangled = grp + "_" + target; - for (char& c : mangled) if (c == '/') c = '_'; - fs::path stub = out / "tu" / grp / mangled; - std::string content = "/* compat.opencv " + grp + " re-compile TU */\n" - "#include \"" + target + "\"\n"; - spew(stub, content); - std::printf("mcpp:generated=%s\n", stub.string().c_str()); - stubs++; - } - - // out/ carries builtin_font_*.h, opencl_kernels_*.hpp, clsrc/ includes - std::printf("mcpp:cxxflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:cflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:rerun-if-changed=%s\n", (gen / "tu_manifest.txt").string().c_str()); - // diagnostics as a non-directive stdout line: stderr writes can interleave - // into the (buffered) stdout directive stream and corrupt a directive. - std::printf("compat.opencv build.mcpp: %d jpeg12/16 stubs, fonts + CL kernels synthesized\n", stubs); - std::fflush(stdout); - return 0; -} -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jconfig.h"] = [[ -/* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". - */ -#define JPEG_LIB_VERSION 70 - -/* libjpeg-turbo version */ -#define LIBJPEG_TURBO_VERSION 3.1.2 - -/* libjpeg-turbo version in integer form */ -#define LIBJPEG_TURBO_VERSION_NUMBER 3001002 - -/* Support arithmetic encoding when using 8-bit samples */ -#define C_ARITH_CODING_SUPPORTED 1 - -/* Support arithmetic decoding when using 8-bit samples */ -#define D_ARITH_CODING_SUPPORTED 1 - -/* Support in-memory source/destination managers */ -#define MEM_SRCDST_SUPPORTED 1 - -/* Use accelerated SIMD routines when using 8-bit samples */ -#define WITH_SIMD 1 - -/* This version of libjpeg-turbo supports run-time selection of data precision, - * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build - * time. However, some downstream software expects the macro to be defined. - * Since 12-bit data precision is an opt-in feature that requires explicitly - * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data - * types, the unmodified portion of the libjpeg API still behaves as if it were - * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data - * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. - */ -#ifndef BITS_IN_JSAMPLE -#define BITS_IN_JSAMPLE 8 -#endif - -#ifdef _WIN32 - -#undef RIGHT_SHIFT_IS_UNSIGNED - -/* Define "boolean" as unsigned char, not int, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - -/* Define "INT32" as int, not long, per Windows custom */ -#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ -typedef short INT16; -typedef signed int INT32; -#endif -#define XMD_H /* prevent jmorecfg.h from redefining it */ - -#else - -/* Define if your (broken) compiler shifts signed values as if they were - unsigned. */ -/* #undef RIGHT_SHIFT_IS_UNSIGNED */ - -#endif -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jconfigint.h"] = [[ -/* libjpeg-turbo build number */ -#define BUILD "opencv-5.0.0-libjpeg-turbo" - -/* How to hide global symbols. */ -#define HIDDEN - -/* Compiler's inline keyword */ -#undef inline - -/* How to obtain function inlining. */ -#define INLINE - -/* How to obtain thread-local storage */ -#define THREAD_LOCAL - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "OpenCV" - -/* Version number of package */ -#define VERSION "3.1.2" - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */ -/* #undef HAVE_BUILTIN_CTZL */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTRIN_H */ - -#if defined(_MSC_VER) && defined(HAVE_INTRIN_H) -#if (SIZEOF_SIZE_T == 8) -#define HAVE_BITSCANFORWARD64 -#elif (SIZEOF_SIZE_T == 4) -#define HAVE_BITSCANFORWARD -#endif -#endif - -#if defined(__has_attribute) -#if __has_attribute(fallthrough) -#define FALLTHROUGH __attribute__((fallthrough)); -#else -#define FALLTHROUGH -#endif -#else -#define FALLTHROUGH -#endif - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - */ - -#ifndef BITS_IN_JSAMPLE -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ -#endif - -#undef C_ARITH_CODING_SUPPORTED -#undef D_ARITH_CODING_SUPPORTED -#undef WITH_SIMD - -#if BITS_IN_JSAMPLE == 8 - -/* Support arithmetic encoding */ -#define C_ARITH_CODING_SUPPORTED 1 - -/* Support arithmetic decoding */ -#define D_ARITH_CODING_SUPPORTED 1 - -/* Use accelerated SIMD routines. */ -#define WITH_SIMD 1 - -#endif -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jversion.h"] = [[ -/* - * jversion.h - * - * This file was part of the Independent JPEG Group's software: - * Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding. - * libjpeg-turbo Modifications: - * Copyright (C) 2010, 2012-2024, D. R. Commander. - * For conditions of distribution and use, see the accompanying README.ijg - * file. - * - * This file contains software version identification. - */ - - -#if JPEG_LIB_VERSION >= 80 - -#define JVERSION "8d 15-Jan-2012" - -#elif JPEG_LIB_VERSION >= 70 - -#define JVERSION "7 27-Jun-2009" - -#else - -#define JVERSION "6b 27-Mar-1998" - -#endif - -/* - * NOTE: It is our convention to place the authors in the following order: - * - libjpeg-turbo authors (2009-) in descending order of the date of their - * most recent contribution to the project, then in ascending order of the - * date of their first contribution to the project, then in alphabetical - * order - * - Upstream authors in descending order of the date of the first inclusion of - * their code - */ - -#define JCOPYRIGHT1 \ - "Copyright (C) 2009-2024 D. R. Commander\n" \ - "Copyright (C) 2015, 2020 Google, Inc.\n" \ - "Copyright (C) 2019-2020 Arm Limited\n" \ - "Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \ - "Copyright (C) 2011-2016 Siarhei Siamashka\n" \ - "Copyright (C) 2015 Intel Corporation\n" -#define JCOPYRIGHT2 \ - "Copyright (C) 2013-2014 Linaro Limited\n" \ - "Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \ - "Copyright (C) 2009, 2012 Pierre Ossman for Cendio AB\n" \ - "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \ - "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \ - "Copyright (C) 1999 Ken Murchison\n" \ - "Copyright (C) 1991-2020 Thomas G. Lane, Guido Vollbeding\n" - -#define JCOPYRIGHT_SHORT \ - "Copyright (C) 1991-2025 The libjpeg-turbo Project and many others" -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/simd/arm/neon-compat.h"] = [[ -/* - * Copyright (C) 2020, 2024, D. R. Commander. All Rights Reserved. - * Copyright (C) 2020-2021, Arm Limited. All Rights Reserved. - * - * This software is provided 'as-is', without any express or implied - * warranty. In no event will the authors be held liable for any damages - * arising from the use of this software. - * - * Permission is granted to anyone to use this software for any purpose, - * including commercial applications, and to alter it and redistribute it - * freely, subject to the following restrictions: - * - * 1. The origin of this software must not be misrepresented; you must not - * claim that you wrote the original software. If you use this software - * in a product, an acknowledgment in the product documentation would be - * appreciated but is not required. - * 2. Altered source versions must be plainly marked as such, and must not be - * misrepresented as being the original software. - * 3. This notice may not be removed or altered from any source distribution. - */ - -#define HAVE_VLD1_S16_X3 -#define HAVE_VLD1_U16_X2 -#define HAVE_VLD1Q_U8_X4 - -/* Define compiler-independent count-leading-zeros and byte-swap macros */ -#if defined(_MSC_VER) && !defined(__clang__) -#define BUILTIN_CLZ(x) _CountLeadingZeros(x) -#define BUILTIN_CLZLL(x) _CountLeadingZeros64(x) -#define BUILTIN_BSWAP64(x) _byteswap_uint64(x) -#elif defined(__clang__) || defined(__GNUC__) -#define BUILTIN_CLZ(x) __builtin_clz(x) -#define BUILTIN_CLZLL(x) __builtin_clzll(x) -#define BUILTIN_BSWAP64(x) __builtin_bswap64(x) -#else -#error "Unknown compiler" -#endif - -#if defined(__clang__) -#pragma clang diagnostic ignored "-Wdeclaration-after-statement" -#pragma clang diagnostic ignored "-Wc99-extensions" -#elif defined(__GNUC__) -#pragma GCC diagnostic ignored "-Wdeclaration-after-statement" -#pragma GCC diagnostic ignored "-Wpedantic" -#endif -]], - ["mcpp_generated/3rdparty/zlib/zconf.h"] = [[ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compress_z z_compress_z -# define compress2_z z_compress2_z -# define compressBound z_compressBound -# define compressBound_z z_compressBound_z -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_combine_gen z_crc32_combine_gen -# define crc32_combine_gen64 z_crc32_combine_gen64 -# define crc32_combine_op z_crc32_combine_op -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateBound_z z_deflateBound_z -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflateUsed z_deflateUsed -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# define inflate_fixed z_inflate_fixed -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# define uncompress_z z_uncompress_z -# define uncompress2_z z_uncompress2_z -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#ifndef z_const -# ifdef ZLIB_CONST -# define z_const const -# else -# define z_const -# endif -#endif - -#ifdef Z_SOLO -# ifdef _WIN64 - typedef unsigned long long z_size_t; -# else - typedef unsigned long z_size_t; -# endif -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#ifndef Z_HAVE_UNISTD_H -# if defined(__WATCOMC__) || defined(__GO32__) || \ - (defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)) -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#elif defined(__MINGW32__) -# define z_off64_t long long -#elif defined(_WIN32) && !defined(__GNUC__) -# define z_off64_t __int64 -#elif defined(__GO32__) -# define z_off64_t offset_t -#else -# define z_off64_t z_off_t -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ -]], - ["mcpp_generated/custom_hal.hpp"] = [[ -#ifndef _CUSTOM_HAL_INCLUDED_ -#define _CUSTOM_HAL_INCLUDED_ - - - -#endif -]], - ["mcpp_generated/cv_cpu_config.h"] = [[ -// OpenCV CPU baseline features - -#define CV_CPU_COMPILE_NEON 1 -#define CV_CPU_BASELINE_COMPILE_NEON 1 - -#define CV_CPU_COMPILE_FP16 1 -#define CV_CPU_BASELINE_COMPILE_FP16 1 - -#define CV_CPU_COMPILE_NEON_DOTPROD 1 -#define CV_CPU_BASELINE_COMPILE_NEON_DOTPROD 1 - -#define CV_CPU_COMPILE_NEON_FP16 1 -#define CV_CPU_BASELINE_COMPILE_NEON_FP16 1 - -#define CV_CPU_BASELINE_FEATURES 0 \ - , CV_CPU_NEON \ - , CV_CPU_FP16 \ - , CV_CPU_NEON_DOTPROD \ - , CV_CPU_NEON_FP16 \ - - -// OpenCV supported CPU dispatched features - -#define CV_CPU_DISPATCH_COMPILE_NEON_BF16 1 - - -#define CV_CPU_DISPATCH_FEATURES 0 \ - , CV_CPU_NEON_BF16 \ - -]], - ["mcpp_generated/cvconfig.h"] = [[ -#ifndef OPENCV_CVCONFIG_H_INCLUDED -#define OPENCV_CVCONFIG_H_INCLUDED - -/* OpenCV compiled as static or dynamic libs */ -/* #undef BUILD_SHARED_LIBS */ - -/* OpenCV intrinsics optimized code */ -#define CV_ENABLE_INTRINSICS - -/* OpenCV additional optimized code */ -/* #undef CV_DISABLE_OPTIMIZATION */ - -/* Compile for 'real' NVIDIA GPU architectures */ -#define CUDA_ARCH_BIN "" - -/* NVIDIA GPU features are used */ -#define CUDA_ARCH_FEATURES "" - -/* Compile for 'virtual' NVIDIA PTX architectures */ -#define CUDA_ARCH_PTX "" - -/* AMD's Basic Linear Algebra Subprograms Library*/ -/* #undef HAVE_CLAMDBLAS */ - -/* AMD's OpenCL Fast Fourier Transform Library*/ -/* #undef HAVE_CLAMDFFT */ - -/* Clp support */ -/* #undef HAVE_CLP */ - -/* NVIDIA CUDA Runtime API*/ -/* #undef HAVE_CUDA */ - -/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/ -/* #undef HAVE_CUBLAS */ - -/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/ -/* #undef HAVE_CUDNN */ - -/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/ -/* #undef HAVE_CUFFT */ - -/* DirectX */ -/* #undef HAVE_DIRECTX */ -/* #undef HAVE_DIRECTX_NV12 */ -/* #undef HAVE_D3D11 */ -/* #undef HAVE_D3D10 */ -/* #undef HAVE_D3D9 */ - -/* Eigen Matrix & Linear Algebra Library */ -/* #undef HAVE_EIGEN */ - -/* Geospatial Data Abstraction Library */ -/* #undef HAVE_GDAL */ - -/* Vulkan support */ -/* #undef HAVE_VULKAN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Intel Integrated Performance Primitives */ -/* #undef HAVE_IPP */ -/* #undef HAVE_IPP_ICV */ -/* #undef HAVE_IPP_IW */ -/* #undef HAVE_IPP_IW_LL */ - -/* JPEG-2000 codec */ -/* #undef HAVE_OPENJPEG */ -/* #undef HAVE_JASPER */ - -/* AVIF codec */ -/* #undef HAVE_AVIF */ - -/* IJG JPEG codec */ -#define HAVE_JPEG - -/* JPEG XL codec */ -/* #undef HAVE_JPEGXL */ - -/* GDCM DICOM codec */ -/* #undef HAVE_GDCM */ - -/* NVIDIA Video Decoding API*/ -/* #undef HAVE_NVCUVID */ -/* #undef HAVE_NVCUVID_HEADER */ -/* #undef HAVE_DYNLINK_NVCUVID_HEADER */ - -/* NVIDIA Video Encoding API*/ -/* #undef HAVE_NVCUVENC */ - -/* OpenCL Support */ -/* #undef HAVE_OPENCL */ -/* #undef HAVE_OPENCL_STATIC */ -/* #undef HAVE_OPENCL_SVM */ - -/* NVIDIA OpenCL D3D Extensions support */ -/* #undef HAVE_OPENCL_D3D11_NV */ - -/* OpenEXR codec */ -/* #undef HAVE_OPENEXR */ - -/* OpenGL support*/ -/* #undef HAVE_OPENGL */ - -/* PNG codec */ -#define HAVE_PNG - -/* PNG codec */ -/* #undef HAVE_SPNG */ - -/* Posix threads (pthreads) */ -#define HAVE_PTHREAD - -/* parallel_for with pthreads */ -#define HAVE_PTHREADS_PF - -/* Intel Threading Building Blocks */ -/* #undef HAVE_TBB */ - -/* Ste||ar Group High Performance ParallelX */ -/* #undef HAVE_HPX */ - -/* TIFF codec */ -/* #undef HAVE_TIFF */ - -/* Define if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* VA library (libva) */ -/* #undef HAVE_VA */ - -/* Intel VA-API/OpenCL */ -/* #undef HAVE_VA_INTEL */ - -/* Lapack */ -/* #undef HAVE_LAPACK */ - -/* Library was compiled with functions instrumentation */ -/* #undef ENABLE_INSTRUMENTATION */ - -/* OpenCV trace utilities */ -#define OPENCV_TRACE - -/* The font "uni" (WQY MicroHei) is available */ -/* #undef HAVE_UNIFONT */ - -#endif // OPENCV_CVCONFIG_H_INCLUDED -]], - ["mcpp_generated/mlas_hgemm_stub.cpp"] = [[ -// compat.opencv curated stub: the vendored mlas subset declares and -// calls MlasHGemmSupported but does not vendor its definition (it -// lives in onnxruntime's full mlas). False = fp16 HGemm unsupported, -// which is the truth for this subset; callers fall back. -#include "mlas.h" -bool MLASCALL MlasHGemmSupported(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE) { return false; } -]], - ["mcpp_generated/modules/core/arithm.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/arithm.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/arithm.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/convert.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/convert.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/convert_scale.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/convert_scale.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/count_non_zero.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/count_non_zero.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/has_non_zero.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/has_non_zero.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/mathfuncs_core.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/mathfuncs_core.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.avx512_skx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/matmul.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/matmul.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/mean.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/mean.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/merge.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/merge.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/minmax.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/minmax.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/nan_mask.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/nan_mask.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/norm.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/norm.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/reduce.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/reduce.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.ssse3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/split.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/split.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/split.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/split.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/split.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/stat.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/stat.sse4_2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/sum.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/sum.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.fp16.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin128.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE3 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSSE3 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE4_2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE FP16 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, FP16, AVX, SSE4_2, SSE4_1, SSSE3, SSE3, SSE2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse3.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse4_1.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse4_2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.ssse3.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.avx2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.lasx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin256.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/test/test_intrin512.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin512.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin512.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin512.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/transpose.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.neon.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.rvv.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/transpose.simd.hpp" -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/version_string.inc"] = [[ -"\n" -"General configuration for OpenCV 5.0.0 =====================================\n" -" Version control: 1b4f1e2\n" -"\n" -" Platform:\n" -" Timestamp: 2026-07-20T12:12:35Z\n" -" Host: Darwin 24.6.0 arm64\n" -" CMake: 4.4.0\n" -" CMake generator: Ninja\n" -" CMake build tool: /opt/homebrew/bin/ninja\n" -" Configuration: Release\n" -" Algorithm Hint: ALGO_HINT_ACCURATE\n" -"\n" -" CPU/HW features:\n" -" Baseline: NEON FP16 NEON_DOTPROD NEON_FP16\n" -" requested: DETECT\n" -" Dispatched code generation: NEON_BF16\n" -" requested: NEON_FP16 NEON_BF16 NEON_DOTPROD\n" -" NEON_BF16 (0 files): + NEON_BF16\n" -"\n" -" C/C++:\n" -" Built as dynamic libs?: NO\n" -" C++ standard: 17\n" -" C++ Compiler: /usr/bin/c++ (ver 17.0.0.17000013)\n" -" C++ flags (Release): -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" -" C++ flags (Debug): -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG\n" -" C Compiler: /usr/bin/cc\n" -" C flags (Release): -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -O3 -DNDEBUG -DNDEBUG\n" -" C flags (Debug): -fsigned-char -W -Wall -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -fdiagnostics-show-option -Qunused-arguments -Wno-semicolon-before-method-body -ffunction-sections -fdata-sections -fvisibility=hidden -fvisibility-inlines-hidden -g -O0 -DDEBUG -D_DEBUG\n" -" Linker flags (Release): -Wl,-dead_strip \n" -" Linker flags (Debug): -Wl,-dead_strip \n" -" ccache: NO\n" -" Precompiled headers: NO\n" -" Extra dependencies: -framework AppKit\n" -" 3rdparty dependencies: libprotobuf libjpeg-turbo libpng zlib\n" -"\n" -" OpenCV modules:\n" -" To be built: core dnn flann geometry highgui imgcodecs imgproc videoio\n" -" Disabled: python3 world\n" -" Disabled by dependency: calib features java_bindings_generator js_bindings_generator objc_bindings_generator objdetect photo ptcloud python_bindings_generator python_tests stereo stitching video\n" -" Unavailable: java ts\n" -" Applications: -\n" -" Documentation: NO\n" -" Non-free algorithms: NO\n" -"\n" -" GUI: NONE\n" -" VTK support: NO\n" -"\n" -" Media I/O: \n" -" ZLib: build (ver 1.3.2)\n" -" JPEG: build-libjpeg-turbo (ver 3.1.2-70)\n" -" SIMD Support Request: YES\n" -" SIMD Support: YES\n" -" PNG: build (ver 1.6.57)\n" -" SIMD Support Request: YES\n" -" SIMD Support: YES (Arm NEON)\n" -" Metadata Support: EXIF XMP ICC cICP\n" -" GIF: NO\n" -" HDR: YES\n" -" SUNRASTER: YES\n" -" PXM: YES\n" -" PFM: YES\n" -"\n" -" Video I/O:\n" -" FFMPEG: YES\n" -" avcodec: YES (62.28.102)\n" -" avformat: YES (62.12.102)\n" -" avutil: YES (60.26.102)\n" -" swscale: YES (9.5.102)\n" -" avdevice: YES (62.3.102)\n" -" Orbbec: NO\n" -"\n" -" Parallel framework: GCD\n" -"\n" -" Trace: YES (built-in)\n" -"\n" -" Other third-party libraries:\n" -" DNN MLAS: YES (SGEMM-only, vendored)\n" -" ASM kernels: YES (ARM64: NEON SGEMM, NEON SGEMV)\n" -" Custom HAL: NO\n" -" Protobuf: build (3.19.1)\n" -"\n" -" ONNX Runtime: NO\n" -"\n" -" Python (for build): /opt/homebrew/bin/python3\n" -"\n" -" Install to: /usr/local\n" -"-----------------------------------------------------------------\n" -"\n" -]], - ["mcpp_generated/modules/dnn/int8layers/conv2_int8_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/conv2_int8_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/conv2_int8_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/int8layers/conv2_int8_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.avx512_skx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/int8layers/layers_common.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, LASX, RVV, AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON_FP16 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON_FP16, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx512_skx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/layers_common.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SVE -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL SVE, NEON, LASX, RVV, AVX512_SKX, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/layers_common.sve.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/highgui/opencv_highgui_config.hpp"] = [[ -// Auto-generated file -#define OPENCV_HIGHGUI_BUILTIN_BACKEND_STR "NONE" - -#define OPENCV_HIGHGUI_WITHOUT_BUILTIN_BACKEND 1 -]], - ["mcpp_generated/modules/imgproc/accum.avx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/accum.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/accum.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/accum.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/accum.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/bilateral_filter.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/box_filter.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/box_filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_hsv.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_hsv.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_rgb.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_rgb.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_yuv.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_yuv.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/filter.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/median_blur.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/median_blur.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/morph.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/morph.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/smooth.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/smooth.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/sumpixels.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/sumpixels.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/undistort.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/undistort.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/undistort.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/undistort.simd.hpp" -#define CV_CPU_DISPATCH_MODES_ALL BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/undistort.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/undistort.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.lasx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.neon.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.neon_fp16.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.rvv.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/warp_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/warp_kernels.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/opencv2/cvconfig.h"] = [[ -#ifndef OPENCV_CVCONFIG_H_INCLUDED -#define OPENCV_CVCONFIG_H_INCLUDED - -/* OpenCV compiled as static or dynamic libs */ -/* #undef BUILD_SHARED_LIBS */ - -/* OpenCV intrinsics optimized code */ -#define CV_ENABLE_INTRINSICS - -/* OpenCV additional optimized code */ -/* #undef CV_DISABLE_OPTIMIZATION */ - -/* Compile for 'real' NVIDIA GPU architectures */ -#define CUDA_ARCH_BIN "" - -/* NVIDIA GPU features are used */ -#define CUDA_ARCH_FEATURES "" - -/* Compile for 'virtual' NVIDIA PTX architectures */ -#define CUDA_ARCH_PTX "" - -/* AMD's Basic Linear Algebra Subprograms Library*/ -/* #undef HAVE_CLAMDBLAS */ - -/* AMD's OpenCL Fast Fourier Transform Library*/ -/* #undef HAVE_CLAMDFFT */ - -/* Clp support */ -/* #undef HAVE_CLP */ - -/* NVIDIA CUDA Runtime API*/ -/* #undef HAVE_CUDA */ - -/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/ -/* #undef HAVE_CUBLAS */ - -/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/ -/* #undef HAVE_CUDNN */ - -/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/ -/* #undef HAVE_CUFFT */ - -/* DirectX */ -/* #undef HAVE_DIRECTX */ -/* #undef HAVE_DIRECTX_NV12 */ -/* #undef HAVE_D3D11 */ -/* #undef HAVE_D3D10 */ -/* #undef HAVE_D3D9 */ - -/* Eigen Matrix & Linear Algebra Library */ -/* #undef HAVE_EIGEN */ - -/* Geospatial Data Abstraction Library */ -/* #undef HAVE_GDAL */ - -/* Vulkan support */ -/* #undef HAVE_VULKAN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Intel Integrated Performance Primitives */ -/* #undef HAVE_IPP */ -/* #undef HAVE_IPP_ICV */ -/* #undef HAVE_IPP_IW */ -/* #undef HAVE_IPP_IW_LL */ - -/* JPEG-2000 codec */ -/* #undef HAVE_OPENJPEG */ -/* #undef HAVE_JASPER */ - -/* AVIF codec */ -/* #undef HAVE_AVIF */ - -/* IJG JPEG codec */ -#define HAVE_JPEG - -/* JPEG XL codec */ -/* #undef HAVE_JPEGXL */ - -/* GDCM DICOM codec */ -/* #undef HAVE_GDCM */ - -/* NVIDIA Video Decoding API*/ -/* #undef HAVE_NVCUVID */ -/* #undef HAVE_NVCUVID_HEADER */ -/* #undef HAVE_DYNLINK_NVCUVID_HEADER */ - -/* NVIDIA Video Encoding API*/ -/* #undef HAVE_NVCUVENC */ - -/* OpenCL Support */ -/* #undef HAVE_OPENCL */ -/* #undef HAVE_OPENCL_STATIC */ -/* #undef HAVE_OPENCL_SVM */ - -/* NVIDIA OpenCL D3D Extensions support */ -/* #undef HAVE_OPENCL_D3D11_NV */ - -/* OpenEXR codec */ -/* #undef HAVE_OPENEXR */ - -/* OpenGL support*/ -/* #undef HAVE_OPENGL */ - -/* PNG codec */ -#define HAVE_PNG - -/* PNG codec */ -/* #undef HAVE_SPNG */ - -/* Posix threads (pthreads) */ -#define HAVE_PTHREAD - -/* parallel_for with pthreads */ -#define HAVE_PTHREADS_PF - -/* Intel Threading Building Blocks */ -/* #undef HAVE_TBB */ - -/* Ste||ar Group High Performance ParallelX */ -/* #undef HAVE_HPX */ - -/* TIFF codec */ -/* #undef HAVE_TIFF */ - -/* Define if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* VA library (libva) */ -/* #undef HAVE_VA */ - -/* Intel VA-API/OpenCL */ -/* #undef HAVE_VA_INTEL */ - -/* Lapack */ -/* #undef HAVE_LAPACK */ - -/* Library was compiled with functions instrumentation */ -/* #undef ENABLE_INSTRUMENTATION */ - -/* OpenCV trace utilities */ -#define OPENCV_TRACE - -/* The font "uni" (WQY MicroHei) is available */ -/* #undef HAVE_UNIFONT */ - -#endif // OPENCV_CVCONFIG_H_INCLUDED -]], - ["mcpp_generated/opencv2/opencv_modules.hpp"] = [[ -/* - * ** File generated automatically, do not modify ** - * - * This file defines the list of modules available in current build configuration - * - * -*/ - -// This definition means that OpenCV is built with enabled non-free code. -// For example, patented algorithms for non-profit/non-commercial use only. -/* #undef OPENCV_ENABLE_NONFREE */ - -#define HAVE_OPENCV_CORE -#define HAVE_OPENCV_DNN -#define HAVE_OPENCV_FLANN -#define HAVE_OPENCV_GEOMETRY -#define HAVE_OPENCV_HIGHGUI -#define HAVE_OPENCV_IMGCODECS -#define HAVE_OPENCV_IMGPROC -#define HAVE_OPENCV_VIDEOIO - - -]], - ["mcpp_generated/opencv_data_config.hpp"] = [[ - -#define OPENCV_INSTALL_PREFIX "/usr/local" - -#define OPENCV_DATA_INSTALL_PATH "share/opencv5" - -#define OPENCV_BUILD_DIR "" - -#define OPENCV_DATA_BUILD_DIR_SEARCH_PATHS \ - "../opencv-5.0.0/" - -#define OPENCV_INSTALL_DATA_DIR_RELATIVE "../share/opencv5" -]], - ["mcpp_generated/tu_manifest.txt"] = [[ -jpeg12 3rdparty/libjpeg-turbo/src/jcapistd.c -jpeg12 3rdparty/libjpeg-turbo/src/jccolor.c -jpeg12 3rdparty/libjpeg-turbo/src/jcdiffct.c -jpeg12 3rdparty/libjpeg-turbo/src/jclossls.c -jpeg12 3rdparty/libjpeg-turbo/src/jcmainct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcprepct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcsample.c -jpeg12 3rdparty/libjpeg-turbo/src/jdapistd.c -jpeg12 3rdparty/libjpeg-turbo/src/jdcolor.c -jpeg12 3rdparty/libjpeg-turbo/src/jddiffct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdlossls.c -jpeg12 3rdparty/libjpeg-turbo/src/jdmainct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdpostct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdsample.c -jpeg12 3rdparty/libjpeg-turbo/src/jutils.c -jpeg12 3rdparty/libjpeg-turbo/src/jccoefct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcdctmgr.c -jpeg12 3rdparty/libjpeg-turbo/src/jdcoefct.c -jpeg12 3rdparty/libjpeg-turbo/src/jddctmgr.c -jpeg12 3rdparty/libjpeg-turbo/src/jdmerge.c -jpeg12 3rdparty/libjpeg-turbo/src/jfdctfst.c -jpeg12 3rdparty/libjpeg-turbo/src/jfdctint.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctflt.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctfst.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctint.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctred.c -jpeg12 3rdparty/libjpeg-turbo/src/jquant1.c -jpeg12 3rdparty/libjpeg-turbo/src/jquant2.c -jpeg16 3rdparty/libjpeg-turbo/src/jcapistd.c -jpeg16 3rdparty/libjpeg-turbo/src/jccolor.c -jpeg16 3rdparty/libjpeg-turbo/src/jcdiffct.c -jpeg16 3rdparty/libjpeg-turbo/src/jclossls.c -jpeg16 3rdparty/libjpeg-turbo/src/jcmainct.c -jpeg16 3rdparty/libjpeg-turbo/src/jcprepct.c -jpeg16 3rdparty/libjpeg-turbo/src/jcsample.c -jpeg16 3rdparty/libjpeg-turbo/src/jdapistd.c -jpeg16 3rdparty/libjpeg-turbo/src/jdcolor.c -jpeg16 3rdparty/libjpeg-turbo/src/jddiffct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdlossls.c -jpeg16 3rdparty/libjpeg-turbo/src/jdmainct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdpostct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdsample.c -jpeg16 3rdparty/libjpeg-turbo/src/jutils.c -?dnn mlasgemm modules/dnn/src/layers/cpu_kernels/mlas_threading.cpp -]], - }, - include_dirs = { - "mcpp_generated", - "*", - "*/3rdparty/dlpack/include", - "mcpp_generated/3rdparty/libjpeg-turbo", - "*/3rdparty/libjpeg-turbo/src", - "mcpp_generated/3rdparty/libjpeg-turbo/simd/arm", - "mcpp_generated/3rdparty/zlib", - "*/3rdparty/zlib", - "*/modules/core/include", - "mcpp_generated/modules/core", - "*/modules/flann/include", - "mcpp_generated/modules/flann", - "*/modules/geometry/include", - "mcpp_generated/modules/geometry", - "*/modules/imgproc/include", - "mcpp_generated/modules/imgproc", - "*/3rdparty/mlas/inc", - "*/3rdparty/mlas/lib", - "*/modules/dnn/include", - "mcpp_generated/modules/dnn", - "*/modules/dnn/misc/caffe", - "*/modules/dnn/misc/tensorflow", - "*/modules/dnn/misc/onnx", - "*/3rdparty/protobuf/src", - "*/3rdparty/libpng", - "*/modules/imgcodecs/include", - "mcpp_generated/modules/imgcodecs", - "*/modules/videoio/include", - "mcpp_generated/modules/videoio", - "*/modules/highgui/include", - "mcpp_generated/modules/highgui", - }, - ldflags = { "-lpthread", "-ldl" }, - sources = { - [[ -*/3rdparty/libjpeg-turbo/simd/arm/{jccolor-neon,jcgray-neon,jcphuff-neon,jcsample-neon,jdcolor-neon,jdmerge-neon,jdsample-neon,jfdctfst-neon,jfdctint-neon,jidctfst-neon,jidctint-neon,jidctred-neon,jquanti-neon}.c]], - "*/3rdparty/libjpeg-turbo/simd/arm/aarch64/{jchuff-neon,jsimd}.c", - [[ -*/3rdparty/libjpeg-turbo/src/{jaricom,jcapimin,jcapistd,jcarith,jccoefct,jccolor,jcdctmgr,jcdiffct,jchuff,jcicc,jcinit,jclhuff,jclossls,jcmainct,jcmarker,jcmaster,jcomapi,jcparam,jcphuff,jcprepct,jcsample,jctrans,jdapimin,jdapistd,jdarith,jdatadst,jdatasrc,jdcoefct,jdcolor,jddctmgr,jddiffct,jdhuff,jdicc,jdinput,jdlhuff,jdlossls,jdmainct,jdmarker,jdmaster,jdmerge,jdphuff,jdpostct,jdsample,jdtrans,jerror,jfdctflt,jfdctfst,jfdctint,jidctflt,jidctfst,jidctint,jidctred,jmemmgr,jmemnobs,jpeg_nbits,jquant1,jquant2,jutils}.c]], - "*/3rdparty/libpng/*.c", - "*/3rdparty/libpng/arm/filter_neon.S", - "*/3rdparty/libpng/arm/*.c", - "*/3rdparty/zlib/*.c", - "*/modules/core/src/*.cpp", - "*/modules/core/src/opencl/runtime/*.cpp", - "*/modules/core/src/parallel/*.cpp", - "*/modules/core/src/utils/*.cpp", - "*/modules/flann/src/*.cpp", - "*/modules/geometry/src/*.cpp", - "*/modules/geometry/src/ptcloud/*.cpp", - "*/modules/geometry/src/usac/*.cpp", - "*/modules/highgui/src/{backend,roiSelector,window}.cpp", - "*/modules/imgcodecs/src/*.cpp", - [[ -*/modules/imgproc/src/{accum,accum.dispatch,bilateral_filter.dispatch,blend,box_filter.dispatch,canny,clahe,color,color_hsv.dispatch,color_lab,color_rgb.dispatch,color_yuv.dispatch,colormap,connectedcomponents,contours_approx,contours_common,contours_link,contours_new,contours_truco,corner,cornersubpix,demosaicing,deriv,distransform,drawing,drawing_text,emd_new,filter.dispatch,fisheye,floodfill,gabor,generalized_hough,grabcut,histogram,hough,imgwarp,lsd,main,median_blur.dispatch,morph.dispatch,phasecorr,phasecorr_iterative,pyramids,resize,samplers,segmentation,smooth.dispatch,spatialgradient,stackblur,stb_truetype,sumpixels.dispatch,tables,templmatch,thresh,undistort.dispatch,utils}.cpp]], - "*/modules/videoio/src/{backend_plugin,backend_static,cap,cap_ffmpeg,cap_images,cap_mjpeg_decoder,cap_mjpeg_encoder,container_avi,videoio_registry}.cpp", - "mcpp_generated/modules/core/transpose.neon.cpp", - "mcpp_generated/modules/imgproc/warp_kernels.neon.cpp", - }, - }, - targets = { - opencv = { kind = "lib" }, - }, - windows = { - cflags = { "-msse3", "-w" }, - cxxflags = { "-msse3", "-w" }, - deps = { ["compat.ffmpeg"] = "8.1.2" }, - features = { - dnn = { - defines = { "HAVE_OPENCV_DNN" }, - flags = { - { - defines = { - "ENABLE_PLUGINS", - "HAVE_PROTOBUF=1", - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_CRT_SECURE_NO_WARNINGS=1", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/dnn/**", - }, - { - defines = { - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_CRT_SECURE_NO_WARNINGS=1", - "_SCL_SECURE_NO_WARNINGS", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - }, - glob = "**/3rdparty/protobuf/**", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx" }, - defines = { - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX", - }, - glob = "**/modules/dnn/**/*.avx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx", "-mf16c", "-mavx2", "-mfma" }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX2", - }, - glob = "**/modules/dnn/**/*.avx2.cpp", - }, - { - cxxflags = { - "-mssse3", - "-msse4.1", - "-mpopcnt", - "-msse4.2", - "-mavx", - "-mf16c", - "-mavx2", - "-mfma", - "-mavx512f", - "-mavx512f", - "-mavx512cd", - "-mavx512f", - "-mavx512cd", - "-mavx512vl", - "-mavx512bw", - "-mavx512dq", - }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX512_COMMON=1", - "CV_CPU_COMPILE_AVX512_SKX=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_AVX_512F=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX512_SKX", - }, - glob = "**/modules/dnn/**/*.avx512_skx.cpp", - }, - { - defines = { "DEBUG_POSTFIX=d" }, - glob = "*/modules/dnn/src/backend.cpp", - }, - }, - sources = { - "*/3rdparty/protobuf/src/google/protobuf/*.cc", - "*/3rdparty/protobuf/src/google/protobuf/io/*.cc", - "*/3rdparty/protobuf/src/google/protobuf/stubs/*.cc", - "*/modules/dnn/misc/caffe/opencv-caffe.pb.cc", - "*/modules/dnn/misc/onnx/opencv-onnx.pb.cc", - "*/modules/dnn/misc/tensorflow/*.cc", - "*/modules/dnn/src/*.cpp", - "*/modules/dnn/src/caffe/caffe_io.cpp", - "*/modules/dnn/src/int8layers/*.cpp", - "*/modules/dnn/src/layers/*.cpp", - "*/modules/dnn/src/layers/cpu_kernels/*.cpp", - "*/modules/dnn/src/onnx/*.cpp", - "*/modules/dnn/src/tensorflow/*.cpp", - "*/modules/dnn/src/tflite/tflite_importer.cpp", - "*/modules/dnn/src/tokenizer/*.cpp", - "mcpp_generated/modules/dnn/int8layers/{conv2_int8_kernels.avx2,layers_common.avx2,layers_common.avx512_skx}.cpp", - "mcpp_generated/modules/dnn/layers/{layers_common.avx,layers_common.avx2,layers_common.avx512_skx}.cpp", - [[ -mcpp_generated/modules/dnn/layers/cpu_kernels/{activation_kernels.avx,activation_kernels.avx2,conv2_depthwise.avx,conv2_depthwise.avx2,conv2_kernels.avx,conv2_kernels.avx2,conv_block.avx,conv_block.avx2,conv_depthwise.avx,conv_depthwise.avx2,conv_winograd_f63.avx,conv_winograd_f63.avx2,fast_gemm_kernels.avx,fast_gemm_kernels.avx2,gridsample_kernels.avx,gridsample_kernels.avx2,nary_eltwise_kernels.avx,nary_eltwise_kernels.avx2,reduce2_kernels.avx,reduce2_kernels.avx2,transpose_kernels.avx,transpose_kernels.avx2}.cpp]], - }, - }, - }, - flags = { - { - defines = { - "HAVE_STDARG_H=1", - "NDEBUG", - "OPENCV_ALLOCATOR_STATS_COUNTER_TYPE=long long", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/core/**", - }, - { - defines = { - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/flann/**", - }, - { - defines = { - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/geometry/**", - }, - { - defines = { - "ENABLE_PLUGINS", - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/highgui/**", - }, - { - defines = { - "HAVE_IMGCODEC_HDR", - "HAVE_IMGCODEC_PFM", - "HAVE_IMGCODEC_PXM", - "HAVE_IMGCODEC_SUNRASTER", - "HAVE_STDARG_H=1", - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/imgcodecs/**", - }, - { - defines = { - "HAVE_STDARG_H=1", - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/imgproc/**", - }, - { - defines = { - "NDEBUG", - "NO_GETENV", - "NO_PUTENV", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - }, - glob = "**/3rdparty/libjpeg-turbo/**", - }, - { - defines = { - "BITS_IN_JSAMPLE=12", - "NDEBUG", - "NO_GETENV", - "NO_PUTENV", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - }, - glob = "**/tu/jpeg12/**", - }, - { - defines = { - "BITS_IN_JSAMPLE=16", - "NDEBUG", - "NO_GETENV", - "NO_PUTENV", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - }, - glob = "**/tu/jpeg16/**", - }, - { - defines = { - "HAVE_STDARG_H=1", - "NDEBUG", - "PNG_INTEL_SSE_OPT=1", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - }, - glob = "**/3rdparty/libpng/**", - }, - { - defines = { - "ENABLE_PLUGINS", - "HAVE_FFMPEG", - "NDEBUG", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_USE_MATH_DEFINES", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - "__OPENCV_BUILD=1", - "__STDC_CONSTANT_MACROS", - "__STDC_FORMAT_MACROS", - "__STDC_LIMIT_MACROS", - }, - glob = "**/modules/videoio/**", - }, - { - defines = { - "HAVE_STDARG_H=1", - "NDEBUG", - "NO_FSEEKO", - "WIN32", - "_CRT_NONSTDC_NO_DEPRECATE", - "_CRT_SECURE_NO_DEPRECATE", - "_SCL_SECURE_NO_WARNINGS", - "_VARIADIC_MAX=10", - "_WIN32_WINNT=0x0601", - "_WINDOWS", - }, - glob = "**/3rdparty/zlib/**", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx" }, - defines = { - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX", - }, - glob = "**/modules/core/**/*.avx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx", "-mf16c", "-mavx2", "-mfma" }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX2", - }, - glob = "**/modules/core/**/*.avx2.cpp", - }, - { - cxxflags = { - "-mssse3", - "-msse4.1", - "-mpopcnt", - "-msse4.2", - "-mavx", - "-mf16c", - "-mavx2", - "-mfma", - "-mavx512f", - "-mavx512f", - "-mavx512cd", - "-mavx512f", - "-mavx512cd", - "-mavx512vl", - "-mavx512bw", - "-mavx512dq", - }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX512_COMMON=1", - "CV_CPU_COMPILE_AVX512_SKX=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_AVX_512F=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX512_SKX", - }, - glob = "**/modules/core/**/*.avx512_skx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1" }, - defines = { "CV_CPU_COMPILE_SSE4_1=1", "CV_CPU_COMPILE_SSSE3=1", "CV_CPU_DISPATCH_MODE=SSE4_1" }, - glob = "**/modules/core/**/*.sse4_1.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2" }, - defines = { - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=SSE4_2", - }, - glob = "**/modules/core/**/*.sse4_2.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx" }, - defines = { - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX", - }, - glob = "**/modules/imgproc/**/*.avx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1", "-mpopcnt", "-msse4.2", "-mavx", "-mf16c", "-mavx2", "-mfma" }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX2", - }, - glob = "**/modules/imgproc/**/*.avx2.cpp", - }, - { - cxxflags = { - "-mssse3", - "-msse4.1", - "-mpopcnt", - "-msse4.2", - "-mavx", - "-mf16c", - "-mavx2", - "-mfma", - "-mavx512f", - "-mavx512f", - "-mavx512cd", - "-mavx512f", - "-mavx512cd", - "-mavx512vl", - "-mavx512bw", - "-mavx512dq", - }, - defines = { - "CV_CPU_COMPILE_AVX2=1", - "CV_CPU_COMPILE_AVX512_COMMON=1", - "CV_CPU_COMPILE_AVX512_SKX=1", - "CV_CPU_COMPILE_AVX=1", - "CV_CPU_COMPILE_AVX_512F=1", - "CV_CPU_COMPILE_FMA3=1", - "CV_CPU_COMPILE_FP16=1", - "CV_CPU_COMPILE_POPCNT=1", - "CV_CPU_COMPILE_SSE4_1=1", - "CV_CPU_COMPILE_SSE4_2=1", - "CV_CPU_COMPILE_SSSE3=1", - "CV_CPU_DISPATCH_MODE=AVX512_SKX", - }, - glob = "**/modules/imgproc/**/*.avx512_skx.cpp", - }, - { - cxxflags = { "-mssse3", "-msse4.1" }, - defines = { "CV_CPU_COMPILE_SSE4_1=1", "CV_CPU_COMPILE_SSSE3=1", "CV_CPU_DISPATCH_MODE=SSE4_1" }, - glob = "**/modules/imgproc/**/*.sse4_1.cpp", - }, - { - defines = { "HAVE_MALLOC_H=1", "HAVE_WIN32_ALIGNED_MALLOC=1" }, - glob = "*/modules/core/src/alloc.cpp", - }, - { - defines = { "DEBUG_POSTFIX=d", "PARALLEL_ENABLE_PLUGINS=1" }, - glob = "*/modules/core/src/parallel/parallel.cpp", - }, - { - defines = { "DEBUG_POSTFIX=d" }, - glob = "*/modules/videoio/src/backend_plugin.cpp", - }, - }, - generated_files = { - ["build.mcpp"] = [[ -// build.mcpp for compat.opencv — consumer-side synthesis of OpenCV's -// build-time generated files from the frozen config snapshot. Embedded into -// pkgs/c/compat.opencv.lua by tools/compat-opencv5/gen_descriptor.py. -// -// What it does (all pure transforms of files already in the pinned tarball — -// nothing is downloaded, nothing depends on the host): -// 1. blob2hdr — modules/imgproc/fonts/*.ttf.gz → builtin_font_{sans,italic}.h -// (hex byte arrays; faithful port of cmake ocv_blob2hdr) -// 2. cl2cpp — modules//src/opencl/*.cl → opencl_kernels_.{cpp,hpp} -// (comment-strip + string-escape + md5; faithful port of -// cmake/cl2cpp.cmake; content is #ifdef HAVE_OPENCL-guarded -// and inert in this profile, kept byte-faithful anyway) -// 3. tu stubs — ONLY for the libjpeg-turbo BITS_IN_JSAMPLE=12/16 -// same-source re-compiles (one .c, three compiles — plain -// sources cannot express that), driven by -// mcpp_generated/tu_manifest.txt. Every other TU is a real -// tarball path in `sources` since mcpp 0.0.97 (#233/#234 -// fixed). Stub basenames are group-prefixed so jpeg12 and -// jpeg16 never collide (also dodges mcpp#239). -// The raw `mcpp:` stdout protocol is used (no `import mcpp;`) so this file -// has zero non-standard dependencies. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace fs = std::filesystem; - -// ── tiny MD5 (RFC 1321, public-domain style condensed implementation) ──── -namespace md5impl { -struct MD5 { - uint32_t a0 = 0x67452301, b0 = 0xefcdab89, c0 = 0x98badcfe, d0 = 0x10325476; - static const uint32_t K[64]; - static const uint32_t R[64]; - void block(const uint8_t* p) { - uint32_t M[16]; - for (int i = 0; i < 16; i++) - M[i] = (uint32_t)p[i*4] | ((uint32_t)p[i*4+1] << 8) | ((uint32_t)p[i*4+2] << 16) | ((uint32_t)p[i*4+3] << 24); - uint32_t A = a0, B = b0, C = c0, D = d0; - for (int i = 0; i < 64; i++) { - uint32_t F; int g; - if (i < 16) { F = (B & C) | (~B & D); g = i; } - else if (i < 32) { F = (D & B) | (~D & C); g = (5*i + 1) % 16; } - else if (i < 48) { F = B ^ C ^ D; g = (3*i + 5) % 16; } - else { F = C ^ (B | ~D); g = (7*i) % 16; } - F = F + A + K[i] + M[g]; - A = D; D = C; C = B; - B = B + ((F << R[i]) | (F >> (32 - R[i]))); - } - a0 += A; b0 += B; c0 += C; d0 += D; - } - static std::string hex(const std::string& data) { - MD5 m; - uint64_t bits = (uint64_t)data.size() * 8; - std::string buf = data; - buf.push_back((char)0x80); - while (buf.size() % 64 != 56) buf.push_back('\0'); - for (int i = 0; i < 8; i++) buf.push_back((char)((bits >> (8*i)) & 0xff)); - for (size_t o = 0; o < buf.size(); o += 64) m.block((const uint8_t*)buf.data() + o); - char out[33]; - uint32_t w[4] = { m.a0, m.b0, m.c0, m.d0 }; - for (int i = 0; i < 16; i++) - std::snprintf(out + 2*i, 3, "%02x", (w[i/4] >> (8*(i%4))) & 0xff); - return std::string(out, 32); - } -}; -const uint32_t MD5::K[64] = { - 0xd76aa478,0xe8c7b756,0x242070db,0xc1bdceee,0xf57c0faf,0x4787c62a,0xa8304613,0xfd469501, - 0x698098d8,0x8b44f7af,0xffff5bb1,0x895cd7be,0x6b901122,0xfd987193,0xa679438e,0x49b40821, - 0xf61e2562,0xc040b340,0x265e5a51,0xe9b6c7aa,0xd62f105d,0x02441453,0xd8a1e681,0xe7d3fbc8, - 0x21e1cde6,0xc33707d6,0xf4d50d87,0x455a14ed,0xa9e3e905,0xfcefa3f8,0x676f02d9,0x8d2a4c8a, - 0xfffa3942,0x8771f681,0x6d9d6122,0xfde5380c,0xa4beea44,0x4bdecfa9,0xf6bb4b60,0xbebfbc70, - 0x289b7ec6,0xeaa127fa,0xd4ef3085,0x04881d05,0xd9d4d039,0xe6db99e5,0x1fa27cf8,0xc4ac5665, - 0xf4292244,0x432aff97,0xab9423a7,0xfc93a039,0x655b59c3,0x8f0ccc92,0xffeff47d,0x85845dd1, - 0x6fa87e4f,0xfe2ce6e0,0xa3014314,0x4e0811a1,0xf7537e82,0xbd3af235,0x2ad7d2bb,0xeb86d391 }; -const uint32_t MD5::R[64] = { - 7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22, 5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20, - 4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23, 6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21 }; -} // namespace md5impl - -static std::string slurp(const fs::path& p) { - std::ifstream f(p, std::ios::binary); - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot read %s\n", p.string().c_str()); std::exit(1); } - std::ostringstream ss; ss << f.rdbuf(); return ss.str(); -} -static void spew(const fs::path& p, const std::string& content) { - fs::create_directories(p.parent_path()); - // only rewrite when changed: keeps ninja restat-friendly timestamps - if (fs::exists(p)) { - std::ifstream f(p, std::ios::binary); std::ostringstream ss; ss << f.rdbuf(); - if (ss.str() == content) return; - } - std::ofstream f(p, std::ios::binary); - f << content; - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot write %s\n", p.string().c_str()); std::exit(1); } -} - -// ── gunzip (raw inflate over the vendored zlib? not available here) ───── -// The .ttf.gz blobs are embedded AS-IS: cmake's ocv_blob2hdr hex-dumps the -// *compressed* file bytes (OpenCV decompresses at runtime via its zlib), so -// no inflate is needed here — just a hex dump. -static void blob2hdr(const fs::path& blob, const fs::path& hdr, const std::string& var) { - // byte-faithful port of cmake ocv_blob2hdr: 16 bytes per line, ", " - // separators, the very last ", " trimmed. - std::string data = slurp(blob); - std::ostringstream out; - out << "// Auto generated file.\nstatic const unsigned char " << var << "[] =\n{\n"; - char buf[8]; - for (size_t i = 0; i < data.size(); i++) { - std::snprintf(buf, sizeof buf, "0x%02x", (unsigned char)data[i]); - out << buf; - if (i + 1 != data.size()) out << ", "; - if (i % 16 == 15 && i + 1 != data.size()) out << "\n"; - } - out << "\n};\n"; - spew(hdr, out.str()); -} - -// ── cl2cpp (faithful port of cmake/cl2cpp.cmake) ──────────────────────── -static std::string cl_escape(std::string lines) { - std::string t; - // \r removal + trailing \n + tabs→2 spaces - for (char c : lines) if (c != '\r') t.push_back(c); - t.push_back('\n'); - std::string u; - for (char c : t) { if (c == '\t') u += " "; else u.push_back(c); } - // strip /* */ comments (non-greedy scan) - std::string v; v.reserve(u.size()); - for (size_t i = 0; i < u.size();) { - if (i + 1 < u.size() && u[i] == '/' && u[i+1] == '*') { - size_t e = u.find("*/", i + 2); - i = (e == std::string::npos) ? u.size() : e + 2; - } else v.push_back(u[i++]); - } - // strip // comments (with leading spaces) - std::string w; w.reserve(v.size()); - for (size_t i = 0; i < v.size();) { - if (i + 1 < v.size() && v[i] == '/' && v[i+1] == '/') { - while (!w.empty() && w.back() == ' ') w.pop_back(); - size_t e = v.find('\n', i); - i = (e == std::string::npos) ? v.size() : e; // keep the newline - } else w.push_back(v[i++]); - } - // collapse empty lines + leading whitespace per line - std::string x; x.reserve(w.size()); - for (size_t i = 0; i < w.size();) { - if (w[i] == '\n') { - x.push_back('\n'); - size_t j = i + 1; - while (j < w.size() && (w[j] == ' ' || w[j] == '\n')) { - if (w[j] == '\n') { i = j; } - j++; - } - // re-scan: skip spaces directly after newline, and fold newline runs - size_t k = i + 1; - while (k < w.size() && w[k] == ' ') k++; - while (k < w.size() && w[k] == '\n') { k++; i = k - 1; - while (k < w.size() && w[k] == ' ') k++; } - i = k; - } else x.push_back(w[i++]); - } - if (!x.empty() && x.front() == '\n') x.erase(0, 1); - // escape backslash, quote; newline → \n" " - std::string y; - for (char c : x) { - if (c == '\\') y += "\\\\"; - else if (c == '"') y += "\\\""; - else if (c == '\n') y += "\\n\"\n\""; - else y.push_back(c); - } - // drop unneeded trailing quote opener - if (y.size() >= 1 && y.back() == '"') y.pop_back(); - return y; -} - -static void cl2cpp(const fs::path& cl_dir, const fs::path& out_cpp, const fs::path& out_hpp, - const std::string& module_name) { - std::vector cls; - for (auto& e : fs::directory_iterator(cl_dir)) - if (e.path().extension() == ".cl") cls.push_back(e.path()); - std::sort(cls.begin(), cls.end()); - std::string ns = module_name; - if (!ns.empty() && ns[0] >= '0' && ns[0] <= '9') ns = "_" + ns; - std::ostringstream cpp, hpp; - cpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core.hpp\"\n" - << "#include \"cvconfig.h\"\n#include \"" << out_hpp.filename().string() << "\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns - << "\n{\n\nstatic const char* const moduleName = \"" << module_name << "\";\n\n"; - hpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core/ocl.hpp\"\n" - << "#include \"opencv2/core/ocl_genbase.hpp\"\n#include \"opencv2/core/opencl/ocl_defs.hpp\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns << "\n{\n\n"; - for (auto& cl : cls) { - std::string name = cl.stem().string(); - std::string body = cl_escape(slurp(cl)); - std::string hash = md5impl::MD5::hex(body); - cpp << "struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc={moduleName, \"" << name - << "\",\n\"" << body << ", \"" << hash << "\", NULL};\n"; - hpp << "extern struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc;\n"; - } - cpp << "\n}}}\n#endif\n"; - hpp << "\n}}}\n#endif\n"; - spew(out_cpp, cpp.str()); - spew(out_hpp, hpp.str()); -} - -int main() { - const char* man_env = std::getenv("MCPP_MANIFEST_DIR"); - const char* out_env = std::getenv("MCPP_OUT_DIR"); - fs::path man = man_env ? man_env : "."; - if (!out_env) { std::fprintf(stderr, "compat.opencv build.mcpp: MCPP_OUT_DIR unset (mcpp >= 0.0.95 required)\n"); return 1; } - fs::path out = out_env; - fs::path gen = man / "mcpp_generated"; - - // the extracted official tarball wrap dir (opencv-/) - fs::path wrap; - for (auto& e : fs::directory_iterator(man)) { - if (e.is_directory() && e.path().filename().string().rfind("opencv-", 0) == 0 - && fs::exists(e.path() / "modules")) { wrap = e.path(); break; } - } - if (wrap.empty()) { std::fprintf(stderr, "compat.opencv build.mcpp: opencv-* source dir not found under %s\n", man.string().c_str()); return 1; } - - // 1. fonts - blob2hdr(wrap / "modules/imgproc/fonts/Rubik.ttf.gz", out / "builtin_font_sans.h", "OcvBuiltinFontSans"); - blob2hdr(wrap / "modules/imgproc/fonts/Rubik-Italic.ttf.gz", out / "builtin_font_italic.h", "OcvBuiltinFontItalic"); - - // 1b. unifont feature: hex-embed the CJK font pulled in by the - // compat.opencv-unifont dependency. Its raw .gz payload is parked by - // the installer in a shared runtimedir whose location relative to any - // one package shifted across xlings store layouts (0.4.62 -> 0.4.67, - // mcpp 0.0.99), which is why a fixed `/xpkgs// -> - // /runtimedir` hop broke. Anchor instead on the authoritative - // per-dep dir contract (mcpp#241: MCPP_DEP__DIR, emitted under - // both the canonical name and the namespace-stripped short name) and - // walk up probing runtimedir/ at every level; fall back to this - // package's own store location + a bounded search so older mcpp - // (pre-#241) and future layout shifts still resolve. - if (std::getenv("MCPP_FEATURE_UNIFONT")) { - const char* fname = "WenQuanYiMicroHei.ttf.gz"; - fs::path font; - std::error_code ec; - auto probe = [&](const fs::path& base) -> fs::path { - if (base.empty()) return {}; - for (const fs::path& c : { base / fname, - base / "runtimedir" / fname, - base / "data" / "runtimedir" / fname }) - if (fs::exists(c)) return c; - return {}; - }; - std::vector anchors; - if (const char* d = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - if (const char* d = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - anchors.push_back(man); - if (const char* d = std::getenv("MCPP_OUT_DIR")) anchors.emplace_back(d); - // walk up from each anchor, probing runtimedir/ at every level - for (const auto& a : anchors) { - for (fs::path p = a; !p.empty(); p = p.parent_path()) { - if (auto hit = probe(p); !hit.empty()) { font = hit; break; } - if (p == p.root_path()) break; - } - if (!font.empty()) break; - } - // fallback: sweep any opencv-unifont verdir near this package's store dir - if (font.empty()) { - for (auto& e : fs::directory_iterator(man.parent_path().parent_path(), ec)) { - if (e.path().filename().string().find("opencv-unifont") == std::string::npos) continue; - for (auto& v : fs::recursive_directory_iterator(e.path(), ec)) - if (v.path().filename() == fname) { font = v.path(); break; } - if (!font.empty()) break; - } - } - // last resort: bounded recursive search from the nearest store root - if (font.empty()) { - for (const auto& a : anchors) { - fs::path root = a; - for (int up = 0; up < 8 && root.has_parent_path(); ++up) { - if (fs::exists(root / "runtimedir") || fs::exists(root / "xpkgs") - || root.filename() == "data") break; - root = root.parent_path(); - } - long budget = 400000; - for (auto it = fs::recursive_directory_iterator(root, - fs::directory_options::skip_permission_denied, ec); - it != fs::recursive_directory_iterator() && budget-- > 0; it.increment(ec)) { - if (ec) { ec.clear(); continue; } - if (it->path().filename() == fname) { font = it->path(); break; } - } - if (!font.empty()) break; - } - } - if (font.empty()) { - const char* e1 = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR"); - const char* e2 = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR"); - const char* e3 = std::getenv("MCPP_OUT_DIR"); - std::fprintf(stderr, "compat.opencv build.mcpp: unifont feature on but %s not found.\n" - " MCPP_MANIFEST_DIR=%s\n MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR=%s\n" - " MCPP_DEP_OPENCV_UNIFONT_DIR=%s\n MCPP_OUT_DIR=%s\n", - fname, man.string().c_str(), - e1 ? e1 : "(unset)", e2 ? e2 : "(unset)", e3 ? e3 : "(unset)"); - return 1; - } - blob2hdr(font, out / "builtin_font_uni.h", "OcvBuiltinFontUni"); - std::printf("compat.opencv build.mcpp: unifont embedded from %s\n", font.string().c_str()); - } - - // 2. OpenCL kernel embeddings (inert under this profile, byte-faithful) - for (std::string m : { "core", "imgproc", "geometry" }) { - fs::path cl_dir = wrap / "modules" / m / "src" / "opencl"; - if (fs::exists(cl_dir)) - cl2cpp(cl_dir, out / ("clsrc/opencl_kernels_" + m + ".cpp"), - out / ("opencl_kernels_" + m + ".hpp"), m); - } - - // 3. jpeg12/jpeg16 re-compile stubs from the manifest - // line grammar: [?] - // (group-prefixed filename => unique basenames across groups; a - // leading ? guard skips the stub unless MCPP_FEATURE_=1) - std::ifstream mf(gen / "tu_manifest.txt"); - if (!mf) { std::fprintf(stderr, "compat.opencv build.mcpp: mcpp_generated/tu_manifest.txt missing\n"); return 1; } - std::string line; - int stubs = 0; - while (std::getline(mf, line)) { - if (line.empty() || line[0] == '#') continue; - if (line[0] == '?') { - size_t g = line.find('\t'); - if (g == std::string::npos) continue; - std::string feat = line.substr(1, g - 1); - for (char& c : feat) c = (c >= 'a' && c <= 'z') ? char(c - 32) : c; - if (!std::getenv(("MCPP_FEATURE_" + feat).c_str())) continue; - line = line.substr(g + 1); - } - size_t t = line.find('\t'); - if (t == std::string::npos) continue; - std::string grp = line.substr(0, t); - std::string target = line.substr(t + 1); - std::string mangled = grp + "_" + target; - for (char& c : mangled) if (c == '/') c = '_'; - fs::path stub = out / "tu" / grp / mangled; - std::string content = "/* compat.opencv " + grp + " re-compile TU */\n" - "#include \"" + target + "\"\n"; - spew(stub, content); - std::printf("mcpp:generated=%s\n", stub.string().c_str()); - stubs++; - } - - // out/ carries builtin_font_*.h, opencl_kernels_*.hpp, clsrc/ includes - std::printf("mcpp:cxxflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:cflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:rerun-if-changed=%s\n", (gen / "tu_manifest.txt").string().c_str()); - // diagnostics as a non-directive stdout line: stderr writes can interleave - // into the (buffered) stdout directive stream and corrupt a directive. - std::printf("compat.opencv build.mcpp: %d jpeg12/16 stubs, fonts + CL kernels synthesized\n", stubs); - std::fflush(stdout); - return 0; -} -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jconfig.h"] = [[ -/* Version ID for the JPEG library. - * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". - */ -#define JPEG_LIB_VERSION 70 - -/* libjpeg-turbo version */ -#define LIBJPEG_TURBO_VERSION 3.1.2 - -/* libjpeg-turbo version in integer form */ -#define LIBJPEG_TURBO_VERSION_NUMBER 3001002 - -/* Support arithmetic encoding when using 8-bit samples */ -#define C_ARITH_CODING_SUPPORTED 1 - -/* Support arithmetic decoding when using 8-bit samples */ -#define D_ARITH_CODING_SUPPORTED 1 - -/* Support in-memory source/destination managers */ -#define MEM_SRCDST_SUPPORTED 1 - -/* Use accelerated SIMD routines when using 8-bit samples */ -/* #undef WITH_SIMD */ - -/* This version of libjpeg-turbo supports run-time selection of data precision, - * so BITS_IN_JSAMPLE is no longer used to specify the data precision at build - * time. However, some downstream software expects the macro to be defined. - * Since 12-bit data precision is an opt-in feature that requires explicitly - * calling 12-bit-specific libjpeg API functions and using 12-bit-specific data - * types, the unmodified portion of the libjpeg API still behaves as if it were - * built for 8-bit precision, and JSAMPLE is still literally an 8-bit data - * type. Thus, it is correct to define BITS_IN_JSAMPLE to 8 here. - */ -#ifndef BITS_IN_JSAMPLE -#define BITS_IN_JSAMPLE 8 -#endif - -#ifdef _WIN32 - -#undef RIGHT_SHIFT_IS_UNSIGNED - -/* Define "boolean" as unsigned char, not int, per Windows custom */ -#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ -typedef unsigned char boolean; -#endif -#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */ - -/* Define "INT32" as int, not long, per Windows custom */ -#if !(defined(_BASETSD_H_) || defined(_BASETSD_H)) /* don't conflict if basetsd.h already read */ -typedef short INT16; -typedef signed int INT32; -#endif -#define XMD_H /* prevent jmorecfg.h from redefining it */ - -#else - -/* Define if your (broken) compiler shifts signed values as if they were - unsigned. */ -/* #undef RIGHT_SHIFT_IS_UNSIGNED */ - -#endif -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jconfigint.h"] = [[ -/* libjpeg-turbo build number */ -#define BUILD "opencv-5.0.0-libjpeg-turbo" - -/* How to hide global symbols. */ -#define HIDDEN - -/* Compiler's inline keyword */ -#undef inline - -/* How to obtain function inlining. */ -#define INLINE - -/* How to obtain thread-local storage */ -#define THREAD_LOCAL - -/* Define to the full name of this package. */ -#define PACKAGE_NAME "OpenCV" - -/* Version number of package */ -#define VERSION "3.1.2" - -/* The size of `size_t', as computed by sizeof. */ -#define SIZEOF_SIZE_T 8 - -/* Define if your compiler has __builtin_ctzl() and sizeof(unsigned long) == sizeof(size_t). */ -/* #undef HAVE_BUILTIN_CTZL */ - -/* Define to 1 if you have the header file. */ -#define HAVE_INTRIN_H - -#if defined(_MSC_VER) && defined(HAVE_INTRIN_H) -#if (SIZEOF_SIZE_T == 8) -#define HAVE_BITSCANFORWARD64 -#elif (SIZEOF_SIZE_T == 4) -#define HAVE_BITSCANFORWARD -#endif -#endif - -#if defined(__has_attribute) -#if __has_attribute(fallthrough) -#define FALLTHROUGH __attribute__((fallthrough)); -#else -#define FALLTHROUGH -#endif -#else -#define FALLTHROUGH -#endif - -/* - * Define BITS_IN_JSAMPLE as either - * 8 for 8-bit sample values (the usual setting) - * 12 for 12-bit sample values - * Only 8 and 12 are legal data precisions for lossy JPEG according to the - * JPEG standard, and the IJG code does not support anything else! - */ - -#ifndef BITS_IN_JSAMPLE -#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ -#endif - -#undef C_ARITH_CODING_SUPPORTED -#undef D_ARITH_CODING_SUPPORTED -#undef WITH_SIMD - -#if BITS_IN_JSAMPLE == 8 - -/* Support arithmetic encoding */ -#define C_ARITH_CODING_SUPPORTED 1 - -/* Support arithmetic decoding */ -#define D_ARITH_CODING_SUPPORTED 1 - -/* Use accelerated SIMD routines. */ -/* #undef WITH_SIMD */ - -#endif -]], - ["mcpp_generated/3rdparty/libjpeg-turbo/jversion.h"] = [[ -/* - * jversion.h - * - * This file was part of the Independent JPEG Group's software: - * Copyright (C) 1991-2020, Thomas G. Lane, Guido Vollbeding. - * libjpeg-turbo Modifications: - * Copyright (C) 2010, 2012-2024, D. R. Commander. - * For conditions of distribution and use, see the accompanying README.ijg - * file. - * - * This file contains software version identification. - */ - - -#if JPEG_LIB_VERSION >= 80 - -#define JVERSION "8d 15-Jan-2012" - -#elif JPEG_LIB_VERSION >= 70 - -#define JVERSION "7 27-Jun-2009" - -#else - -#define JVERSION "6b 27-Mar-1998" - -#endif - -/* - * NOTE: It is our convention to place the authors in the following order: - * - libjpeg-turbo authors (2009-) in descending order of the date of their - * most recent contribution to the project, then in ascending order of the - * date of their first contribution to the project, then in alphabetical - * order - * - Upstream authors in descending order of the date of the first inclusion of - * their code - */ - -#define JCOPYRIGHT1 \ - "Copyright (C) 2009-2024 D. R. Commander\n" \ - "Copyright (C) 2015, 2020 Google, Inc.\n" \ - "Copyright (C) 2019-2020 Arm Limited\n" \ - "Copyright (C) 2015-2016, 2018 Matthieu Darbois\n" \ - "Copyright (C) 2011-2016 Siarhei Siamashka\n" \ - "Copyright (C) 2015 Intel Corporation\n" -#define JCOPYRIGHT2 \ - "Copyright (C) 2013-2014 Linaro Limited\n" \ - "Copyright (C) 2013-2014 MIPS Technologies, Inc.\n" \ - "Copyright (C) 2009, 2012 Pierre Ossman for Cendio AB\n" \ - "Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies)\n" \ - "Copyright (C) 1999-2006 MIYASAKA Masaru\n" \ - "Copyright (C) 1999 Ken Murchison\n" \ - "Copyright (C) 1991-2020 Thomas G. Lane, Guido Vollbeding\n" - -#define JCOPYRIGHT_SHORT \ - "Copyright (C) 1991-2025 The libjpeg-turbo Project and many others" -]], - ["mcpp_generated/3rdparty/zlib/zconf.h"] = [[ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2026 Jean-loup Gailly, Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id$ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - * Even better than compiling with -DZ_PREFIX would be to use configure to set - * this permanently in zconf.h using "./configure --zprefix". - */ -#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */ -# define Z_PREFIX_SET - -/* all linked symbols and init macros */ -# define _dist_code z__dist_code -# define _length_code z__length_code -# define _tr_align z__tr_align -# define _tr_flush_bits z__tr_flush_bits -# define _tr_flush_block z__tr_flush_block -# define _tr_init z__tr_init -# define _tr_stored_block z__tr_stored_block -# define _tr_tally z__tr_tally -# define adler32 z_adler32 -# define adler32_combine z_adler32_combine -# define adler32_combine64 z_adler32_combine64 -# define adler32_z z_adler32_z -# ifndef Z_SOLO -# define compress z_compress -# define compress2 z_compress2 -# define compress_z z_compress_z -# define compress2_z z_compress2_z -# define compressBound z_compressBound -# define compressBound_z z_compressBound_z -# endif -# define crc32 z_crc32 -# define crc32_combine z_crc32_combine -# define crc32_combine64 z_crc32_combine64 -# define crc32_combine_gen z_crc32_combine_gen -# define crc32_combine_gen64 z_crc32_combine_gen64 -# define crc32_combine_op z_crc32_combine_op -# define crc32_z z_crc32_z -# define deflate z_deflate -# define deflateBound z_deflateBound -# define deflateBound_z z_deflateBound_z -# define deflateCopy z_deflateCopy -# define deflateEnd z_deflateEnd -# define deflateGetDictionary z_deflateGetDictionary -# define deflateInit z_deflateInit -# define deflateInit2 z_deflateInit2 -# define deflateInit2_ z_deflateInit2_ -# define deflateInit_ z_deflateInit_ -# define deflateParams z_deflateParams -# define deflatePending z_deflatePending -# define deflatePrime z_deflatePrime -# define deflateReset z_deflateReset -# define deflateResetKeep z_deflateResetKeep -# define deflateSetDictionary z_deflateSetDictionary -# define deflateSetHeader z_deflateSetHeader -# define deflateTune z_deflateTune -# define deflateUsed z_deflateUsed -# define deflate_copyright z_deflate_copyright -# define get_crc_table z_get_crc_table -# ifndef Z_SOLO -# define gz_error z_gz_error -# define gz_intmax z_gz_intmax -# define gz_strwinerror z_gz_strwinerror -# define gzbuffer z_gzbuffer -# define gzclearerr z_gzclearerr -# define gzclose z_gzclose -# define gzclose_r z_gzclose_r -# define gzclose_w z_gzclose_w -# define gzdirect z_gzdirect -# define gzdopen z_gzdopen -# define gzeof z_gzeof -# define gzerror z_gzerror -# define gzflush z_gzflush -# define gzfread z_gzfread -# define gzfwrite z_gzfwrite -# define gzgetc z_gzgetc -# define gzgetc_ z_gzgetc_ -# define gzgets z_gzgets -# define gzoffset z_gzoffset -# define gzoffset64 z_gzoffset64 -# define gzopen z_gzopen -# define gzopen64 z_gzopen64 -# ifdef _WIN32 -# define gzopen_w z_gzopen_w -# endif -# define gzprintf z_gzprintf -# define gzputc z_gzputc -# define gzputs z_gzputs -# define gzread z_gzread -# define gzrewind z_gzrewind -# define gzseek z_gzseek -# define gzseek64 z_gzseek64 -# define gzsetparams z_gzsetparams -# define gztell z_gztell -# define gztell64 z_gztell64 -# define gzungetc z_gzungetc -# define gzvprintf z_gzvprintf -# define gzwrite z_gzwrite -# endif -# define inflate z_inflate -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define inflateBackInit z_inflateBackInit -# define inflateBackInit_ z_inflateBackInit_ -# define inflateCodesUsed z_inflateCodesUsed -# define inflateCopy z_inflateCopy -# define inflateEnd z_inflateEnd -# define inflateGetDictionary z_inflateGetDictionary -# define inflateGetHeader z_inflateGetHeader -# define inflateInit z_inflateInit -# define inflateInit2 z_inflateInit2 -# define inflateInit2_ z_inflateInit2_ -# define inflateInit_ z_inflateInit_ -# define inflateMark z_inflateMark -# define inflatePrime z_inflatePrime -# define inflateReset z_inflateReset -# define inflateReset2 z_inflateReset2 -# define inflateResetKeep z_inflateResetKeep -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateUndermine z_inflateUndermine -# define inflateValidate z_inflateValidate -# define inflate_copyright z_inflate_copyright -# define inflate_fast z_inflate_fast -# define inflate_table z_inflate_table -# define inflate_fixed z_inflate_fixed -# ifndef Z_SOLO -# define uncompress z_uncompress -# define uncompress2 z_uncompress2 -# define uncompress_z z_uncompress_z -# define uncompress2_z z_uncompress2_z -# endif -# define zError z_zError -# ifndef Z_SOLO -# define zcalloc z_zcalloc -# define zcfree z_zcfree -# endif -# define zlibCompileFlags z_zlibCompileFlags -# define zlibVersion z_zlibVersion - -/* all zlib typedefs in zlib.h and zconf.h */ -# define Byte z_Byte -# define Bytef z_Bytef -# define alloc_func z_alloc_func -# define charf z_charf -# define free_func z_free_func -# ifndef Z_SOLO -# define gzFile z_gzFile -# endif -# define gz_header z_gz_header -# define gz_headerp z_gz_headerp -# define in_func z_in_func -# define intf z_intf -# define out_func z_out_func -# define uInt z_uInt -# define uIntf z_uIntf -# define uLong z_uLong -# define uLongf z_uLongf -# define voidp z_voidp -# define voidpc z_voidpc -# define voidpf z_voidpf - -/* all zlib structs in zlib.h and zconf.h */ -# define gz_header_s z_gz_header_s -# define internal_state z_internal_state - -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -#ifndef z_const -# ifdef ZLIB_CONST -# define z_const const -# else -# define z_const -# endif -#endif - -#ifdef Z_SOLO -# ifdef _WIN64 - typedef unsigned long long z_size_t; -# else - typedef unsigned long z_size_t; -# endif -#else -# define z_longlong long long -# if defined(NO_SIZE_T) - typedef unsigned NO_SIZE_T z_size_t; -# elif defined(STDC) -# include - typedef size_t z_size_t; -# else - typedef unsigned long z_size_t; -# endif -# undef z_longlong -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus about 7 kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if !defined(Z_U4) && !defined(Z_SOLO) && defined(STDC) -# include -# if (UINT_MAX == 0xffffffffUL) -# define Z_U4 unsigned -# elif (ULONG_MAX == 0xffffffffUL) -# define Z_U4 unsigned long -# elif (USHRT_MAX == 0xffffffffUL) -# define Z_U4 unsigned short -# endif -#endif - -#ifdef Z_U4 - typedef Z_U4 z_crc_t; -#else - typedef unsigned long z_crc_t; -#endif - -#if HAVE_UNISTD_H-0 /* may be set to #if 1 by ./configure */ -# define Z_HAVE_UNISTD_H -#endif - -#if HAVE_STDARG_H-0 /* may be set to #if 1 by ./configure */ -# define Z_HAVE_STDARG_H -#endif - -#ifdef STDC -# ifndef Z_SOLO -# include /* for off_t */ -# endif -#endif - -#if defined(STDC) || defined(Z_HAVE_STDARG_H) -# ifndef Z_SOLO -# include /* for va_list */ -# endif -#endif - -#ifdef _WIN32 -# ifndef Z_SOLO -# include /* for wchar_t */ -# endif -#endif - -/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and - * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even - * though the former does not conform to the LFS document), but considering - * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as - * equivalently requesting no 64-bit operations - */ -#if defined(_LARGEFILE64_SOURCE) && -_LARGEFILE64_SOURCE - -1 == 1 -# undef _LARGEFILE64_SOURCE -#endif - -#ifndef Z_HAVE_UNISTD_H -# if defined(__WATCOMC__) || defined(__GO32__) || \ - (defined(_LARGEFILE64_SOURCE) && !defined(_WIN32)) -# define Z_HAVE_UNISTD_H -# endif -#endif -#ifndef Z_SOLO -# if defined(Z_HAVE_UNISTD_H) -# include /* for SEEK_*, off_t, and _LFS64_LARGEFILE */ -# ifdef VMS -# include /* for off_t */ -# endif -# ifndef z_off_t -# define z_off_t off_t -# endif -# endif -#endif - -#if defined(_LFS64_LARGEFILE) && _LFS64_LARGEFILE-0 -# define Z_LFS64 -#endif - -#if defined(_LARGEFILE64_SOURCE) && defined(Z_LFS64) -# define Z_LARGE64 -#endif - -#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS-0 == 64 && defined(Z_LFS64) -# define Z_WANT64 -#endif - -#if !defined(SEEK_SET) && !defined(Z_SOLO) -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif - -#ifndef z_off_t -# define z_off_t long long -#endif - -#if !defined(_WIN32) && defined(Z_LARGE64) -# define z_off64_t off64_t -#elif defined(__MINGW32__) -# define z_off64_t long long -#elif defined(_WIN32) && !defined(__GNUC__) -# define z_off64_t __int64 -#elif defined(__GO32__) -# define z_off64_t offset_t -#else -# define z_off64_t z_off_t -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) - #pragma map(deflateInit_,"DEIN") - #pragma map(deflateInit2_,"DEIN2") - #pragma map(deflateEnd,"DEEND") - #pragma map(deflateBound,"DEBND") - #pragma map(inflateInit_,"ININ") - #pragma map(inflateInit2_,"ININ2") - #pragma map(inflateEnd,"INEND") - #pragma map(inflateSync,"INSY") - #pragma map(inflateSetDictionary,"INSEDI") - #pragma map(compressBound,"CMBND") - #pragma map(inflate_table,"INTABL") - #pragma map(inflate_fast,"INFA") - #pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ -]], - ["mcpp_generated/custom_hal.hpp"] = [[ -#ifndef _CUSTOM_HAL_INCLUDED_ -#define _CUSTOM_HAL_INCLUDED_ - - - -#endif -]], - ["mcpp_generated/cv_cpu_config.h"] = [[ -// OpenCV CPU baseline features - -#define CV_CPU_COMPILE_SSE 1 -#define CV_CPU_BASELINE_COMPILE_SSE 1 - -#define CV_CPU_COMPILE_SSE2 1 -#define CV_CPU_BASELINE_COMPILE_SSE2 1 - -#define CV_CPU_COMPILE_SSE3 1 -#define CV_CPU_BASELINE_COMPILE_SSE3 1 - -#define CV_CPU_BASELINE_FEATURES 0 \ - , CV_CPU_SSE \ - , CV_CPU_SSE2 \ - , CV_CPU_SSE3 \ - - -// OpenCV supported CPU dispatched features - -#define CV_CPU_DISPATCH_COMPILE_SSE4_1 1 -#define CV_CPU_DISPATCH_COMPILE_SSE4_2 1 -#define CV_CPU_DISPATCH_COMPILE_AVX 1 -#define CV_CPU_DISPATCH_COMPILE_FP16 1 -#define CV_CPU_DISPATCH_COMPILE_AVX2 1 -#define CV_CPU_DISPATCH_COMPILE_AVX512_SKX 1 - - -#define CV_CPU_DISPATCH_FEATURES 0 \ - , CV_CPU_SSE4_1 \ - , CV_CPU_SSE4_2 \ - , CV_CPU_AVX \ - , CV_CPU_FP16 \ - , CV_CPU_AVX2 \ - , CV_CPU_AVX512_SKX \ - -]], - ["mcpp_generated/cvconfig.h"] = [[ -#ifndef OPENCV_CVCONFIG_H_INCLUDED -#define OPENCV_CVCONFIG_H_INCLUDED - -/* OpenCV compiled as static or dynamic libs */ -/* #undef BUILD_SHARED_LIBS */ - -/* OpenCV intrinsics optimized code */ -#define CV_ENABLE_INTRINSICS - -/* OpenCV additional optimized code */ -/* #undef CV_DISABLE_OPTIMIZATION */ - -/* Compile for 'real' NVIDIA GPU architectures */ -#define CUDA_ARCH_BIN "" - -/* NVIDIA GPU features are used */ -#define CUDA_ARCH_FEATURES "" - -/* Compile for 'virtual' NVIDIA PTX architectures */ -#define CUDA_ARCH_PTX "" - -/* AMD's Basic Linear Algebra Subprograms Library*/ -/* #undef HAVE_CLAMDBLAS */ - -/* AMD's OpenCL Fast Fourier Transform Library*/ -/* #undef HAVE_CLAMDFFT */ - -/* Clp support */ -/* #undef HAVE_CLP */ - -/* NVIDIA CUDA Runtime API*/ -/* #undef HAVE_CUDA */ - -/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/ -/* #undef HAVE_CUBLAS */ - -/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/ -/* #undef HAVE_CUDNN */ - -/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/ -/* #undef HAVE_CUFFT */ - -/* DirectX */ -#define HAVE_DIRECTX -#define HAVE_DIRECTX_NV12 -#define HAVE_D3D11 -#define HAVE_D3D10 -#define HAVE_D3D9 - -/* Eigen Matrix & Linear Algebra Library */ -/* #undef HAVE_EIGEN */ - -/* Geospatial Data Abstraction Library */ -/* #undef HAVE_GDAL */ - -/* Vulkan support */ -/* #undef HAVE_VULKAN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Intel Integrated Performance Primitives */ -/* #undef HAVE_IPP */ -/* #undef HAVE_IPP_ICV */ -/* #undef HAVE_IPP_IW */ -/* #undef HAVE_IPP_IW_LL */ - -/* JPEG-2000 codec */ -/* #undef HAVE_OPENJPEG */ -/* #undef HAVE_JASPER */ - -/* AVIF codec */ -/* #undef HAVE_AVIF */ - -/* IJG JPEG codec */ -#define HAVE_JPEG - -/* JPEG XL codec */ -/* #undef HAVE_JPEGXL */ - -/* GDCM DICOM codec */ -/* #undef HAVE_GDCM */ - -/* NVIDIA Video Decoding API*/ -/* #undef HAVE_NVCUVID */ -/* #undef HAVE_NVCUVID_HEADER */ -/* #undef HAVE_DYNLINK_NVCUVID_HEADER */ - -/* NVIDIA Video Encoding API*/ -/* #undef HAVE_NVCUVENC */ - -/* OpenCL Support */ -/* #undef HAVE_OPENCL */ -/* #undef HAVE_OPENCL_STATIC */ -/* #undef HAVE_OPENCL_SVM */ - -/* NVIDIA OpenCL D3D Extensions support */ -/* #undef HAVE_OPENCL_D3D11_NV */ - -/* OpenEXR codec */ -/* #undef HAVE_OPENEXR */ - -/* OpenGL support*/ -/* #undef HAVE_OPENGL */ - -/* PNG codec */ -#define HAVE_PNG - -/* PNG codec */ -/* #undef HAVE_SPNG */ - -/* Posix threads (pthreads) */ -/* #undef HAVE_PTHREAD */ - -/* parallel_for with pthreads */ -/* #undef HAVE_PTHREADS_PF */ - -/* Intel Threading Building Blocks */ -/* #undef HAVE_TBB */ - -/* Ste||ar Group High Performance ParallelX */ -/* #undef HAVE_HPX */ - -/* TIFF codec */ -/* #undef HAVE_TIFF */ - -/* Define if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* VA library (libva) */ -/* #undef HAVE_VA */ - -/* Intel VA-API/OpenCL */ -/* #undef HAVE_VA_INTEL */ - -/* Lapack */ -/* #undef HAVE_LAPACK */ - -/* Library was compiled with functions instrumentation */ -/* #undef ENABLE_INSTRUMENTATION */ - -/* OpenCV trace utilities */ -#define OPENCV_TRACE - -/* The font "uni" (WQY MicroHei) is available */ -/* #undef HAVE_UNIFONT */ - -#endif // OPENCV_CVCONFIG_H_INCLUDED -]], - ["mcpp_generated/mlas_hgemm_stub.cpp"] = [[ -// compat.opencv curated stub: the vendored mlas subset declares and -// calls MlasHGemmSupported but does not vendor its definition (it -// lives in onnxruntime's full mlas). False = fp16 HGemm unsupported, -// which is the truth for this subset; callers fall back. -#include "mlas.h" -bool MLASCALL MlasHGemmSupported(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE) { return false; } -]], - ["mcpp_generated/modules/core/arithm.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/arithm.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/arithm.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/arithm.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/arithm.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/convert.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/convert.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/convert_scale.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/convert_scale.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/convert_scale.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/convert_scale.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/count_non_zero.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/count_non_zero.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/count_non_zero.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/count_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/has_non_zero.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/has_non_zero.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/has_non_zero.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/has_non_zero.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/mathfuncs_core.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/mathfuncs_core.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/mathfuncs_core.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mathfuncs_core.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.avx512_skx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/matmul.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/matmul.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/matmul.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/matmul.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/mean.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/mean.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/mean.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/mean.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/merge.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/merge.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/merge.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/merge.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/minmax.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/minmax.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/minmax.vsx3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/minmax.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/nan_mask.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/nan_mask.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/nan_mask.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/nan_mask.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/norm.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/norm.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/norm.sse4_1.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/norm.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.neon_dotprod.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/reduce.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/reduce.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/reduce.ssse3.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/reduce.simd.hpp" -]], - ["mcpp_generated/modules/core/split.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/split.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/split.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/split.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/split.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/split.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/stat.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/stat.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/stat.sse4_2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/stat.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/sum.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/sum.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/sum.sse2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/sum.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.fp16.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin128.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE3 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSSE3 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SSE4_2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE FP16 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, FP16, AVX, SSE4_2, SSE4_1, SSSE3, SSE3, SSE2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse3.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse4_1.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.sse4_2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin128.ssse3.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin128.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.avx2.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.lasx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin256.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin256.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin256.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/test/test_intrin512.avx512_skx.cpp"] = [[ - -#include "modules/core/test/test_precomp.hpp" -#include "modules/core/test/test_intrin512.simd.hpp" -]], - ["mcpp_generated/modules/core/test/test_intrin512.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/test/test_intrin512.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/transpose.avx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.avx2.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.lasx.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.neon.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.rvv.cpp"] = [[ - -#include "modules/core/src/precomp.hpp" -#include "modules/core/src/transpose.simd.hpp" -]], - ["mcpp_generated/modules/core/transpose.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/core/src/transpose.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/core/version_string.inc"] = [[ -"\n" -"General configuration for OpenCV 5.0.0 =====================================\n" -" Version control: 57b5f3a\n" -"\n" -" Platform:\n" -" Timestamp: 2026-07-20T15:02:34Z\n" -" Host: Windows 10.0.26100 AMD64\n" -" CMake: 4.4.0\n" -" CMake generator: Ninja\n" -" CMake build tool: C:/ProgramData/chocolatey/bin/ninja.exe\n" -" MSVC: 1951\n" -" Configuration: Release\n" -" Algorithm Hint: ALGO_HINT_ACCURATE\n" -"\n" -" CPU/HW features:\n" -" Baseline: SSE SSE2 SSE3\n" -" requested: SSE3\n" -" Dispatched code generation: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX\n" -" SSE4_1 (16 files): + SSSE3 SSE4_1\n" -" SSE4_2 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2\n" -" AVX (17 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX\n" -" FP16 (0 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16\n" -" AVX2 (46 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16 AVX2 FMA3\n" -" AVX512_SKX (7 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX FP16 AVX2 FMA3 AVX_512F AVX512_COMMON AVX512_SKX\n" -"\n" -" C/C++:\n" -" Built as dynamic libs?: NO\n" -" C++ standard: 17\n" -" C++ Compiler: C:/Program Files/LLVM/bin/clang-cl.exe (ver 20.1.8)\n" -" C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Qunused-arguments /FS -msse3 /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /O2 /Ob2 /DNDEBUG -DNDEBUG\n" -" C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Qunused-arguments /FS -msse3 /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /wd4819 /Zi /Ob0 /Od /RTC1 -O0 -DDEBUG -D_DEBUG\n" -" C Compiler: C:/Program Files/LLVM/bin/clang-cl.exe\n" -" C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Qunused-arguments /FS -msse3 /O2 /Ob2 /DNDEBUG -DNDEBUG\n" -" C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise -W -Wreturn-type -Wnon-virtual-dtor -Waddress -Wsequence-point -Wformat -Wformat-security -Wmissing-declarations -Wmissing-prototypes -Wstrict-prototypes -Wundef -Winit-self -Wpointer-arith -Wshadow -Wsign-promo -Wuninitialized -Winconsistent-missing-override -Wno-delete-non-virtual-dtor -Wno-unnamed-type-template-args -Wno-comment -Wno-deprecated-enum-enum-conversion -Wno-deprecated-anon-enum-enum-conversion -Qunused-arguments /FS -msse3 /Zi /Ob0 /Od /RTC1 -O0 -DDEBUG -D_DEBUG\n" -" Linker flags (Release): /machine:x64 /NODEFAULTLIB:atlthunk.lib /INCREMENTAL:NO /NODEFAULTLIB:libcmtd.lib /NODEFAULTLIB:libcpmtd.lib /NODEFAULTLIB:msvcrtd.lib\n" -" Linker flags (Debug): /machine:x64 /NODEFAULTLIB:atlthunk.lib /debug /INCREMENTAL /NODEFAULTLIB:libcmt.lib /NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:msvcrt.lib\n" -" ccache: NO\n" -" Precompiled headers: NO\n" -" Extra dependencies: comctl32 gdi32 ole32 setupapi ws2_32\n" -" 3rdparty dependencies: libprotobuf libjpeg-turbo libpng zlib\n" -"\n" -" OpenCV modules:\n" -" To be built: core dnn flann geometry highgui imgcodecs imgproc videoio\n" -" Disabled: world\n" -" Disabled by dependency: calib features java_bindings_generator js_bindings_generator objc_bindings_generator objdetect photo ptcloud python_bindings_generator python_tests stereo stitching video\n" -" Unavailable: java python3 ts\n" -" Applications: -\n" -" Documentation: NO\n" -" Non-free algorithms: NO\n" -"\n" -" Windows RT support: NO\n" -"\n" -" GUI: NONE\n" -" VTK support: NO\n" -"\n" -" Media I/O: \n" -" ZLib: build (ver 1.3.2)\n" -" JPEG: build-libjpeg-turbo (ver 3.1.2-70)\n" -" SIMD Support Request: NO\n" -" PNG: build (ver 1.6.57)\n" -" SIMD Support Request: YES\n" -" SIMD Support: YES (Intel SSE)\n" -" Metadata Support: EXIF XMP ICC cICP\n" -" GIF: NO\n" -" HDR: YES\n" -" SUNRASTER: YES\n" -" PXM: YES\n" -" PFM: YES\n" -"\n" -" Video I/O:\n" -" FFMPEG: YES (find_package)\n" -" avcodec: YES (62.28.102)\n" -" avformat: YES (62.12.102)\n" -" avutil: YES (60.26.102)\n" -" swscale: YES (9.5.102)\n" -" Orbbec: NO\n" -"\n" -" Parallel framework: Concurrency\n" -"\n" -" Trace: YES (built-in)\n" -"\n" -" Other third-party libraries:\n" -" Custom HAL: NO\n" -" Protobuf: build (3.19.1)\n" -"\n" -" ONNX Runtime: NO\n" -"\n" -" Python (for build): C:/hostedtoolcache/windows/Python/3.12.10/x64/python3.exe\n" -"\n" -" Install to: install\n" -"-----------------------------------------------------------------\n" -"\n" -]], - ["mcpp_generated/modules/dnn/int8layers/conv2_int8_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/conv2_int8_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/conv2_int8_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/int8layers/conv2_int8_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.avx512_skx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/int8layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/int8layers/layers_common.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/int8layers/layers_common.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON, LASX, RVV, AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/activation_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/activation_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_depthwise.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv2_depthwise.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv2_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv2_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_block.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_block.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON_FP16 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL NEON_FP16, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_depthwise.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_depthwise.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.neon_fp16.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/conv_winograd_f63.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/conv_winograd_f63.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/fast_gemm_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/fast_gemm_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/gridsample_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/gridsample_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/nary_eltwise_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/nary_eltwise_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/reduce2_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/reduce2_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/cpu_kernels/transpose_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/cpu_kernels/transpose_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL LASX, RVV, NEON, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx2.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.avx512_skx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.lasx.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.neon.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.rvv.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/dnn/layers/layers_common.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/dnn/src/layers/layers_common.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE RVV -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE LASX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE NEON -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE SVE -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL SVE, NEON, LASX, RVV, AVX512_SKX, AVX2, AVX, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/dnn/layers/layers_common.sve.cpp"] = [[ - -#include "modules/dnn/src/precomp.hpp" -#include "modules/dnn/src/layers/layers_common.simd.hpp" -]], - ["mcpp_generated/modules/highgui/opencv_highgui_config.hpp"] = [[ -// Auto-generated file -#define OPENCV_HIGHGUI_BUILTIN_BACKEND_STR "NONE" - -#define OPENCV_HIGHGUI_WITHOUT_BUILTIN_BACKEND 1 -]], - ["mcpp_generated/modules/imgproc/accum.avx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/accum.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/accum.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/accum.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, AVX, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/accum.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/accum.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/bilateral_filter.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/bilateral_filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/bilateral_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/box_filter.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/box_filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/box_filter.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/box_filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_hsv.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_hsv.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_hsv.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_hsv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_rgb.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_rgb.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_rgb.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_rgb.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/color_yuv.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/color_yuv.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/color_yuv.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/color_yuv.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/filter.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/filter.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/filter.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/filter.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/median_blur.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/median_blur.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/median_blur.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/median_blur.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/morph.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/morph.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/morph.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/morph.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.avx512_icl.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/smooth.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/smooth.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/smooth.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/smooth.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.avx512_skx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/sumpixels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/sumpixels.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX512_SKX -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX512_SKX, AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/sumpixels.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/sumpixels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/undistort.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/undistort.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/undistort.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/undistort.simd.hpp" -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/undistort.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/undistort.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.avx2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.lasx.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.neon.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.neon_fp16.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.rvv.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.simd_declarations.hpp"] = [[ -#define CV_CPU_SIMD_FILENAME "modules/imgproc/src/warp_kernels.simd.hpp" -#define CV_CPU_DISPATCH_MODE SSE4_1 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODE AVX2 -#include "opencv2/core/private/cv_cpu_include_simd_declarations.hpp" - -#define CV_CPU_DISPATCH_MODES_ALL AVX2, SSE4_1, BASELINE - -#undef CV_CPU_SIMD_FILENAME -]], - ["mcpp_generated/modules/imgproc/warp_kernels.sse2.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/modules/imgproc/warp_kernels.sse4_1.cpp"] = [[ - -#include "modules/imgproc/src/precomp.hpp" -#include "modules/imgproc/src/warp_kernels.simd.hpp" -]], - ["mcpp_generated/opencv2/cvconfig.h"] = [[ -#ifndef OPENCV_CVCONFIG_H_INCLUDED -#define OPENCV_CVCONFIG_H_INCLUDED - -/* OpenCV compiled as static or dynamic libs */ -/* #undef BUILD_SHARED_LIBS */ - -/* OpenCV intrinsics optimized code */ -#define CV_ENABLE_INTRINSICS - -/* OpenCV additional optimized code */ -/* #undef CV_DISABLE_OPTIMIZATION */ - -/* Compile for 'real' NVIDIA GPU architectures */ -#define CUDA_ARCH_BIN "" - -/* NVIDIA GPU features are used */ -#define CUDA_ARCH_FEATURES "" - -/* Compile for 'virtual' NVIDIA PTX architectures */ -#define CUDA_ARCH_PTX "" - -/* AMD's Basic Linear Algebra Subprograms Library*/ -/* #undef HAVE_CLAMDBLAS */ - -/* AMD's OpenCL Fast Fourier Transform Library*/ -/* #undef HAVE_CLAMDFFT */ - -/* Clp support */ -/* #undef HAVE_CLP */ - -/* NVIDIA CUDA Runtime API*/ -/* #undef HAVE_CUDA */ - -/* NVIDIA CUDA Basic Linear Algebra Subprograms (BLAS) API*/ -/* #undef HAVE_CUBLAS */ - -/* NVIDIA CUDA Deep Neural Network (cuDNN) API*/ -/* #undef HAVE_CUDNN */ - -/* NVIDIA CUDA Fast Fourier Transform (FFT) API*/ -/* #undef HAVE_CUFFT */ - -/* DirectX */ -#define HAVE_DIRECTX -#define HAVE_DIRECTX_NV12 -#define HAVE_D3D11 -#define HAVE_D3D10 -#define HAVE_D3D9 - -/* Eigen Matrix & Linear Algebra Library */ -/* #undef HAVE_EIGEN */ - -/* Geospatial Data Abstraction Library */ -/* #undef HAVE_GDAL */ - -/* Vulkan support */ -/* #undef HAVE_VULKAN */ - -/* Define to 1 if you have the header file. */ -/* #undef HAVE_INTTYPES_H */ - -/* Intel Integrated Performance Primitives */ -/* #undef HAVE_IPP */ -/* #undef HAVE_IPP_ICV */ -/* #undef HAVE_IPP_IW */ -/* #undef HAVE_IPP_IW_LL */ - -/* JPEG-2000 codec */ -/* #undef HAVE_OPENJPEG */ -/* #undef HAVE_JASPER */ - -/* AVIF codec */ -/* #undef HAVE_AVIF */ - -/* IJG JPEG codec */ -#define HAVE_JPEG - -/* JPEG XL codec */ -/* #undef HAVE_JPEGXL */ - -/* GDCM DICOM codec */ -/* #undef HAVE_GDCM */ - -/* NVIDIA Video Decoding API*/ -/* #undef HAVE_NVCUVID */ -/* #undef HAVE_NVCUVID_HEADER */ -/* #undef HAVE_DYNLINK_NVCUVID_HEADER */ - -/* NVIDIA Video Encoding API*/ -/* #undef HAVE_NVCUVENC */ - -/* OpenCL Support */ -/* #undef HAVE_OPENCL */ -/* #undef HAVE_OPENCL_STATIC */ -/* #undef HAVE_OPENCL_SVM */ - -/* NVIDIA OpenCL D3D Extensions support */ -/* #undef HAVE_OPENCL_D3D11_NV */ - -/* OpenEXR codec */ -/* #undef HAVE_OPENEXR */ - -/* OpenGL support*/ -/* #undef HAVE_OPENGL */ - -/* PNG codec */ -#define HAVE_PNG - -/* PNG codec */ -/* #undef HAVE_SPNG */ - -/* Posix threads (pthreads) */ -/* #undef HAVE_PTHREAD */ - -/* parallel_for with pthreads */ -/* #undef HAVE_PTHREADS_PF */ - -/* Intel Threading Building Blocks */ -/* #undef HAVE_TBB */ - -/* Ste||ar Group High Performance ParallelX */ -/* #undef HAVE_HPX */ - -/* TIFF codec */ -/* #undef HAVE_TIFF */ - -/* Define if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -/* #undef WORDS_BIGENDIAN */ - -/* VA library (libva) */ -/* #undef HAVE_VA */ - -/* Intel VA-API/OpenCL */ -/* #undef HAVE_VA_INTEL */ - -/* Lapack */ -/* #undef HAVE_LAPACK */ - -/* Library was compiled with functions instrumentation */ -/* #undef ENABLE_INSTRUMENTATION */ - -/* OpenCV trace utilities */ -#define OPENCV_TRACE - -/* The font "uni" (WQY MicroHei) is available */ -/* #undef HAVE_UNIFONT */ - -#endif // OPENCV_CVCONFIG_H_INCLUDED -]], - ["mcpp_generated/opencv2/opencv_modules.hpp"] = [[ -/* - * ** File generated automatically, do not modify ** - * - * This file defines the list of modules available in current build configuration - * - * -*/ - -// This definition means that OpenCV is built with enabled non-free code. -// For example, patented algorithms for non-profit/non-commercial use only. -/* #undef OPENCV_ENABLE_NONFREE */ - -#define HAVE_OPENCV_CORE -#define HAVE_OPENCV_DNN -#define HAVE_OPENCV_FLANN -#define HAVE_OPENCV_GEOMETRY -#define HAVE_OPENCV_HIGHGUI -#define HAVE_OPENCV_IMGCODECS -#define HAVE_OPENCV_IMGPROC -#define HAVE_OPENCV_VIDEOIO - - -]], - ["mcpp_generated/opencv_data_config.hpp"] = [[ - -#define OPENCV_INSTALL_PREFIX "install" - -#define OPENCV_DATA_INSTALL_PATH "etc" - -#define OPENCV_BUILD_DIR "" - -#define OPENCV_DATA_BUILD_DIR_SEARCH_PATHS \ - "../opencv-5.0.0/" - -#define OPENCV_INSTALL_DATA_DIR_RELATIVE "../../../etc" -]], - ["mcpp_generated/tu_manifest.txt"] = [[ -jpeg12 3rdparty/libjpeg-turbo/src/jcapistd.c -jpeg12 3rdparty/libjpeg-turbo/src/jccolor.c -jpeg12 3rdparty/libjpeg-turbo/src/jcdiffct.c -jpeg12 3rdparty/libjpeg-turbo/src/jclossls.c -jpeg12 3rdparty/libjpeg-turbo/src/jcmainct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcprepct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcsample.c -jpeg12 3rdparty/libjpeg-turbo/src/jdapistd.c -jpeg12 3rdparty/libjpeg-turbo/src/jdcolor.c -jpeg12 3rdparty/libjpeg-turbo/src/jddiffct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdlossls.c -jpeg12 3rdparty/libjpeg-turbo/src/jdmainct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdpostct.c -jpeg12 3rdparty/libjpeg-turbo/src/jdsample.c -jpeg12 3rdparty/libjpeg-turbo/src/jutils.c -jpeg12 3rdparty/libjpeg-turbo/src/jccoefct.c -jpeg12 3rdparty/libjpeg-turbo/src/jcdctmgr.c -jpeg12 3rdparty/libjpeg-turbo/src/jdcoefct.c -jpeg12 3rdparty/libjpeg-turbo/src/jddctmgr.c -jpeg12 3rdparty/libjpeg-turbo/src/jdmerge.c -jpeg12 3rdparty/libjpeg-turbo/src/jfdctfst.c -jpeg12 3rdparty/libjpeg-turbo/src/jfdctint.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctflt.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctfst.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctint.c -jpeg12 3rdparty/libjpeg-turbo/src/jidctred.c -jpeg12 3rdparty/libjpeg-turbo/src/jquant1.c -jpeg12 3rdparty/libjpeg-turbo/src/jquant2.c -jpeg16 3rdparty/libjpeg-turbo/src/jcapistd.c -jpeg16 3rdparty/libjpeg-turbo/src/jccolor.c -jpeg16 3rdparty/libjpeg-turbo/src/jcdiffct.c -jpeg16 3rdparty/libjpeg-turbo/src/jclossls.c -jpeg16 3rdparty/libjpeg-turbo/src/jcmainct.c -jpeg16 3rdparty/libjpeg-turbo/src/jcprepct.c -jpeg16 3rdparty/libjpeg-turbo/src/jcsample.c -jpeg16 3rdparty/libjpeg-turbo/src/jdapistd.c -jpeg16 3rdparty/libjpeg-turbo/src/jdcolor.c -jpeg16 3rdparty/libjpeg-turbo/src/jddiffct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdlossls.c -jpeg16 3rdparty/libjpeg-turbo/src/jdmainct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdpostct.c -jpeg16 3rdparty/libjpeg-turbo/src/jdsample.c -jpeg16 3rdparty/libjpeg-turbo/src/jutils.c -]], - }, - include_dirs = { - "mcpp_generated", - "*", - "*/3rdparty/dlpack/include", - "mcpp_generated/3rdparty/libjpeg-turbo", - "*/3rdparty/libjpeg-turbo/src", - "mcpp_generated/3rdparty/zlib", - "*/3rdparty/zlib", - "*/modules/core/include", - "mcpp_generated/modules/core", - "*/modules/flann/include", - "mcpp_generated/modules/flann", - "*/modules/geometry/include", - "mcpp_generated/modules/geometry", - "*/modules/imgproc/include", - "mcpp_generated/modules/imgproc", - "*/modules/dnn/include", - "mcpp_generated/modules/dnn", - "*/modules/dnn/misc/caffe", - "*/modules/dnn/misc/tensorflow", - "*/modules/dnn/misc/onnx", - "*/3rdparty/protobuf/src", - "*/3rdparty/libpng", - "*/modules/imgcodecs/include", - "mcpp_generated/modules/imgcodecs", - "*/modules/videoio/include", - "mcpp_generated/modules/videoio", - "*/modules/highgui/include", - "mcpp_generated/modules/highgui", - }, - ldflags = { "-lole32" }, - sources = { - [[ -*/3rdparty/libjpeg-turbo/src/{jaricom,jcapimin,jcapistd,jcarith,jccoefct,jccolor,jcdctmgr,jcdiffct,jchuff,jcicc,jcinit,jclhuff,jclossls,jcmainct,jcmarker,jcmaster,jcomapi,jcparam,jcphuff,jcprepct,jcsample,jctrans,jdapimin,jdapistd,jdarith,jdatadst,jdatasrc,jdcoefct,jdcolor,jddctmgr,jddiffct,jdhuff,jdicc,jdinput,jdlhuff,jdlossls,jdmainct,jdmarker,jdmaster,jdmerge,jdphuff,jdpostct,jdsample,jdtrans,jerror,jfdctflt,jfdctfst,jfdctint,jidctflt,jidctfst,jidctint,jidctred,jmemmgr,jmemnobs,jpeg_nbits,jquant1,jquant2,jutils}.c]], - "*/3rdparty/libpng/*.c", - "*/3rdparty/libpng/intel/*.c", - "*/3rdparty/zlib/*.c", - "*/modules/core/src/*.cpp", - "*/modules/core/src/opencl/runtime/*.cpp", - "*/modules/core/src/parallel/*.cpp", - "*/modules/core/src/utils/*.cpp", - "*/modules/flann/src/*.cpp", - "*/modules/geometry/src/*.cpp", - "*/modules/geometry/src/ptcloud/*.cpp", - "*/modules/geometry/src/usac/*.cpp", - "*/modules/highgui/src/{backend,roiSelector,window}.cpp", - "*/modules/imgcodecs/src/*.cpp", - [[ -*/modules/imgproc/src/{accum,accum.dispatch,bilateral_filter.dispatch,blend,box_filter.dispatch,canny,clahe,color,color_hsv.dispatch,color_lab,color_rgb.dispatch,color_yuv.dispatch,colormap,connectedcomponents,contours_approx,contours_common,contours_link,contours_new,contours_truco,corner,corner.avx,cornersubpix,demosaicing,deriv,distransform,drawing,drawing_text,emd_new,filter.dispatch,fisheye,floodfill,gabor,generalized_hough,grabcut,histogram,hough,imgwarp,imgwarp.avx2,imgwarp.sse4_1,lsd,main,median_blur.dispatch,morph.dispatch,phasecorr,phasecorr_iterative,pyramids,resize,resize.avx2,resize.sse4_1,samplers,segmentation,smooth.dispatch,spatialgradient,stackblur,stb_truetype,sumpixels.dispatch,tables,templmatch,thresh,undistort.dispatch,utils}.cpp]], - "*/modules/videoio/src/{backend_plugin,backend_static,cap,cap_ffmpeg,cap_images,cap_mjpeg_decoder,cap_mjpeg_encoder,container_avi,videoio_registry}.cpp", - [[ -mcpp_generated/modules/core/{arithm.avx2,arithm.sse4_1,convert.avx2,convert_scale.avx2,count_non_zero.avx2,has_non_zero.avx2,mathfuncs_core.avx,mathfuncs_core.avx2,matmul.avx2,matmul.avx512_skx,matmul.sse4_1,mean.avx2,merge.avx2,minmax.avx2,minmax.sse4_1,nan_mask.avx2,norm.avx,norm.avx2,norm.sse4_1,reduce.avx2,split.avx2,stat.avx2,stat.sse4_2,sum.avx2,transpose.avx,transpose.avx2}.cpp]], - [[ -mcpp_generated/modules/imgproc/{accum.avx,accum.avx2,accum.sse4_1,bilateral_filter.avx2,bilateral_filter.avx512_skx,box_filter.avx2,box_filter.avx512_skx,box_filter.sse4_1,color_hsv.avx2,color_hsv.sse4_1,color_rgb.avx2,color_rgb.sse4_1,color_yuv.avx2,color_yuv.sse4_1,filter.avx2,filter.sse4_1,median_blur.avx2,median_blur.avx512_skx,median_blur.sse4_1,morph.avx2,morph.sse4_1,smooth.avx2,smooth.sse4_1,sumpixels.avx2,sumpixels.avx512_skx,undistort.avx2,warp_kernels.avx2,warp_kernels.sse4_1}.cpp]], - }, - }, - }, - name = "compat.opencv", - namespace = "compat", - repo = "https://github.com/opencv/opencv", - spec = "1", - type = "package", - xpm = { - linux = { - ["5.0.0"] = { - sha256 = "b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095", - url = { - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/5.0.0/opencv-5.0.0.tar.gz", - GLOBAL = "https://github.com/opencv/opencv/archive/refs/tags/5.0.0.tar.gz", - }, - }, - }, - macosx = { - ["5.0.0"] = { - sha256 = "b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095", - url = { - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/5.0.0/opencv-5.0.0.tar.gz", - GLOBAL = "https://github.com/opencv/opencv/archive/refs/tags/5.0.0.tar.gz", - }, - }, - }, - windows = { - ["5.0.0"] = { - sha256 = "b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095", - url = { - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/5.0.0/opencv-5.0.0.tar.gz", - GLOBAL = "https://github.com/opencv/opencv/archive/refs/tags/5.0.0.tar.gz", - }, - }, - }, - }, -} diff --git a/pkgs/o/opencv.lua b/pkgs/o/opencv.lua index b4c52cb..aceec65 100644 --- a/pkgs/o/opencv.lua +++ b/pkgs/o/opencv.lua @@ -2,55 +2,69 @@ -- mcpp.toml. mcpp's default lookup finds /*/mcpp.toml inside -- the GitHub source tarball wrap. -- --- The package is the thin C++23 module layer (import opencv.cv; and the --- per-module interfaces) over OpenCV 5's unchanged C++ API; the OpenCV --- sources themselves arrive through its compat.opencv dependency (full --- source build with SIMD dispatch + build.mcpp consumer-side synthesis, --- plus the compat.ffmpeg videoio backend — see pkgs/c/compat.opencv.lua). --- Optional features (0.0.4+, mcpp#243 forwarding): `dnn` adds the --- import opencv.dnn; interface and forwards compat.opencv/dnn; `unifont` --- forwards compat.opencv/unifont — `opencv = { features = ["dnn"] }`. --- 3-platform: the module tarball is OS-neutral; compat.opencv is per-OS (all - -- three now full — videoio everywhere, dnn on linux/macOS/windows). v0.0.6's - -- clang static-inline export forwarding layer lets clang (macOS + windows - -- clang-cl) import opencv.cv; windows dnn uses the built-in fast_gemm backend - -- (compat.opencv skips mlas there — its x86 asm is GAS/ELF, not COFF). +-- Since 0.0.7 the package is SINGLE-REPO: opencv-m carries both the C++23 +-- module layer (import opencv.cv; and the per-module interfaces) and the +-- full OpenCV 5.0.0 source build. The upstream sources are vendored in the +-- release tarball (third_party/opencv-5.0.0/ — pruned import of the official +-- tag, sha256-pinned, patch-free) together with the frozen per-OS configure +-- snapshots (gen/), so no CMake runs on the consumer side and this index no +-- longer carries a compat.opencv descriptor: it was retired in the same +-- change, along with compat.opencv-unifont and tools/compat-opencv/. +-- +-- The only remaining external dependency is compat.ffmpeg, declared by the +-- package's own mcpp.toml for the videoio FFmpeg backend. +-- +-- Three platforms, one OS-neutral tarball: the per-OS differences live in the +-- package's gen/ snapshots and mcpp.toml, and all three are verified by the +-- package's own CI (linux gcc/llvm/musl-static, macOS llvm, windows llvm). +-- Optional features: `dnn` adds the import opencv.dnn; interface plus the +-- underlying dnn sources (mlas on linux/macOS; the built-in fast_gemm backend +-- on windows, where upstream mlas x86 assembly is GAS/ELF and clang-cl cannot +-- emit COFF from it); `unifont` embeds the CJK font behind FontFace("uni") — +-- `opencv = { features = ["dnn"] }`. +-- +-- Requires mcpp >= 0.0.102: per-OS feature semantics (mcpp#253, 0.0.101) plus +-- the windows scan-deps command-line fix (mcpp#261, 0.0.102). As a consumed +-- dependency the package's own TUs compile from under the ~124-char registry +-- xpkgs path rather than a short checkout, which pushed the clang scan-deps +-- command past cmd.exe's 8191-char ceiling under 0.0.101; 0.0.102 drops the +-- `cmd /c` redirect wrapper (clang-scan-deps -o) and restores the 32767 limit. -- package = { spec = "1", name = "opencv", namespace = "", - description = "C++23 module package for OpenCV 5 (import opencv.cv) — full source build via compat.opencv, C++ API unchanged", - licenses = {"MIT"}, -- module layer; upstream via compat.opencv is Apache-2.0 + description = "C++23 module package for OpenCV 5 (import opencv.cv) — vendored full source build, C++ API unchanged", + licenses = {"MIT"}, -- module layer; the vendored OpenCV itself is Apache-2.0 repo = "https://github.com/Sunrisepeak/opencv-m", type = "package", xpm = { linux = { - ["0.0.6"] = { + ["0.0.9"] = { url = { - GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v0.0.6.tar.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/v0.0.6/opencv-m-0.0.6.tar.gz", + GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v0.0.9.tar.gz", + CN = "https://gitcode.com/mcpp-res/opencv/releases/download/v0.0.9/opencv-m-0.0.9.tar.gz", }, - sha256 = "adebd6b1e7a434bf8d744a6fc191725466467ae13b4d7ee1c01d5a8e21bbf2eb", + sha256 = "888c45ad6b558d4172ac570ff97f3c931c8a3a229e294574da788221938d768a", }, }, macosx = { - ["0.0.6"] = { + ["0.0.9"] = { url = { - GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v0.0.6.tar.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/v0.0.6/opencv-m-0.0.6.tar.gz", + GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v0.0.9.tar.gz", + CN = "https://gitcode.com/mcpp-res/opencv/releases/download/v0.0.9/opencv-m-0.0.9.tar.gz", }, - sha256 = "adebd6b1e7a434bf8d744a6fc191725466467ae13b4d7ee1c01d5a8e21bbf2eb", + sha256 = "888c45ad6b558d4172ac570ff97f3c931c8a3a229e294574da788221938d768a", }, }, windows = { - ["0.0.6"] = { + ["0.0.9"] = { url = { - GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v0.0.6.tar.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/v0.0.6/opencv-m-0.0.6.tar.gz", + GLOBAL = "https://github.com/Sunrisepeak/opencv-m/archive/refs/tags/v0.0.9.tar.gz", + CN = "https://gitcode.com/mcpp-res/opencv/releases/download/v0.0.9/opencv-m-0.0.9.tar.gz", }, - sha256 = "adebd6b1e7a434bf8d744a6fc191725466467ae13b4d7ee1c01d5a8e21bbf2eb", + sha256 = "888c45ad6b558d4172ac570ff97f3c931c8a3a229e294574da788221938d768a", }, }, }, diff --git a/tests/examples/opencv-dnn/mcpp.toml b/tests/examples/opencv-dnn/mcpp.toml deleted file mode 100644 index 84fa46c..0000000 --- a/tests/examples/opencv-dnn/mcpp.toml +++ /dev/null @@ -1,26 +0,0 @@ -# compat.opencv `dnn` feature test: the deep-learning module as an ADDITIVE -# feature (+309 TUs: modules/dnn + vendored protobuf + mlas incl. .S -# kernels) joining the same lib. Linux-only like the base package; no-op -# main elsewhere. -[package] -name = "opencv-dnn-tests" -version = "0.1.0" - -[indices] -compat = { path = "../../.." } - -[target.'cfg(linux)'.dependencies.compat] -opencv = { version = "5.0.0", features = ["dnn"] } - -# macOS-arm64 dnn: compat.opencv now carries a per-OS NEON dnn feature -# (mcpp#253 per-OS features; mlas/lib/aarch64 + neon kernels). Builds the full -# dnn closure from source and runs the same blobFromImage assertion. -[target.'cfg(macos)'.dependencies.compat] -opencv = { version = "5.0.0", features = ["dnn"] } - -# windows-x86_64 dnn: mlas is skipped (its x86 kernels are GAS/ELF .S, not COFF- -# assemblable under clang-cl), so DNN uses OpenCV's built-in fast_gemm (.cpp -# AVX/AVX2 kernels) — same blobFromImage assertion, no mlas. -[target.'cfg(windows)'.dependencies.compat] -opencv = { version = "5.0.0", features = ["dnn"] } - diff --git a/tests/examples/opencv-dnn/tests/opencv_dnn_feature.cpp b/tests/examples/opencv-dnn/tests/opencv_dnn_feature.cpp deleted file mode 100644 index a4a9dad..0000000 --- a/tests/examples/opencv-dnn/tests/opencv_dnn_feature.cpp +++ /dev/null @@ -1,27 +0,0 @@ -// (file deliberately NOT named dnn.cpp: it would collide with the dep's -// modules/dnn/src/dnn.cpp — the #233 disambiguation misses test-target -// scan edges, same family as mcpp#240.) -// dnn feature assertion: blobFromImage produces a correctly-shaped and -// correctly-valued NCHW blob (exercises dnn core + the whole protobuf/mlas -// link closure), and an empty Net constructs. Linux-only (see mcpp.toml). -#if defined(__linux__) || defined(__APPLE__) || defined(_WIN32) -#include -#include -#include - -int main() { - cv::Mat img(32, 32, CV_8UC3, cv::Scalar(10, 20, 30)); - cv::Mat blob = cv::dnn::blobFromImage(img, 1.0 / 255.0, cv::Size(16, 16), - cv::Scalar(), true, false); - if (blob.dims != 4 || blob.size[0] != 1 || blob.size[1] != 3 - || blob.size[2] != 16 || blob.size[3] != 16) return 1; - float v = blob.ptr(0)[0]; - if (v < 0.117f || v > 0.118f) return 2; // 30/255, channels swapped - cv::dnn::Net net; - if (!net.empty()) return 3; - std::printf("dnn feature ok: blobFromImage 1x3x16x16, first=%f\n", v); - return 0; -} -#else -int main() { return 0; } -#endif diff --git a/tests/examples/opencv-module-dnn/mcpp.toml b/tests/examples/opencv-module-dnn/mcpp.toml index 809d16d..f26590b 100644 --- a/tests/examples/opencv-module-dnn/mcpp.toml +++ b/tests/examples/opencv-module-dnn/mcpp.toml @@ -1,9 +1,7 @@ # Public `opencv` module package `dnn` FEATURE test: `opencv = { features = -# ["dnn"] }` forwards compat.opencv/dnn (mcpp#243) AND compiles opencv-m's -# opencv.dnn interface, so `import opencv.dnn;` is available. Reuses the -# compat.opencv+dnn store artifact built by the opencv-dnn member (same feature -# set — no extra heavy build). Linux-only (compat.opencv linux snapshot); -# off-Linux the test compiles to a no-op main(). +# ["dnn"] }` builds the underlying dnn sources and compiles opencv-m's +# opencv.dnn interface, so `import opencv.dnn;` is available. All three +# platforms (mlas on linux/macOS, built-in fast_gemm on windows). [package] name = "opencv-module-dnn-tests" version = "0.1.0" @@ -12,15 +10,14 @@ version = "0.1.0" default = { path = "../../.." } [target.'cfg(linux)'.dependencies] -opencv = { version = "0.0.6", features = ["dnn"] } +opencv = { version = "0.0.9", features = ["dnn"] } -# macOS: `import opencv.dnn;` on macOS-arm64 (opencv-m dnn feature is OS-neutral; -# forwards compat.opencv/dnn which now has the per-OS NEON dnn payload). +# macOS: `import opencv.dnn;` on macOS-arm64 (per-OS NEON dnn payload). [target.'cfg(macos)'.dependencies] -opencv = { version = "0.0.6", features = ["dnn"] } +opencv = { version = "0.0.9", features = ["dnn"] } # windows: `import opencv.dnn;` on windows-x86_64 (fast_gemm backend). [target.'cfg(windows)'.dependencies] -opencv = { version = "0.0.6", features = ["dnn"] } +opencv = { version = "0.0.9", features = ["dnn"] } diff --git a/tests/examples/opencv-module-dnn/tests/opencv_dnn_iface.cpp b/tests/examples/opencv-module-dnn/tests/opencv_dnn_iface.cpp index 18972c3..2bb8dea 100644 --- a/tests/examples/opencv-module-dnn/tests/opencv_dnn_iface.cpp +++ b/tests/examples/opencv-module-dnn/tests/opencv_dnn_iface.cpp @@ -1,7 +1,7 @@ // The opencv.dnn MODULE interface (not textual headers) must expose the dnn -// surface when opencv is pulled with features=["dnn"] — proves the module-level -// dep/feat forward compiled src/dnn.cppm and built compat.opencv with dnn. -// Linux-only (see mcpp.toml). Not named dnn.cpp (would collide with the dep's +// surface when opencv is pulled with features=["dnn"] — proves the feature +// compiled src/dnn.cppm and built the underlying dnn sources. +// Not named dnn.cpp (would collide with the dep's // modules/dnn/src/dnn.cpp — #240 family). Import-only (import std + the opencv // modules): no textual headers, matching the ffmpeg-module member convention. #if defined(__linux__) || defined(__APPLE__) || defined(_WIN32) diff --git a/tests/examples/opencv-module-unifont/mcpp.toml b/tests/examples/opencv-module-unifont/mcpp.toml index 8bf3203..593ede2 100644 --- a/tests/examples/opencv-module-unifont/mcpp.toml +++ b/tests/examples/opencv-module-unifont/mcpp.toml @@ -1,8 +1,6 @@ # Public `opencv` module package `unifont` FEATURE test: `opencv = { features = -# ["unifont"] }` forwards compat.opencv/unifont (mcpp#243 — pure forward, no new -# module surface), so FontFace("uni") renders CJK through `import opencv.cv;`. -# Reuses the compat.opencv+unifont store artifact from the opencv-unifont member. -# Linux-only; no-op main elsewhere. +# ["unifont"] }` embeds the CJK font (no new module surface), so FontFace("uni") +# renders CJK through `import opencv.cv;`. Exercised on linux and macOS. [package] name = "opencv-module-unifont-tests" version = "0.1.0" @@ -11,7 +9,7 @@ version = "0.1.0" default = { path = "../../.." } [target.'cfg(linux)'.dependencies] -opencv = { version = "0.0.6", features = ["unifont"] } +opencv = { version = "0.0.9", features = ["unifont"] } [target.'cfg(macos)'.dependencies] -opencv = { version = "0.0.6", features = ["unifont"] } +opencv = { version = "0.0.9", features = ["unifont"] } diff --git a/tests/examples/opencv-module-unifont/tests/opencv_unifont_iface.cpp b/tests/examples/opencv-module-unifont/tests/opencv_unifont_iface.cpp index bcc5aca..7493eeb 100644 --- a/tests/examples/opencv-module-unifont/tests/opencv_unifont_iface.cpp +++ b/tests/examples/opencv-module-unifont/tests/opencv_unifont_iface.cpp @@ -1,6 +1,5 @@ -// The "uni" FontFace only exists when opencv's unifont feature forwarded -// compat.opencv/unifont — CJK rendering through the module layer must ink. -// Linux-only (see mcpp.toml). Import-only (import std + opencv.cv): no textual +// The "uni" FontFace only exists when opencv's unifont feature embedded the +// font — CJK rendering through the module layer must ink. Import-only (import std + opencv.cv): no textual // headers, matching the ffmpeg-module member convention. #if defined(__linux__) || defined(__APPLE__) import std; diff --git a/tests/examples/opencv-module/mcpp.toml b/tests/examples/opencv-module/mcpp.toml index 82e5dbd..f4c575e 100644 --- a/tests/examples/opencv-module/mcpp.toml +++ b/tests/examples/opencv-module/mcpp.toml @@ -1,27 +1,26 @@ # Public `opencv` C++23-module package test (bare-name consumption from the # builtin default namespace — resolved against THIS checkout via the # member-level `[indices] default` redirect, mcpp >= 0.0.97; kept per-member -# and single-entry because xlings breaks with >1 project index repo, mcpp#238). Replaces the -# former tests/smoke_opencv_module.sh reseeding driver. The package is -# linux-only (it pulls the linux-only compat.opencv source build); off-Linux -# the test compiles to a no-op main(). +# and single-entry because xlings breaks with >1 project index repo, mcpp#238). +# Since opencv 0.0.7 the package is single-repo: the OpenCV sources are +# vendored in its own release tarball, so this member exercises the whole +# source build on all three platforms. [package] name = "opencv-module-tests" version = "0.1.0" -# The module package's own transitive dep (compat.opencv) resolves from the -# GLOBAL published compat index (the compat namespace is not redirected here -# — see the mcpp#238 single-repo constraint); the compat descriptor itself is -# pre-merge-validated by its dedicated member. +# The package's only remaining transitive dep is compat.ffmpeg (videoio +# backend), which resolves from the GLOBAL published compat index — the +# compat namespace is not redirected here, see the mcpp#238 constraint. [indices] default = { path = "../../.." } [target.'cfg(linux)'.dependencies] -opencv = "0.0.6" +opencv = "0.0.9" [target.'cfg(macos)'.dependencies] -opencv = "0.0.6" +opencv = "0.0.9" # windows: import opencv.cv on windows-x86_64 (clang-cl; module tarball OS-neutral). [target.'cfg(windows)'.dependencies] -opencv = "0.0.6" +opencv = "0.0.9" diff --git a/tests/examples/opencv-module/tests/opencv_module.cpp b/tests/examples/opencv-module/tests/opencv_module.cpp index 417e5de..d078ec6 100644 --- a/tests/examples/opencv-module/tests/opencv_module.cpp +++ b/tests/examples/opencv-module/tests/opencv_module.cpp @@ -2,7 +2,7 @@ // (`import opencv.cv;`), pinned version, Mat/imgproc ops (incl. the // replacement operator surface: Size comparison via != crosses the module // boundary — the v0.0.1 regression scenario), PNG+JPEG codec roundtrips, -// videoio registry. Linux-only (see mcpp.toml). +// videoio registry. #if defined(__linux__) || defined(__APPLE__) || defined(_WIN32) import std; import opencv.cv; diff --git a/tests/examples/opencv-unifont/mcpp.toml b/tests/examples/opencv-unifont/mcpp.toml deleted file mode 100644 index 2593fe5..0000000 --- a/tests/examples/opencv-unifont/mcpp.toml +++ /dev/null @@ -1,17 +0,0 @@ -# compat.opencv `unifont` feature test: long-form dependency requesting the -# feature — pulls the compat.opencv-unifont font asset, build.mcpp embeds it -# (builtin_font_uni.h) and HAVE_UNIFONT rides the package defines, so -# putText gains Unicode/CJK coverage (the "uni" builtin FontFace exists). -# Linux-only like the base package; no-op main elsewhere. -[package] -name = "opencv-unifont-tests" -version = "0.1.0" - -[indices] -compat = { path = "../../.." } - -[target.'cfg(linux)'.dependencies.compat] -opencv = { version = "5.0.0", features = ["unifont"] } - -[target.'cfg(macos)'.dependencies.compat] -opencv = { version = "5.0.0", features = ["unifont"] } diff --git a/tests/examples/opencv-unifont/tests/unifont.cpp b/tests/examples/opencv-unifont/tests/unifont.cpp deleted file mode 100644 index 77eeea7..0000000 --- a/tests/examples/opencv-unifont/tests/unifont.cpp +++ /dev/null @@ -1,24 +0,0 @@ -// unifont feature assertion: the "uni" builtin font face only exists when -// compat.opencv was built with HAVE_UNIFONT (drawing_text.cpp gates the -// builtinFontData entry), so its usability IS the feature probe; CJK -// rendering through it must produce real ink. Linux-only (see mcpp.toml). -#if defined(__linux__) || defined(__APPLE__) -#include -#include -#include - -int main() { - cv::FontFace uni("uni"); - cv::Mat img(64, 256, CV_8UC1, cv::Scalar(0)); - cv::putText(img, "中文字体", cv::Point(8, 44), cv::Scalar(255), uni, 28); - int ink = cv::countNonZero(img); - if (ink < 100) { - std::printf("unifont: CJK ink %d too low — font not embedded?\n", ink); - return 1; - } - std::printf("unifont ok: CJK putText ink=%d\n", ink); - return 0; -} -#else -int main() { return 0; } -#endif diff --git a/tests/examples/opencv-win/mcpp.toml b/tests/examples/opencv-win/mcpp.toml deleted file mode 100644 index 3e2e2af..0000000 --- a/tests/examples/opencv-win/mcpp.toml +++ /dev/null @@ -1,12 +0,0 @@ -# compat.opencv on windows-x86_64: the CORE profile (core/imgproc/imgcodecs, -# headless, x86_64 SIMD dispatch via clang .simd.cpp). videoio+FFmpeg is not yet -# in the windows profile (jpeg-turbo NASM SIMD is also off — C fallback), so this -# member asserts the image-processing core rather than the full videoio surface the -# `opencv` member exercises on linux/macOS. windows-only. -[package] -name = "opencv-win-tests" -version = "0.1.0" -[indices] -compat = { path = "../../.." } -[target.'cfg(windows)'.dependencies.compat] -opencv = "5.0.0" diff --git a/tests/examples/opencv-win/tests/opencv_win.cpp b/tests/examples/opencv-win/tests/opencv_win.cpp deleted file mode 100644 index 33ac030..0000000 --- a/tests/examples/opencv-win/tests/opencv_win.cpp +++ /dev/null @@ -1,26 +0,0 @@ -// compat.opencv windows-x86_64 CORE end-to-end: mcpp clang-MSVC source build of -// core/imgproc/imgcodecs — Mat ops, imgproc, PNG codec roundtrip — x86_64 SIMD -// dispatch, headless. videoio is macOS/linux-only for now (see mcpp.toml). win-only. -#ifdef _WIN32 -#include -#include -#include -#include -#include -int main() { - if (cv::getVersionString() != "5.0.0") return 1; - cv::Mat img(64, 64, CV_8UC3, cv::Scalar(30, 60, 90)); - cv::circle(img, {32, 32}, 20, {255, 255, 255}, -1); - cv::Mat big, gray; - cv::resize(img, big, {128, 128}, 0, 0, cv::INTER_CUBIC); - cv::cvtColor(big, gray, cv::COLOR_BGR2GRAY); - if (gray.size() != cv::Size(128, 128)) return 2; - std::vector buf; - if (!cv::imencode(".png", big, buf)) return 3; - if (cv::imdecode(buf, cv::IMREAD_COLOR).empty()) return 4; - std::printf("compat.opencv 5.0.0 windows ok: core/imgproc/imgcodecs (x86_64 SIMD, headless)\n"); - return 0; -} -#else -int main() { return 0; } -#endif diff --git a/tests/examples/opencv/mcpp.toml b/tests/examples/opencv/mcpp.toml deleted file mode 100644 index 490f436..0000000 --- a/tests/examples/opencv/mcpp.toml +++ /dev/null @@ -1,19 +0,0 @@ -# OpenCV 5 test project. compat.opencv (unified: the old install()-CMake 4.13 -# form is gone) compiles OpenCV 5.0.0 from source with mcpp itself — real -# tarball paths + config snapshot + build.mcpp synthesis (fonts, OpenCL -# kernel embeddings, jpeg12/16 re-compile stubs) — and pulls compat.ffmpeg -# transitively for the videoio FFmpeg backend. Linux-only for now: the -# config snapshot is target-specific; off-Linux the test compiles to a -# no-op main() so `mcpp test --workspace` is a clean no-op there. -[package] -name = "opencv-tests" -version = "0.1.0" - -[indices] -compat = { path = "../../.." } - -[target.'cfg(linux)'.dependencies.compat] -opencv = "5.0.0" - -[target.'cfg(macos)'.dependencies.compat] -opencv = "5.0.0" diff --git a/tests/examples/opencv/tests/opencv_compat.cpp b/tests/examples/opencv/tests/opencv_compat.cpp deleted file mode 100644 index 144bb79..0000000 --- a/tests/examples/opencv/tests/opencv_compat.cpp +++ /dev/null @@ -1,59 +0,0 @@ -// compat.opencv end-to-end assertion: the source build must expose the -// five-module surface (Mat/imgproc ops, PNG codec roundtrip) AND the -// FFmpeg videoio backend pulled in through the compat.ffmpeg dependency — -// proven by a real mp4 encode -> decode roundtrip on linux + macOS, not just registry -// presence. Linux-only (see mcpp.toml). -#if defined(__linux__) || defined(__APPLE__) -#include -#include -#include -#include -#include -#include -#include -#include - -int main() { - if (cv::getVersionString() != "5.0.0") return 1; - - cv::Mat img(64, 64, CV_8UC3, cv::Scalar(30, 60, 90)); - cv::circle(img, {32, 32}, 20, {255, 255, 255}, -1); - cv::Mat big, gray; - cv::resize(img, big, {128, 128}, 0, 0, cv::INTER_CUBIC); - cv::cvtColor(big, gray, cv::COLOR_BGR2GRAY); - if (gray.size() != cv::Size(128, 128)) return 2; - - std::vector buf; - if (!cv::imencode(".png", big, buf)) return 3; - if (cv::imdecode(buf, cv::IMREAD_COLOR).empty()) return 4; - - if (!cv::videoio_registry::hasBackend(cv::CAP_FFMPEG)) return 5; - const std::string path = "compat_opencv_roundtrip.mp4"; - { - cv::VideoWriter w(path, cv::CAP_FFMPEG, - cv::VideoWriter::fourcc('m','p','4','v'), 25.0, - cv::Size(128, 128)); - if (!w.isOpened()) return 6; - for (int i = 0; i < 10; i++) { - cv::Mat f(128, 128, CV_8UC3, cv::Scalar(10 * i, 128, 255 - 10 * i)); - cv::putText(f, std::to_string(i), {8, 100}, - cv::FONT_HERSHEY_SIMPLEX, 2.5, {255, 255, 255}, 3); - w.write(f); - } - } - cv::VideoCapture cap(path, cv::CAP_FFMPEG); - if (!cap.isOpened()) return 7; - int n = 0; cv::Mat f; double meanB0 = -1; - while (cap.read(f)) { if (n == 0) meanB0 = cv::mean(f)[0]; n++; } - std::remove(path.c_str()); - if (n != 10) return 8; - if (meanB0 < 0 || meanB0 > 40) return 9; - - std::printf("compat.opencv %s ok: imgproc/imgcodecs + FFmpeg mp4 roundtrip (%zu backends)\n", - cv::getVersionString().c_str(), - cv::videoio_registry::getBackends().size()); - return 0; -} -#else -int main() { return 0; } -#endif diff --git a/tools/compat-opencv/build_mcpp_template.cpp b/tools/compat-opencv/build_mcpp_template.cpp deleted file mode 100644 index 4eff763..0000000 --- a/tools/compat-opencv/build_mcpp_template.cpp +++ /dev/null @@ -1,362 +0,0 @@ -// build.mcpp for compat.opencv — consumer-side synthesis of OpenCV's -// build-time generated files from the frozen config snapshot. Embedded into -// pkgs/c/compat.opencv.lua by tools/compat-opencv5/gen_descriptor.py. -// -// What it does (all pure transforms of files already in the pinned tarball — -// nothing is downloaded, nothing depends on the host): -// 1. blob2hdr — modules/imgproc/fonts/*.ttf.gz → builtin_font_{sans,italic}.h -// (hex byte arrays; faithful port of cmake ocv_blob2hdr) -// 2. cl2cpp — modules//src/opencl/*.cl → opencl_kernels_.{cpp,hpp} -// (comment-strip + string-escape + md5; faithful port of -// cmake/cl2cpp.cmake; content is #ifdef HAVE_OPENCL-guarded -// and inert in this profile, kept byte-faithful anyway) -// 3. tu stubs — ONLY for the libjpeg-turbo BITS_IN_JSAMPLE=12/16 -// same-source re-compiles (one .c, three compiles — plain -// sources cannot express that), driven by -// mcpp_generated/tu_manifest.txt. Every other TU is a real -// tarball path in `sources` since mcpp 0.0.97 (#233/#234 -// fixed). Stub basenames are group-prefixed so jpeg12 and -// jpeg16 never collide (also dodges mcpp#239). -// The raw `mcpp:` stdout protocol is used (no `import mcpp;`) so this file -// has zero non-standard dependencies. -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace fs = std::filesystem; - -// ── tiny MD5 (RFC 1321, public-domain style condensed implementation) ──── -namespace md5impl { -struct MD5 { - uint32_t a0 = 0x67452301, b0 = 0xefcdab89, c0 = 0x98badcfe, d0 = 0x10325476; - static const uint32_t K[64]; - static const uint32_t R[64]; - void block(const uint8_t* p) { - uint32_t M[16]; - for (int i = 0; i < 16; i++) - M[i] = (uint32_t)p[i*4] | ((uint32_t)p[i*4+1] << 8) | ((uint32_t)p[i*4+2] << 16) | ((uint32_t)p[i*4+3] << 24); - uint32_t A = a0, B = b0, C = c0, D = d0; - for (int i = 0; i < 64; i++) { - uint32_t F; int g; - if (i < 16) { F = (B & C) | (~B & D); g = i; } - else if (i < 32) { F = (D & B) | (~D & C); g = (5*i + 1) % 16; } - else if (i < 48) { F = B ^ C ^ D; g = (3*i + 5) % 16; } - else { F = C ^ (B | ~D); g = (7*i) % 16; } - F = F + A + K[i] + M[g]; - A = D; D = C; C = B; - B = B + ((F << R[i]) | (F >> (32 - R[i]))); - } - a0 += A; b0 += B; c0 += C; d0 += D; - } - static std::string hex(const std::string& data) { - MD5 m; - uint64_t bits = (uint64_t)data.size() * 8; - std::string buf = data; - buf.push_back((char)0x80); - while (buf.size() % 64 != 56) buf.push_back('\0'); - for (int i = 0; i < 8; i++) buf.push_back((char)((bits >> (8*i)) & 0xff)); - for (size_t o = 0; o < buf.size(); o += 64) m.block((const uint8_t*)buf.data() + o); - char out[33]; - uint32_t w[4] = { m.a0, m.b0, m.c0, m.d0 }; - for (int i = 0; i < 16; i++) - std::snprintf(out + 2*i, 3, "%02x", (w[i/4] >> (8*(i%4))) & 0xff); - return std::string(out, 32); - } -}; -const uint32_t MD5::K[64] = { - 0xd76aa478,0xe8c7b756,0x242070db,0xc1bdceee,0xf57c0faf,0x4787c62a,0xa8304613,0xfd469501, - 0x698098d8,0x8b44f7af,0xffff5bb1,0x895cd7be,0x6b901122,0xfd987193,0xa679438e,0x49b40821, - 0xf61e2562,0xc040b340,0x265e5a51,0xe9b6c7aa,0xd62f105d,0x02441453,0xd8a1e681,0xe7d3fbc8, - 0x21e1cde6,0xc33707d6,0xf4d50d87,0x455a14ed,0xa9e3e905,0xfcefa3f8,0x676f02d9,0x8d2a4c8a, - 0xfffa3942,0x8771f681,0x6d9d6122,0xfde5380c,0xa4beea44,0x4bdecfa9,0xf6bb4b60,0xbebfbc70, - 0x289b7ec6,0xeaa127fa,0xd4ef3085,0x04881d05,0xd9d4d039,0xe6db99e5,0x1fa27cf8,0xc4ac5665, - 0xf4292244,0x432aff97,0xab9423a7,0xfc93a039,0x655b59c3,0x8f0ccc92,0xffeff47d,0x85845dd1, - 0x6fa87e4f,0xfe2ce6e0,0xa3014314,0x4e0811a1,0xf7537e82,0xbd3af235,0x2ad7d2bb,0xeb86d391 }; -const uint32_t MD5::R[64] = { - 7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22, 5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20, - 4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23, 6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21 }; -} // namespace md5impl - -static std::string slurp(const fs::path& p) { - std::ifstream f(p, std::ios::binary); - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot read %s\n", p.string().c_str()); std::exit(1); } - std::ostringstream ss; ss << f.rdbuf(); return ss.str(); -} -static void spew(const fs::path& p, const std::string& content) { - fs::create_directories(p.parent_path()); - // only rewrite when changed: keeps ninja restat-friendly timestamps - if (fs::exists(p)) { - std::ifstream f(p, std::ios::binary); std::ostringstream ss; ss << f.rdbuf(); - if (ss.str() == content) return; - } - std::ofstream f(p, std::ios::binary); - f << content; - if (!f) { std::fprintf(stderr, "compat.opencv build.mcpp: cannot write %s\n", p.string().c_str()); std::exit(1); } -} - -// ── gunzip (raw inflate over the vendored zlib? not available here) ───── -// The .ttf.gz blobs are embedded AS-IS: cmake's ocv_blob2hdr hex-dumps the -// *compressed* file bytes (OpenCV decompresses at runtime via its zlib), so -// no inflate is needed here — just a hex dump. -static void blob2hdr(const fs::path& blob, const fs::path& hdr, const std::string& var) { - // byte-faithful port of cmake ocv_blob2hdr: 16 bytes per line, ", " - // separators, the very last ", " trimmed. - std::string data = slurp(blob); - std::ostringstream out; - out << "// Auto generated file.\nstatic const unsigned char " << var << "[] =\n{\n"; - char buf[8]; - for (size_t i = 0; i < data.size(); i++) { - std::snprintf(buf, sizeof buf, "0x%02x", (unsigned char)data[i]); - out << buf; - if (i + 1 != data.size()) out << ", "; - if (i % 16 == 15 && i + 1 != data.size()) out << "\n"; - } - out << "\n};\n"; - spew(hdr, out.str()); -} - -// ── cl2cpp (faithful port of cmake/cl2cpp.cmake) ──────────────────────── -static std::string cl_escape(std::string lines) { - std::string t; - // \r removal + trailing \n + tabs→2 spaces - for (char c : lines) if (c != '\r') t.push_back(c); - t.push_back('\n'); - std::string u; - for (char c : t) { if (c == '\t') u += " "; else u.push_back(c); } - // strip /* */ comments (non-greedy scan) - std::string v; v.reserve(u.size()); - for (size_t i = 0; i < u.size();) { - if (i + 1 < u.size() && u[i] == '/' && u[i+1] == '*') { - size_t e = u.find("*/", i + 2); - i = (e == std::string::npos) ? u.size() : e + 2; - } else v.push_back(u[i++]); - } - // strip // comments (with leading spaces) - std::string w; w.reserve(v.size()); - for (size_t i = 0; i < v.size();) { - if (i + 1 < v.size() && v[i] == '/' && v[i+1] == '/') { - while (!w.empty() && w.back() == ' ') w.pop_back(); - size_t e = v.find('\n', i); - i = (e == std::string::npos) ? v.size() : e; // keep the newline - } else w.push_back(v[i++]); - } - // collapse empty lines + leading whitespace per line - std::string x; x.reserve(w.size()); - for (size_t i = 0; i < w.size();) { - if (w[i] == '\n') { - x.push_back('\n'); - size_t j = i + 1; - while (j < w.size() && (w[j] == ' ' || w[j] == '\n')) { - if (w[j] == '\n') { i = j; } - j++; - } - // re-scan: skip spaces directly after newline, and fold newline runs - size_t k = i + 1; - while (k < w.size() && w[k] == ' ') k++; - while (k < w.size() && w[k] == '\n') { k++; i = k - 1; - while (k < w.size() && w[k] == ' ') k++; } - i = k; - } else x.push_back(w[i++]); - } - if (!x.empty() && x.front() == '\n') x.erase(0, 1); - // escape backslash, quote; newline → \n" " - std::string y; - for (char c : x) { - if (c == '\\') y += "\\\\"; - else if (c == '"') y += "\\\""; - else if (c == '\n') y += "\\n\"\n\""; - else y.push_back(c); - } - // drop unneeded trailing quote opener - if (y.size() >= 1 && y.back() == '"') y.pop_back(); - return y; -} - -static void cl2cpp(const fs::path& cl_dir, const fs::path& out_cpp, const fs::path& out_hpp, - const std::string& module_name) { - std::vector cls; - for (auto& e : fs::directory_iterator(cl_dir)) - if (e.path().extension() == ".cl") cls.push_back(e.path()); - std::sort(cls.begin(), cls.end()); - std::string ns = module_name; - if (!ns.empty() && ns[0] >= '0' && ns[0] <= '9') ns = "_" + ns; - std::ostringstream cpp, hpp; - cpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core.hpp\"\n" - << "#include \"cvconfig.h\"\n#include \"" << out_hpp.filename().string() << "\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns - << "\n{\n\nstatic const char* const moduleName = \"" << module_name << "\";\n\n"; - hpp << "// This file is auto-generated. Do not edit!\n\n#include \"opencv2/core/ocl.hpp\"\n" - << "#include \"opencv2/core/ocl_genbase.hpp\"\n#include \"opencv2/core/opencl/ocl_defs.hpp\"\n\n" - << "#ifdef HAVE_OPENCL\n\nnamespace cv\n{\nnamespace ocl\n{\nnamespace " << ns << "\n{\n\n"; - for (auto& cl : cls) { - std::string name = cl.stem().string(); - std::string body = cl_escape(slurp(cl)); - std::string hash = md5impl::MD5::hex(body); - cpp << "struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc={moduleName, \"" << name - << "\",\n\"" << body << ", \"" << hash << "\", NULL};\n"; - hpp << "extern struct cv::ocl::internal::ProgramEntry " << name << "_oclsrc;\n"; - } - cpp << "\n}}}\n#endif\n"; - hpp << "\n}}}\n#endif\n"; - spew(out_cpp, cpp.str()); - spew(out_hpp, hpp.str()); -} - -int main() { - const char* man_env = std::getenv("MCPP_MANIFEST_DIR"); - const char* out_env = std::getenv("MCPP_OUT_DIR"); - fs::path man = man_env ? man_env : "."; - if (!out_env) { std::fprintf(stderr, "compat.opencv build.mcpp: MCPP_OUT_DIR unset (mcpp >= 0.0.95 required)\n"); return 1; } - fs::path out = out_env; - fs::path gen = man / "mcpp_generated"; - - // the extracted official tarball wrap dir (opencv-/) - fs::path wrap; - for (auto& e : fs::directory_iterator(man)) { - if (e.is_directory() && e.path().filename().string().rfind("opencv-", 0) == 0 - && fs::exists(e.path() / "modules")) { wrap = e.path(); break; } - } - if (wrap.empty()) { std::fprintf(stderr, "compat.opencv build.mcpp: opencv-* source dir not found under %s\n", man.string().c_str()); return 1; } - - // 1. fonts - blob2hdr(wrap / "modules/imgproc/fonts/Rubik.ttf.gz", out / "builtin_font_sans.h", "OcvBuiltinFontSans"); - blob2hdr(wrap / "modules/imgproc/fonts/Rubik-Italic.ttf.gz", out / "builtin_font_italic.h", "OcvBuiltinFontItalic"); - - // 1b. unifont feature: hex-embed the CJK font pulled in by the - // compat.opencv-unifont dependency. Its raw .gz payload is parked by - // the installer in a shared runtimedir whose location relative to any - // one package shifted across xlings store layouts (0.4.62 -> 0.4.67, - // mcpp 0.0.99), which is why a fixed `/xpkgs// -> - // /runtimedir` hop broke. Anchor instead on the authoritative - // per-dep dir contract (mcpp#241: MCPP_DEP__DIR, emitted under - // both the canonical name and the namespace-stripped short name) and - // walk up probing runtimedir/ at every level; fall back to this - // package's own store location + a bounded search so older mcpp - // (pre-#241) and future layout shifts still resolve. - if (std::getenv("MCPP_FEATURE_UNIFONT")) { - const char* fname = "WenQuanYiMicroHei.ttf.gz"; - fs::path font; - std::error_code ec; - auto probe = [&](const fs::path& base) -> fs::path { - if (base.empty()) return {}; - for (const fs::path& c : { base / fname, - base / "runtimedir" / fname, - base / "data" / "runtimedir" / fname }) - if (fs::exists(c)) return c; - return {}; - }; - std::vector anchors; - if (const char* d = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - if (const char* d = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR")) anchors.emplace_back(d); - anchors.push_back(man); - if (const char* d = std::getenv("MCPP_OUT_DIR")) anchors.emplace_back(d); - // walk up from each anchor, probing runtimedir/ at every level - for (const auto& a : anchors) { - for (fs::path p = a; !p.empty(); p = p.parent_path()) { - if (auto hit = probe(p); !hit.empty()) { font = hit; break; } - if (p == p.root_path()) break; - } - if (!font.empty()) break; - } - // fallback: sweep any opencv-unifont verdir near this package's store dir - if (font.empty()) { - for (auto& e : fs::directory_iterator(man.parent_path().parent_path(), ec)) { - if (e.path().filename().string().find("opencv-unifont") == std::string::npos) continue; - for (auto& v : fs::recursive_directory_iterator(e.path(), ec)) - if (v.path().filename() == fname) { font = v.path(); break; } - if (!font.empty()) break; - } - } - // last resort: bounded recursive search from the nearest store root - if (font.empty()) { - for (const auto& a : anchors) { - fs::path root = a; - for (int up = 0; up < 8 && root.has_parent_path(); ++up) { - if (fs::exists(root / "runtimedir") || fs::exists(root / "xpkgs") - || root.filename() == "data") break; - root = root.parent_path(); - } - long budget = 400000; - for (auto it = fs::recursive_directory_iterator(root, - fs::directory_options::skip_permission_denied, ec); - it != fs::recursive_directory_iterator() && budget-- > 0; it.increment(ec)) { - if (ec) { ec.clear(); continue; } - if (it->path().filename() == fname) { font = it->path(); break; } - } - if (!font.empty()) break; - } - } - if (font.empty()) { - const char* e1 = std::getenv("MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR"); - const char* e2 = std::getenv("MCPP_DEP_OPENCV_UNIFONT_DIR"); - const char* e3 = std::getenv("MCPP_OUT_DIR"); - std::fprintf(stderr, "compat.opencv build.mcpp: unifont feature on but %s not found.\n" - " MCPP_MANIFEST_DIR=%s\n MCPP_DEP_COMPAT_OPENCV_UNIFONT_DIR=%s\n" - " MCPP_DEP_OPENCV_UNIFONT_DIR=%s\n MCPP_OUT_DIR=%s\n", - fname, man.string().c_str(), - e1 ? e1 : "(unset)", e2 ? e2 : "(unset)", e3 ? e3 : "(unset)"); - return 1; - } - blob2hdr(font, out / "builtin_font_uni.h", "OcvBuiltinFontUni"); - std::printf("compat.opencv build.mcpp: unifont embedded from %s\n", font.string().c_str()); - } - - // 2. OpenCL kernel embeddings (inert under this profile, byte-faithful) - for (std::string m : { "core", "imgproc", "geometry" }) { - fs::path cl_dir = wrap / "modules" / m / "src" / "opencl"; - if (fs::exists(cl_dir)) - cl2cpp(cl_dir, out / ("clsrc/opencl_kernels_" + m + ".cpp"), - out / ("opencl_kernels_" + m + ".hpp"), m); - } - - // 3. jpeg12/jpeg16 re-compile stubs from the manifest - // line grammar: [?] - // (group-prefixed filename => unique basenames across groups; a - // leading ? guard skips the stub unless MCPP_FEATURE_=1) - std::ifstream mf(gen / "tu_manifest.txt"); - if (!mf) { std::fprintf(stderr, "compat.opencv build.mcpp: mcpp_generated/tu_manifest.txt missing\n"); return 1; } - std::string line; - int stubs = 0; - while (std::getline(mf, line)) { - if (line.empty() || line[0] == '#') continue; - if (line[0] == '?') { - size_t g = line.find('\t'); - if (g == std::string::npos) continue; - std::string feat = line.substr(1, g - 1); - for (char& c : feat) c = (c >= 'a' && c <= 'z') ? char(c - 32) : c; - if (!std::getenv(("MCPP_FEATURE_" + feat).c_str())) continue; - line = line.substr(g + 1); - } - size_t t = line.find('\t'); - if (t == std::string::npos) continue; - std::string grp = line.substr(0, t); - std::string target = line.substr(t + 1); - std::string mangled = grp + "_" + target; - for (char& c : mangled) if (c == '/') c = '_'; - fs::path stub = out / "tu" / grp / mangled; - std::string content = "/* compat.opencv " + grp + " re-compile TU */\n" - "#include \"" + target + "\"\n"; - spew(stub, content); - std::printf("mcpp:generated=%s\n", stub.string().c_str()); - stubs++; - } - - // out/ carries builtin_font_*.h, opencl_kernels_*.hpp, clsrc/ includes - std::printf("mcpp:cxxflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:cflag=-I%s\n", out.string().c_str()); - std::printf("mcpp:rerun-if-changed=%s\n", (gen / "tu_manifest.txt").string().c_str()); - // diagnostics as a non-directive stdout line: stderr writes can interleave - // into the (buffered) stdout directive stream and corrupt a directive. - std::printf("compat.opencv build.mcpp: %d jpeg12/16 stubs, fonts + CL kernels synthesized\n", stubs); - std::fflush(stdout); - return 0; -} diff --git a/tools/compat-opencv/fetch_upstream.sh b/tools/compat-opencv/fetch_upstream.sh deleted file mode 100755 index aa6de3e..0000000 --- a/tools/compat-opencv/fetch_upstream.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# fetch_upstream.sh — download + extract the pinned official OpenCV tarball -# for maintainer-time regeneration of the compat.opencv descriptor. -# Consumers never need this: they get OpenCV via the compat.opencv package. -# -# Prints the extracted source root on stdout. -set -eu - -version="${OPENCV_VERSION:-5.0.0}" -sha256="${OPENCV_SHA256:-b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095}" -cache="${XDG_CACHE_HOME:-$HOME/.cache}/opencv-m" -tarball="$cache/opencv-$version.tar.gz" -srcdir="$cache/opencv-$version" - -mkdir -p "$cache" -if [ ! -f "$tarball" ]; then - curl -L -fsS -o "$tarball" "https://github.com/opencv/opencv/archive/refs/tags/$version.tar.gz" >&2 -fi -echo "$sha256 $tarball" | sha256sum -c - >&2 -if [ ! -d "$srcdir" ]; then - tar -xzf "$tarball" -C "$cache" -fi -echo "$srcdir" diff --git a/tools/compat-opencv/gen_config.sh b/tools/compat-opencv/gen_config.sh deleted file mode 100755 index 83816e9..0000000 --- a/tools/compat-opencv/gen_config.sh +++ /dev/null @@ -1,100 +0,0 @@ -#!/bin/sh -# gen_config.sh — maintainer-time descriptor pipeline for compat.opencv. -# -# Fetches the pinned OFFICIAL OpenCV tarball (fetch_upstream.sh alongside), -# builds a local static FFmpeg prefix for CMake discovery (the videoio -# FFmpeg backend — consumers get the same libraries from the compat.ffmpeg -# dependency instead), runs CMake ONCE with the frozen hermetic profile, -# runs the reference ninja build so the build-time generators (cl2cpp, -# blob2hdr, dispatch stubs) materialize, dumps the full compile-command list -# (`ninja -t commands` — state-independent, unlike `ninja -n`), and emits -# the mcpp-index descriptor via gen_descriptor.py alongside. Consumers never -# run this: OpenCV reaches them as the compat.opencv package (frozen config -# + real-path sources + build.mcpp synthesis). -# -# Usage: tools/compat-opencv/gen_config.sh [target] [out.lua] -# target default: autodetected - (only linux-x86_64 supported yet) -# out.lua default: /pkgs/c/compat.opencv.lua -# Env: -# FFMPEG_PREFIX pre-built static FFmpeg install prefix (with lib/pkgconfig). -# When unset, the script builds one from FFMPEG_SRC (a -# fetched FFmpeg source tree matching compat.ffmpeg's pin). -# FFMPEG_SRC FFmpeg source dir (required if FFMPEG_PREFIX unset) -# OPENCV_CFG_DIR reuse a build dir (default: fresh mktemp) -# -# NOTE: use a real host gcc via CC/CXX if the default `cc` is shimmed to a -# cross toolchain (xlings subos). Host gcc 13 ICEs on two AVX2 bfloat TUs — -# harmless here (ninja -k skips them; only the generators' outputs matter). -# The FFmpeg prefix itself needs a non-ICEing gcc (gcc 13 ICEs on -# libswscale/output.o too — use the xlings gcc16 via FFMPEG_CC). -set -eu - -target="${1:-$(uname -s | tr 'A-Z' 'a-z' | sed s/darwin/macos/)-$(uname -m | sed s/arm64/aarch64/)}" -here="$(cd "$(dirname "$0")" && pwd)" -index_root="$(cd "$here/../.." && pwd)" -version="${OPENCV_VERSION:-5.0.0}" -sha256="${OPENCV_SHA256:-b0528f5a1d379d59d4701cb28c36e22214cc51cf64594e5b56f2d3e6c0233095}" -out="${2:-$index_root/pkgs/c/compat.opencv.lua}" - -src="$(sh "$here/fetch_upstream.sh")" -bld="${OPENCV_CFG_DIR:-$(mktemp -d /tmp/opencv-cfg.XXXXXX)}" - -# ── FFmpeg prefix (videoio backend reference; consumers use compat.ffmpeg) ── -if [ -z "${FFMPEG_PREFIX:-}" ]; then - : "${FFMPEG_SRC:?set FFMPEG_PREFIX or FFMPEG_SRC}" - FFMPEG_PREFIX="$bld/ffmpeg-prefix" - ffbld="$bld/ffmpeg-build" - mkdir -p "$ffbld" - ( cd "$ffbld" && "$FFMPEG_SRC/configure" \ - ${FFMPEG_CC:+--cc=$FFMPEG_CC} ${FFMPEG_CXX:+--cxx=$FFMPEG_CXX} \ - --prefix="$FFMPEG_PREFIX" --disable-shared --enable-static \ - --disable-programs --disable-doc --enable-pic \ - && make -j"$(nproc)" && make install ) -fi -export FFMPEG_PREFIX - -# Frozen hermetic profile: five requested modules (flann and geometry join -# as dependency closure), every external probe OFF except FFmpeg (static -# prefix above, discovered via pkg-config), all needed 3rdparty built from -# the vendored tree (zlib, libpng, libjpeg-turbo incl. NASM SIMD), headless -# highgui, V4L2 + FFmpeg videoio. WITH_UNIFONT stays OFF: it is a -# configure-time EXTRA download (13 MB CJK font) which would break the -# single-pinned-source model — future `unifont` feature. -PKG_CONFIG_LIBDIR="$FFMPEG_PREFIX/lib/pkgconfig" \ -cmake -G Ninja -S "$src" -B "$bld" \ - -DCMAKE_BUILD_TYPE=Release \ - ${CC:+-DCMAKE_C_COMPILER=$CC} ${CXX:+-DCMAKE_CXX_COMPILER=$CXX} \ - -DBUILD_LIST=core,imgproc,imgcodecs,highgui,videoio \ - -DBUILD_SHARED_LIBS=OFF \ - -DBUILD_ZLIB=ON -DBUILD_PNG=ON -DBUILD_JPEG=ON \ - -DWITH_TIFF=OFF -DWITH_WEBP=OFF -DWITH_OPENJPEG=OFF -DWITH_JASPER=OFF \ - -DWITH_OPENEXR=OFF -DWITH_AVIF=OFF -DWITH_JPEGXL=OFF -DWITH_IMGCODEC_GIF=OFF \ - -DWITH_OPENCL=OFF -DWITH_IPP=OFF -DWITH_LAPACK=OFF -DWITH_EIGEN=OFF -DWITH_ITT=OFF \ - -DWITH_GTK=OFF -DWITH_QT=OFF -DWITH_WAYLAND=OFF -DWITH_OPENGL=OFF \ - -DWITH_FFMPEG=ON -DWITH_GSTREAMER=OFF -DWITH_V4L=ON -DWITH_OBSENSOR=OFF \ - -DWITH_PROTOBUF=OFF -DWITH_CAROTENE=OFF -DWITH_FLATBUFFERS=OFF \ - -DWITH_UNIFONT=OFF \ - -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_EXAMPLES=OFF -DBUILD_opencv_apps=OFF - -grep -q '#define HAVE_FFMPEG' "$bld/cvconfig.h" || { - echo "FATAL: HAVE_FFMPEG missing from cvconfig.h — FFmpeg probe failed" >&2 - exit 1 -} - -# Reference build: -k because two AVX2 bfloat TUs ICE on host gcc 13 — the -# object files are irrelevant, only generator outputs are harvested. The -# cap_ffmpeg TUs however must COMPILE (API-compat window OpenCV5 x FFmpeg8): -# a real error there means the profile is broken, so check explicitly. -ninja -C "$bld" -k 9999 > "$bld/ninja-build.log" 2>&1 || true -for o in cap_ffmpeg_impl cap_ffmpeg; do - ninja -C "$bld" -t targets all 2>/dev/null | grep -q "$o" || continue -done -if grep -E "cap_ffmpeg[^ ]*\.(cpp|hpp).*(error|Error)" "$bld/ninja-build.log" >/dev/null; then - echo "FATAL: cap_ffmpeg failed to compile — OpenCV$version x FFmpeg API mismatch?" >&2 - grep -E "cap_ffmpeg" "$bld/ninja-build.log" | head -20 >&2 - exit 1 -fi -ninja -C "$bld" -t commands > "$bld/ninja-cmds.log" - -python3 "$here/gen_descriptor.py" "$src" "$bld" "$version" "$sha256" "$out" -echo "descriptor written: $out (configured on: $target)" diff --git a/tools/compat-opencv/gen_descriptor.py b/tools/compat-opencv/gen_descriptor.py deleted file mode 100755 index 3d6f387..0000000 --- a/tools/compat-opencv/gen_descriptor.py +++ /dev/null @@ -1,578 +0,0 @@ -#!/usr/bin/env python3 -"""gen_descriptor.py — emit pkgs/c/compat.opencv.lua from the reference build. - -Inputs: -The build dir must contain ninja-cmds.log (`ninja -t commands`) and the -completed generator outputs (see gen_config.sh). When the reference build was -configured WITH_FFMPEG=ON (gen_config.sh does this via a local static FFmpeg -prefix), pass its prefix via env FFMPEG_PREFIX so its include dirs can be -translated to the compat.ffmpeg dependency. - -Descriptor anatomy (v2, "full source-build + build.mcpp synthesis", mcpp >= -0.0.97): -- xpm: official GitHub tag tarball + gitcode CN mirror, sha256-pinned. -- generated_files: the small frozen config snapshot (cvconfig.h, - cv_cpu_config.h, dispatch stubs, simd_declarations, 3rdparty configs …), - plus build.mcpp (consumer-side synthesizer: fonts, OpenCL kernel - embeddings, and the jpeg12/jpeg16 re-compile stubs) and tu_manifest.txt - (now only drives the jpeg12/16 stubs). -- sources: REAL tarball paths (mcpp 0.0.97 fixed the obj-path collision - #233 and spacey defines #234, so the v1 whole-build forwarding-stub layer - is gone) + the snapshot dispatch-stub .cpp + the NASM .asm units. Only - the BITS_IN_JSAMPLE=12/16 same-source re-compiles still need stubs (one - source, three compiles — inexpressible as plain sources), with - group-prefixed unique basenames (dodges mcpp#239 abs-path obj escape). -- flags: layered per-glob entries over real paths — per-group dirs - (**/modules//**, **/3rdparty//**), per-ISA suffixes - (**/*.avx2.cpp …), per-file extras; verified by exact reconstruction - against every reference compile command. Spacey defines ride directly - (#234 fixed). -- deps: compat.ffmpeg when the profile has HAVE_FFMPEG (videoio backend). -""" -import os, re, shlex, sys -from collections import defaultdict -from pathlib import Path - -SRC = Path(sys.argv[1]).resolve() -BLD = Path(sys.argv[2]).resolve() -VERSION = sys.argv[3] -SHA256 = sys.argv[4] -OUT = Path(sys.argv[5]) -HERE = Path(__file__).resolve().parent -FF_PREFIX = os.environ.get("FFMPEG_PREFIX", "") -BASE_BLD = Path(os.environ["BASE_BLD"]).resolve() if os.environ.get("BASE_BLD") else None -FFMPEG_DEP_VERSION = os.environ.get("FFMPEG_DEP_VERSION", "8.1.2") - -def rel_posix(child, parent): - """child relative to parent as a forward-slashed str, or None if not under - parent. Separator-agnostic — Windows clang-cl command paths mix '/' and '\\', - so plain str.startswith(str(SRC)) comparisons fail; go through pathlib.""" - c, p = Path(child), Path(parent) - if c == p: - return "" - try: - return c.relative_to(p).as_posix() - except ValueError: - return None - -# ── parse `ninja -t commands` ─────────────────────────────────────────── -compiles = [] -DRIVE_ABS = re.compile(r"^[A-Za-z]:[\\/]") -for raw in (BLD / "ninja-cmds.log").read_text().splitlines(): - raw = raw.strip() - if not raw: - continue - # Windows (clang-cl / win64 nasm) lines carry backslash paths that shlex's - # POSIX mode would treat as escapes; normalise to forward slashes first (no - # meaningful backslash-escapes appear in these commands). Linux/macOS lines - # have no backslashes so this is a no-op for them. - is_win = ("clang-cl" in raw.lower()) or bool(re.search(r"[A-Za-z]:\\", raw)) - line = raw.replace("\\", "/") if is_win else raw - try: - toks = shlex.split(line) - except ValueError: - continue - if not toks: - continue - tool_raw = Path(toks[0].strip('"')).name.lower() - if tool_raw.endswith(".exe"): - tool_raw = tool_raw[:-4] - if tool_raw == "clang-cl": - tool = "g++" # clang-cl builds .c and .cpp; source extension decides downstream - elif tool_raw == "nasm": - tool = "nasm" - elif tool_raw in ("g++", "gcc", "cc", "c++", "clang", "clang++"): - tool = "g++" if tool_raw in ("g++", "c++", "clang++") else "gcc" - else: - continue - src = None; defs = set(); mflags = []; incs = []; std = None - skip = False - for i in range(1, len(toks)): - t = toks[i] - if skip: skip = False; continue - # gnu depfile/output flags that consume the next token (never on clang-cl, - # where -MT is the *runtime* selector, not a depfile target) - if not is_win and t in ("-o", "-MF", "-MT", "-MQ"): skip = True; continue - if tool == "nasm" and t == "-o": skip = True; continue - if t == "-MD": - if tool == "nasm": skip = True - continue - if t == "-c": continue - if is_win: - if t.startswith(("/Fo", "/Fd", "/Fi", "/Fa", "/Fp")): continue # output artifacts - if t.startswith("-clang:"): continue # depfile passthrough (-clang:-MD/-MF/-MT) - if t in ("/D", "/I", "/U"): # msvc space-separated define/include - if i + 1 < len(toks): - nx = toks[i + 1].strip('"') - if t == "/D": defs.add("-D" + nx) - elif t == "/I": incs.append(nx) - skip = True - continue - if t.startswith("/D"): defs.add("-D" + t[2:]); continue - if t.startswith("/I"): incs.append(t[2:].strip('"')); continue - if t.startswith("-imsvc"): # clang-cl system include - d = t[len("-imsvc"):].strip('"') - if d: incs.append(d) - elif i + 1 < len(toks): incs.append(toks[i + 1].strip('"')); skip = True - continue - if t.startswith(("/std:", "-std:")): std = "-std=" + t.split(":", 1)[1]; continue # clang-cl -std:c++17 -> canonical - # msvc codegen/warning/runtime flags mcpp supplies itself — drop - if t.startswith("/") or t in ("-TP", "-TC") or t.startswith(("-W", "-Q")): continue - if t == "-isystem": - if i + 1 < len(toks): incs.append(toks[i + 1].strip('"')) - skip = True; continue - if t.startswith("-std="): std = t; continue - if t.startswith("-D"): defs.add(t); continue - if t.startswith("-I"): incs.append(t[2:].strip('"')); continue - if t.startswith("-m") or t in ("-O3", "-O2"): mflags.append(t); continue - if re.search(r"\.(c|cc|cpp|cxx|asm|S)$", t, re.I) and not t.startswith("-"): - src = t - if src is None: - continue - is_abs = src.startswith("/") or bool(DRIVE_ABS.match(src)) - src_abs = src if is_abs else str(BLD / src) - compiles.append((tool, src_abs, frozenset(defs), tuple(mflags), incs, std)) -assert compiles, "no compile commands parsed" -print(f"parsed {len(compiles)} compiles") - -ISA_RE = re.compile(r"\.(sse4_1|sse4_2|avx512_skx|avx2|avx|fp16)\.cpp$") -MODS = ("core", "imgproc", "imgcodecs", "highgui", "videoio", "flann", "geometry", "dnn") -# groups that belong to the additive `dnn` feature (sources gated; flags -# entries stay unconditional — harmless when the feature is off) -FEATURE_DNN_GROUPS = ("dnn", "protobuf", "mlas", "mlasgemm") - -have_ffmpeg = any("cap_ffmpeg" in c[1] for c in compiles) -print(f"HAVE_FFMPEG in profile: {have_ffmpeg}") -if have_ffmpeg: - assert FF_PREFIX, "reference build has cap_ffmpeg TUs but FFMPEG_PREFIX unset" - -def dir_key(src_abs, defs): - s = src_abs - if "3rdparty/libjpeg-turbo" in s: - if s.endswith(".asm"): return "jpeg-asm" - if "-DBITS_IN_JSAMPLE=12" in defs: return "jpeg12" - if "-DBITS_IN_JSAMPLE=16" in defs: return "jpeg16" - return "jpeg" - if "3rdparty/libpng" in s: return "png" - if "3rdparty/zlib" in s: return "zlib" - if "3rdparty/protobuf" in s: return "protobuf" - if "3rdparty/mlas" in s: return "mlas" - if "-DMLAS_GEMM_ONLY=1" in defs: return "mlasgemm" # the mlas-lib re-compile of modules/dnn/…/mlas_threading.cpp - for mod in MODS: - if f"modules/{mod}/" in s: return mod - raise SystemExit(f"unclassified source: {s}") - -groups = defaultdict(list) -for c in compiles: - isa = ISA_RE.search(c[1]) - groups[(dir_key(c[1], c[2]), isa.group(1) if isa else None)].append(c) - -dir_defs, dir_m, file_extras = {}, {}, {} -for (dk, isa), cs in groups.items(): - if isa: continue - common = frozenset.intersection(*[c[2] for c in cs]) - dir_defs[dk], dir_m[dk] = common, cs[0][3] - for c in cs: - if c[2] - common: - file_extras[c[1]] = c[2] - common - -# per-(group, ISA) overlays: dnn's per-ISA define sets differ from the base -# modules', so the overlay is keyed by group too and emitted with -# group-scoped globs (**/modules//**/*..cpp) -isa_defs, isa_m = {}, {} -for (dk, isa), cs in sorted(groups.items(), key=lambda kv: (kv[0][0], kv[0][1] or "")): - if not isa: continue - for c in cs: - extra = c[2] - dir_defs[dk] - extram = tuple(f for f in c[3] if f not in dir_m[dk]) - key = (dk, isa) - if key not in isa_defs: - isa_defs[key], isa_m[key] = extra, extram - else: - assert isa_defs[key] == extra and isa_m[key] == extram, \ - f"ISA overlay mismatch for {key}: {c[1]}" - -# exact reconstruction check -for tool, src_abs, defs, mflags, incs, std in compiles: - dk = dir_key(src_abs, defs) - isa = ISA_RE.search(src_abs) - want = set(dir_defs[dk]) | (set(isa_defs[(dk, isa.group(1))]) if isa else set()) \ - | set(file_extras.get(src_abs, ())) - assert want == set(defs), f"reconstruction failed for {src_abs}: {want ^ set(defs)}" -print("exact flag reconstruction: OK") - -# feature-off soundness: the base (non-feature) TU set must be EXACTLY the -# non-dnn reference build's TU set (same parser over its ninja-cmds.log) -if BASE_BLD is not None: - base_tus = set() - for line in (BASE_BLD / "ninja-cmds.log").read_text().splitlines(): - try: toks = shlex.split(line.strip()) - except ValueError: continue - if not toks or Path(toks[0]).name not in ("g++","gcc","cc","c++","clang","clang++","nasm"): continue - for t in toks[1:]: - if re.search(r"\.(c|cc|cpp|cxx|asm|S)$", t) and not t.startswith("-"): - src2 = t if t.startswith("/") else str(BASE_BLD / t) - base_tus.add(src2.replace(str(BASE_BLD), "").replace(str(SRC), "")) - this_base = { c[1].replace(str(BLD), "").replace(str(SRC), "") - for c in compiles if dir_key(c[1], c[2]) not in FEATURE_DNN_GROUPS } - assert this_base == base_tus, \ - f"base TU set drifted vs BASE_BLD: {sorted(this_base ^ base_tus)[:6]}" - print(f"feature-off TU set == non-dnn reference build: OK ({len(base_tus)} TUs)") - -# common -m flags across every non-asm group must agree (baseline) -baselines = {dir_m[dk] for dk in dir_defs if dk != "jpeg-asm" and dk not in FEATURE_DNN_GROUPS} -assert len(baselines) == 1, f"baseline -m flags differ between groups: {baselines}" -baseline_m = [f for f in next(iter(baselines)) if f.startswith("-m")] - -# ── group glob table (v2: real paths; jpeg12/16 stay stub dirs) ───────── -# `**/modules//**` deliberately matches BOTH the tarball tree -# (*/modules//…) and the snapshot dispatch stubs -# (mcpp_generated/modules//…) — same group, same flags in the -# reference build (asserted below by reconstruction). -GROUP_GLOB = { - "jpeg": "**/3rdparty/libjpeg-turbo/**", - "png": "**/3rdparty/libpng/**", - "zlib": "**/3rdparty/zlib/**", - "jpeg12": "**/tu/jpeg12/**", - "jpeg16": "**/tu/jpeg16/**", - "protobuf": "**/3rdparty/protobuf/**", - "mlas": "**/3rdparty/mlas/**", - "mlasgemm": "**/tu/mlasgemm/**", -} -for mod in MODS: - GROUP_GLOB[mod] = f"**/modules/{mod}/**" - -# ── sources (real paths) + tu manifest (jpeg12/16 only) ───────────────── -def wrap_rel(src_abs): - return Path(src_abs).relative_to(SRC).as_posix() - -manifest, sources_real, sources_asm, kernel_files, seen = [], [], [], [], set() -sources_dnn = [] -per_file_flag_entries = [] -for tool, src_abs, defs, mflags, incs, std in compiles: - dk = dir_key(src_abs, defs) - if tool == "nasm": - e = f"*/{wrap_rel(src_abs)}" - if e not in seen: - seen.add(e); sources_asm.append(e) - continue - if dk in ("jpeg12", "jpeg16", "mlasgemm"): - # same-source re-compiles: inexpressible as plain sources -> tu stub. - # mlasgemm only exists under the dnn feature ("?dnn" guard). - tgt = wrap_rel(src_abs) - key = (dk, tgt) - if key not in seen: - seen.add(key) - manifest.append((f"?dnn\t{dk}\t{tgt}") if dk == "mlasgemm" else f"{dk}\t{tgt}") - continue - if rel_posix(src_abs, SRC) is not None: - e = f"*/{wrap_rel(src_abs)}" - elif "opencl_kernels_" in src_abs: - # synthesized by build.mcpp on the consumer (clsrc/…); flags via - # per-file globs below, source via mcpp:generated= — skip here - m = re.search(r"opencl_kernels_(\w+)\.cpp$", src_abs) - kernel_files.append((m.group(1), dir_key(src_abs, defs))) - continue - else: - # snapshot file compiled from the build dir (dispatch stubs) - e = f"mcpp_generated/{rel_posix(src_abs, BLD)}" - if e in seen: continue - seen.add(e) - (sources_dnn if dk in FEATURE_DNN_GROUPS else sources_real).append(e) - if src_abs in file_extras: - per_file_flag_entries.append((e, file_extras[src_abs])) -n_tus = len(sources_real) + len([l for l in manifest]) + len(kernel_files) -print(f"sources: {len(sources_real)} real C/C++ + {len(sources_asm)} asm; " - f"jpeg12/16 stubs: {len(manifest)}; kernels: {len(kernel_files)}") - -# compress the real-source list: whole-directory globs where the compiled -# set equals every same-extension file in that directory of the tarball -def compress(entries): - by_dir = defaultdict(list) - for e in entries: - if e.startswith("*/"): - p = Path(e[2:]) - by_dir[("*", p.parent.as_posix(), p.suffix)].append(p.name) # as_posix: forward slashes on windows - else: # mcpp_generated/... - p = Path(e) - by_dir[("g", p.parent.as_posix(), p.suffix)].append(p.name) - out = [] - for (kind, d, suf), names in sorted(by_dir.items()): - if kind == "*": - on_disk = sorted(x.name for x in (SRC / d).glob(f"*{suf}")) - if sorted(names) == on_disk and len(names) > 1: - out.append(f"*/{d}/*{suf}") - continue - base = f"*/{d}" - else: - base = d - if len(names) == 1: - out.append(f"{base}/{names[0]}") - else: - stems = ",".join(sorted(n[: -len(suf)] for n in names)) - out.append(f"{base}/{{{stems}}}{suf}") - return out - -sources_out = compress(sources_real) -sources_dnn_out = compress(sources_dnn) -print(f"sources compressed: {len(sources_real)} base files -> {len(sources_out)} globs; " - f"{len(sources_dnn)} dnn-feature files -> {len(sources_dnn_out)} globs") - -# ── snapshot files (exclude synthesized classes) ──────────────────────── -def rewrite(text): - out = text - # neutralize build-dir/source-tree paths in both separator conventions - # (Windows generated headers may carry backslash OR forward-slash paths) - for root in (str(SRC), Path(SRC).as_posix()): - out = out.replace(f'"{root}/', '"').replace(f'{root}/', '') - for root in (str(BLD), Path(BLD).as_posix()): - out = out.replace(f'"{root}/', '"').replace(f'{root}/', '') - out = (out.replace(str(BLD), "").replace(Path(BLD).as_posix(), "") - .replace(str(SRC), "").replace(Path(SRC).as_posix(), "")) - if FF_PREFIX: - assert FF_PREFIX not in out, "ffmpeg prefix path leaked into snapshot" - return out - -snapshot = {} -for p in sorted(BLD.rglob("*")): - if p.is_dir() or "CMakeFiles" in p.parts: - continue - if p.name.startswith(("CMake", "cmake_", "CPack", ".ninja", "ninja")): - continue - if p.suffix not in (".h", ".hpp", ".inc", ".cpp", ".c", ".asm"): - continue - if "builtin_font" in p.name or "opencl_kernels" in p.name: - continue # build.mcpp synthesizes these - rel = p.relative_to(BLD).as_posix() - content = rewrite(p.read_text(errors="replace")) - assert "]==]" not in content, f"lua long-bracket collision in {rel}" - assert len(content) < 200_000, f"unexpectedly large snapshot file {rel}" - snapshot[f"mcpp_generated/{rel}"] = content - -# Three files differ between the feature-off and dnn reference builds, all -# benignly: opencv_data_config.hpp only in the (now neutralized) build-dir -# path; opencv_modules.hpp in the HAVE_OPENCV_DNN line (NO compiled TU in -# either profile reads that macro — it rides features.dnn.defines instead); -# version_string.inc in the cosmetic build-info string. Ship the FEATURE-OFF -# (BASE_BLD) copy of all three; assert everything else is byte-identical. -BASE_PREFERRED = ("modules/core/version_string.inc", - "opencv2/opencv_modules.hpp", - "opencv_data_config.hpp") -if BASE_BLD is not None: - def base_rewrite(text): - return (text.replace(f'"{SRC}/', '"').replace(f'{SRC}/', '') - .replace(f'"{BASE_BLD}/', '"').replace(f'{BASE_BLD}/', '') - .replace(str(BASE_BLD), "").replace(str(SRC), "")) - drift = [] - for k in list(snapshot): - rel = k[len("mcpp_generated/"):] - bp = BASE_BLD / rel - if rel in BASE_PREFERRED: - snapshot[k] = base_rewrite(bp.read_text(errors="replace")) - continue - if bp.exists(): - if base_rewrite(bp.read_text(errors="replace")) != snapshot[k] and not rel.startswith("modules/dnn"): - drift.append(rel) - assert not drift, f"unexpected snapshot drift vs BASE_BLD: {drift}" - print("snapshot: base-preferred trio applied; rest identical across profiles") -print(f"snapshot: {len(snapshot)} files, {sum(len(v) for v in snapshot.values())//1024} KiB inline") - -build_mcpp_src = (HERE / "build_mcpp_template.cpp").read_text() -assert "]==]" not in build_mcpp_src - -# ── include dirs ──────────────────────────────────────────────────────── -incdirs, iseen = ["mcpp_generated", "*"], {"mcpp_generated", "*"} -for c in compiles: - for i in c[4]: - if FF_PREFIX and i.startswith(FF_PREFIX): - continue # served by the compat.ffmpeg dependency's include dirs - rs, rb = rel_posix(i, SRC), rel_posix(i, BLD) - if rs is not None: - r = "*" if rs == "" else "*/" + rs - elif rb is not None: - r = "mcpp_generated" if rb == "" else "mcpp_generated/" + rb - else: - continue - if r not in iseen: - iseen.add(r); incdirs.append(r) - -# ── emit lua ──────────────────────────────────────────────────────────── -def D(x): return x[2:] -def lua_list(items, ind): - return ("\n" + ind).join(f'"{i}",' for i in items) - -def defines_lua(defset): - return "defines = { " + ", ".join(f'"{D(f)}"' for f in sorted(defset)) + " }" - -# base flag-globs vs dnn-feature flag-globs. Flag-globs for the dnn groups -# (mlas/mlasgemm/protobuf/dnn) only match a source when the `dnn` feature is -# on; kept in the base `flags` they glob nothing in the default (feature-off) -# profile -> mcpp 0.0.101 warns "[build].flags glob matched no source file". -# mcpp#253 per-feature flags let them ride WITH the feature (features.dnn.flags), -# so they resolve exactly when their sources do. (dnn-group flag-globs are -# arch-specific for the per-ISA entries -> they land per-OS via merge_opencv.lua.) -flags_entries = [] -dnn_flags_entries = [] -def is_dnn_glob(g): - return any(m in g for m in ("3rdparty/mlas", "3rdparty/protobuf", - "modules/dnn", "tu/mlasgemm")) -# curated exception: mlas/lib/platform.cpp calls syscall(2); glibc hides it -# under __STRICT_ANSI__ (-std=c++NN). The reference build's gcc13 tolerated -# this only because ninja -k discards the object; consumers must compile it, -# so the mlas group carries _GNU_SOURCE. -dir_defs["mlas"] = frozenset(dir_defs.get("mlas", frozenset())) | {"-D_GNU_SOURCE=1"} \ - if "mlas" in dir_defs else dir_defs.get("mlas") -for dk in sorted(dir_defs): - if dk == "jpeg-asm": continue - key = "cflags" if dk in ("zlib", "png", "jpeg", "jpeg12", "jpeg16") else "cxxflags" - parts = [f'glob = "{GROUP_GLOB[dk]}"'] - if dir_defs[dk]: parts.append(defines_lua(dir_defs[dk])) - (dnn_flags_entries if dk in FEATURE_DNN_GROUPS else flags_entries).append( - "{ " + ", ".join(parts) + " },") -if ("jpeg-asm", None) in groups: - cs = groups[("jpeg-asm", None)] - common = frozenset.intersection(*[c[2] for c in cs]) - flags_entries.append('{ glob = "**/*.asm", ' + defines_lua(common) + " },") -for (dk, isa) in sorted(isa_defs): - ds = ", ".join(f'"{D(f)}"' for f in sorted(isa_defs[(dk, isa)])) - ms = ", ".join(f'"{m}"' for m in isa_m[(dk, isa)]) - g = GROUP_GLOB[dk] - g = (g[:-3] if g.endswith("/**") else g) + f"/**/*.{isa}.cpp" - (dnn_flags_entries if dk in FEATURE_DNN_GROUPS else flags_entries).append( - f'{{ glob = "{g}", defines = {{ {ds} }}, cxxflags = {{ {ms} }} }},') -# NOTE: no per-file flags for clsrc/opencl_kernels_.cpp. build.mcpp writes -# them (cl2cpp) but leaves them INERT — OpenCL is OFF in this headless profile, -# so they are never registered as compiled sources (no `mcpp:generated=`). A -# flag-glob for them therefore matches nothing and mcpp 0.0.101 warns -# "[build].flags glob '**/clsrc/opencl_kernels_*.cpp' matched no source file". -# (kernel_files is still tracked for the TU count above.) -for g, extra in sorted(per_file_flag_entries): - (dnn_flags_entries if is_dnn_glob(g) else flags_entries).append( - f'{{ glob = "{g}", ' + defines_lua(extra) + " },") -# curated exception #2: mlas/lib/platform.cpp calls syscall(2) but includes -# only (the prototype lives in ; upstream -# toolchains leak it transitively, the hermetic glibc does not). -dnn_flags_entries.append('{ glob = "*/3rdparty/mlas/lib/platform.cpp", cxxflags = { "-include", "unistd.h" } },') - -# upstream reference uses -std=c++17; the index floor is c++23 and the whole -# TU set builds green under gcc16 -std=c++23 (validated by the O0 spike). -cxx_std = {c[5] for c in compiles if c[0] == "g++" and c[5]} -assert cxx_std == {"-std=c++17"}, f"unexpected upstream C++ std set: {cxx_std}" - -deps_line = "" -profile_note = "V4L2 videoio" -if have_ffmpeg: - deps_line = f' deps = {{ ["compat.ffmpeg"] = "{FFMPEG_DEP_VERSION}" }},\n' - profile_note = "V4L2 + FFmpeg videoio (compat.ffmpeg dependency)" - -# curated exception #3: the vendored mlas tree DECLARES MlasHGemmSupported -# (mlas.h) and calls it (compute.cpp) but ships no definition — upstream's -# static-archive selective linking never notices; mcpp links every dep -# object, so the consumer link does. Provide the semantically-correct stub -# (fp16 HGemm unsupported -> callers fall back), gated with the feature. -snapshot["mcpp_generated/mlas_hgemm_stub.cpp"] = ( - "// compat.opencv curated stub: the vendored mlas subset declares and\n" - "// calls MlasHGemmSupported but does not vendor its definition (it\n" - "// lives in onnxruntime's full mlas). False = fp16 HGemm unsupported,\n" - "// which is the truth for this subset; callers fall back.\n" - "#include \"mlas.h\"\n" - "bool MLASCALL MlasHGemmSupported(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE) { return false; }\n") -sources_dnn_out.append("mcpp_generated/mlas_hgemm_stub.cpp") - -dnn_sources_lua = lua_list(sources_dnn_out, " " * 20) -dnn_flags_lua = ("\n" + " " * 20).join(dnn_flags_entries) -n_dnn = len(sources_dnn) -L = [] -L.append(f"""-- Auto-generated by tools/compat-opencv/gen_descriptor.py — do not edit by hand. --- Recipe: OpenCV {VERSION} built FROM SOURCE by mcpp (no CMake at build --- time). Scope: core imgproc imgcodecs highgui videoio (+ flann, geometry --- dependency closure); hermetic profile (all external probes OFF, vendored --- zlib/libpng/libjpeg-turbo incl. NASM SIMD units, headless highgui, --- {profile_note}, WITH_UNIFONT=OFF); SIMD runtime --- dispatch KEPT (per-ISA glob flags). Sources are the real tarball paths --- (mcpp >= 0.0.97: obj-path disambiguation #233 + quoted spacey defines --- #234 made the v1 forwarding-stub layer obsolete); only the libjpeg-turbo --- BITS_IN_JSAMPLE=12/16 re-compiles and the build-time generators (fonts, --- OpenCL kernel embeddings) are synthesized on the consumer by the embedded --- build.mcpp — byte-faithful ports verified against the reference CMake --- build. Regenerate: sh tools/compat-opencv/gen_config.sh (this repo). -package = {{ - spec = "1", - namespace = "compat", - name = "compat.opencv", - description = "OpenCV {VERSION} (core/imgproc/imgcodecs/highgui/videoio incl. FFmpeg backend), full source build with SIMD dispatch", - licenses = {{"Apache-2.0"}}, - repo = "https://github.com/opencv/opencv", - type = "package", - - xpm = {{ - -- linux-x86_64 only for now: the config snapshot is target-specific. - linux = {{ - ["{VERSION}"] = {{ - url = {{ - GLOBAL = "https://github.com/opencv/opencv/archive/refs/tags/{VERSION}.tar.gz", - CN = "https://gitcode.com/mcpp-res/opencv/releases/download/{VERSION}/opencv-{VERSION}.tar.gz", - }}, - sha256 = "{SHA256}", - }}, - }}, - }}, - - mcpp = {{ - language = "c++23", -- upstream min c++17; c++23 spike-validated (457 TU green) -{deps_line} include_dirs = {{ - {lua_list(incdirs, " " * 12)} - }}, - cxxflags = {{ {", ".join([f'"{m}"' for m in baseline_m] + ['"-w"'])} }}, - cflags = {{ {", ".join([f'"{m}"' for m in baseline_m] + ['"-w"'])} }}, - flags = {{ - {("\n" + " " * 12).join(flags_entries)} - }}, - targets = {{ - opencv = {{ kind = "lib" }}, - }}, - -- `unifont`: Unicode/CJK putText coverage. Pulls the font asset - -- package and defines HAVE_UNIFONT (drawing_text.cpp gates on it); - -- build.mcpp sees MCPP_FEATURE_UNIFONT=1 and hex-embeds the font - -- (builtin_font_uni.h). Not part of the reference profile — the - -- embed machinery is byte-faithful to cmake's ocv_blob2hdr either way. - -- `dnn`: the deep-learning module as an ADDITIVE feature — its - -- sources ({n_dnn} TUs: modules/dnn + vendored protobuf + mlas incl. - -- .S kernels) join the same lib; HAVE_OPENCV_DNN arrives via the - -- build.mcpp-selected opencv_modules.hpp variant, no extra deps. - features = {{ - ["unifont"] = {{ - deps = {{ ["compat.opencv-unifont"] = "1.0.0" }}, - defines = {{ "HAVE_UNIFONT" }}, - }}, - ["dnn"] = {{ - defines = {{ "HAVE_OPENCV_DNN" }}, - flags = {{ - {dnn_flags_lua} - }}, - sources = {{ - {dnn_sources_lua} - }}, - }}, - }}, - linux = {{ - ldflags = {{ "-lpthread", "-ldl" }}, - }}, - sources = {{ - {lua_list(sources_out + sources_asm, " " * 12)} - }}, - generated_files = {{ -""") -L.append(f' ["build.mcpp"] = [==[\n{build_mcpp_src}]==],\n') -L.append(' ["mcpp_generated/tu_manifest.txt"] = [==[\n' + "\n".join(manifest) + "\n]==],\n") -for rel in sorted(snapshot): - L.append(f' ["{rel}"] = [==[\n{snapshot[rel]}]==],\n') -L.append(""" }, - }, -} -""") -OUT.write_text("".join(L), encoding="utf-8") # explicit: windows locale is cp1252 and mangles the em-dash -kb = OUT.stat().st_size // 1024 -print(f"gen_descriptor: {OUT} written — {len(sources_out)} source globs " - f"(+{len(sources_asm)} asm), {len(manifest)} jpeg12/16 stub TUs, " - f"{len(snapshot)} inline snapshot files, {kb} KiB") diff --git a/tools/compat-opencv/merge_opencv.lua b/tools/compat-opencv/merge_opencv.lua deleted file mode 100644 index 236ea92..0000000 --- a/tools/compat-opencv/merge_opencv.lua +++ /dev/null @@ -1,279 +0,0 @@ -#!/usr/bin/env lua5.4 --- merge_opencv.lua — combine per-OS single-OS compat.opencv descriptors into ONE --- 3-platform descriptor (xpm.{os} + mcpp neutral-common + mcpp.{os} per-OS blocks). --- Correctness rules (mcpp full-platform-support-plan §2): --- * mcpp. list keys APPEND onto top-level -> every platform-specific key --- (include_dirs/cxxflags/cflags/flags/ldflags/sources/generated_files) lives --- ONLY in the per-OS block; nothing platform-specific at top level. --- * generated_files emplace-no-overwrite -> ZERO global generated_files. --- * neutral top-level: language, deps, targets, features. --- Usage: lua5.4 merge_opencv.lua out.lua os1=path1 os2=path2 [os3=path3 ...] - -local args = {...} -local OUT = args[1] -local INPUTS = {} -for i = 2, #args do - local os_, path = args[i]:match("^(%w+)=(.+)$") - assert(os_ and path, "bad arg: " .. args[i]) - INPUTS[#INPUTS+1] = { os = os_, path = path } -end -assert(OUT and #INPUTS >= 1, "usage: merge_opencv.lua out.lua os=path ...") - -local function load_pkg(path) - local env = {} - local f = assert(loadfile(path, "t", env)) - f() - assert(env.package, "no `package` table in " .. path) - return env.package -end - --- ---- lua value serializer (deterministic, long-bracket for multiline strings) ---- -local function is_ident(s) - return type(s) == "string" and s:match("^[%a_][%w_]*$") ~= nil -end - -local function is_array(t) - local n = 0 - for k in pairs(t) do - if type(k) ~= "number" then return false end - n = n + 1 - end - for i = 1, n do if t[i] == nil then return false end end - return true, n -end - -local function quote_str(s) - if s:find("[\n\r]") or #s > 200 then - -- choose a long-bracket level whose close-sequence isn't in the content - local eq = "" - while s:find("%]" .. eq .. "%]", 1, false) do eq = eq .. "=" end - -- leading newline after [==[ is swallowed by lua; add one so content is verbatim - return "[" .. eq .. "[\n" .. s .. "]" .. eq .. "]" - end - return string.format("%q", s) -end - -local ser -- fwd -local function ser_kv(k, v, ind) - local key - if is_ident(k) then key = k else key = "[" .. quote_str(tostring(k)) .. "]" end - return ind .. key .. " = " .. ser(v, ind) -end - -ser = function(v, ind) - local t = type(v) - if t == "string" then return quote_str(v) end - if t == "number" or t == "boolean" then return tostring(v) end - if t == "table" then - local arr, n = is_array(v) - if arr then - if n == 0 then return "{}" end - -- short arrays of scalars on one line; else one per line - local scalar = true - for i = 1, n do local et = type(v[i]); if et == "table" then scalar = false break end end - if scalar then - local parts = {} - for i = 1, n do parts[i] = ser(v[i], "") end - local oneline = "{ " .. table.concat(parts, ", ") .. " }" - if #oneline <= 110 then return oneline end - end - local ni = ind .. " " - local parts = {} - for i = 1, n do parts[i] = ni .. ser(v[i], ni) end - return "{\n" .. table.concat(parts, ",\n") .. ",\n" .. ind .. "}" - else - -- map: stable key order (strings sorted; keep a preferred order for known keys) - local keys = {} - for k in pairs(v) do keys[#keys+1] = k end - table.sort(keys, function(a, b) return tostring(a) < tostring(b) end) - if #keys == 0 then return "{}" end - -- try one-line for tiny maps of scalars - local scalar = true - for _, k in ipairs(keys) do if type(v[k]) == "table" then scalar = false break end end - if scalar and #keys <= 3 then - local parts = {} - for _, k in ipairs(keys) do - local kk = is_ident(k) and k or ("[" .. quote_str(tostring(k)) .. "]") - parts[#parts+1] = kk .. " = " .. ser(v[k], "") - end - local oneline = "{ " .. table.concat(parts, ", ") .. " }" - if #oneline <= 110 then return oneline end - end - local ni = ind .. " " - local parts = {} - for _, k in ipairs(keys) do parts[#parts+1] = ser_kv(k, v[k], ni) end - return "{\n" .. table.concat(parts, ",\n") .. ",\n" .. ind .. "}" - end - end - error("cannot serialize type " .. t) -end - --- ---- build merged package ---- -local base = load_pkg(INPUTS[1].path) -- linux is authoritative for neutral keys -local merged = { - spec = base.spec, namespace = base.namespace, name = base.name, - description = base.description, licenses = base.licenses, - repo = base.repo, type = base.type, -} - --- xpm: one key per OS (each single-OS descriptor holds its own xpm.) -merged.xpm = {} -for _, e in ipairs(INPUTS) do - local p = load_pkg(e.path) - assert(p.xpm[e.os], e.os .. " descriptor lacks xpm." .. e.os) - merged.xpm[e.os] = p.xpm[e.os] -end - --- mcpp: neutral-common (from base) + per-OS blocks (each OS's platform-specific keys) --- `deps` is PER-OS: linux/macosx carry compat.ffmpeg (videoio backend); a core-only --- profile (no videoio) carries none, so it must not inherit a global dep. --- `flags` is handled specially below (dnn-group flag-globs relocate into the feature). -local PEROS = { "include_dirs", "cxxflags", "cflags", "sources", "generated_files", "deps" } - --- ── per-OS `dnn` feature (mcpp#253 common/delta) ──────────────────────── --- The dnn feature's payload splits into a cross-platform COMMON part (dnn/protobuf/ --- mlas C++, mlas_hgemm_stub) and a per-arch SIMD DELTA (x86: mlas/lib/x86_64/*.S + --- avx/avx2/avx512 kernels; arm: mlas/lib/aarch64/*.S + neon/neon_fp16 kernels). --- mcpp 0.0.101 per-OS features append per sub-key, so COMMON rides neutral --- features.dnn and each OS's DELTA rides mcpp..features.dnn. dnn-group flag-globs --- (mlas/protobuf/mlasgemm + per-ISA) ride features.dnn.flags so the feature-off base --- has no dead globs (mcpp 0.0.101 warning). Inputs are normalized whether they --- carried those globs in base `flags` (pre-warnfix descriptors) or features.dnn.flags. -local function is_dnn_glob(g) - if type(g) ~= "string" then return false end - for _, m in ipairs({ "3rdparty/mlas", "3rdparty/protobuf", "modules/dnn", "tu/mlasgemm" }) do - if g:find(m, 1, true) then return true end - end - return false -end -local function ser_id(v) return ser(v, "") end - --- dnn's Vulkan compute backend (modules/dnn/src/vkcom/**) is dead code without a --- Vulkan SDK (WITH_VULKAN is OFF in every headless profile); its sources #include --- from a nested dir and fail mcpp's dependency scan off-linux. --- Drop them from the feature entirely — CPU dnn inference is unaffected. -local function is_vkcom(s) return type(s) == "string" and s:find("modules/dnn/src/vkcom", 1, true) ~= nil end --- windows ships NO mlas at all: its x86 kernels are GAS/ELF .S (not COFF-assemblable --- under clang-cl), so the windows snapshot skips mlas and DNN uses its built-in --- fast_gemm. Every mlas flag-glob (the group defines, the platform.cpp `-include --- unistd.h` curated exception — which would also fail, windows has no unistd.h) is --- therefore dead on windows -> drop them all. -local function is_mlas_glob(f) - return type(f) == "table" and type(f.glob) == "string" - and f.glob:find("3rdparty/mlas", 1, true) ~= nil -end --- any mlas SOURCE (incl the curated mcpp_generated/mlas_hgemm_stub.cpp, which --- #includes "mlas.h") — dead on windows where mlas is skipped entirely. -local function is_mlas_src(s) return type(s) == "string" and s:find("mlas", 1, true) ~= nil end --- clsrc/opencl_kernels_.cpp are written INERT by build.mcpp (cl2cpp) but never --- compiled (OpenCL OFF in this headless profile, not registered as sources), so --- their per-file flag-globs match nothing -> a permanent "[build].flags glob … --- matched no source file" warning. Drop them entirely. -local function is_dead_opencl_glob(f) - return type(f) == "table" and type(f.glob) == "string" - and f.glob:find("clsrc/opencl_kernels", 1, true) ~= nil -end -local pkgs, order = {}, {} -for _, e in ipairs(INPUTS) do pkgs[e.os] = load_pkg(e.path); order[#order+1] = e.os end -local dnn_src, dnn_flg, base_flg = {}, {}, {} -for _, os_ in ipairs(order) do - local p = pkgs[os_] - local feat = (p.mcpp.features and p.mcpp.features.dnn) or {} - local srcs, flgs, cleaned = {}, {}, {} - local drop_mlas = (os_ == "windows") -- windows uses fast_gemm, no mlas - for _, s in ipairs(feat.sources or {}) do - if not is_vkcom(s) and not (drop_mlas and is_mlas_src(s)) then srcs[#srcs+1] = s end - end - for _, f in ipairs(feat.flags or {}) do - if not (drop_mlas and is_mlas_glob(f)) then flgs[#flgs+1] = f end - end - for _, f in ipairs(p.mcpp.flags or {}) do - if is_dead_opencl_glob(f) then -- drop: inert, never compiled - elseif type(f) == "table" and is_dnn_glob(f.glob) then - if not (drop_mlas and is_mlas_glob(f)) then flgs[#flgs+1] = f end - else cleaned[#cleaned+1] = f end - end - dnn_src[os_], dnn_flg[os_], base_flg[os_] = srcs, flgs, cleaned -end - --- active = OSes that actually carry a dnn payload; common is their intersection -local active = {} -for _, os_ in ipairs(order) do if #dnn_src[os_] > 0 then active[#active+1] = os_ end end -local function split_common(map) - if #active == 0 then return {}, {} end - local counts = {} - for _, os_ in ipairs(active) do - local seen = {} - for _, v in ipairs(map[os_]) do - local id = ser_id(v) - if not seen[id] then seen[id] = true; counts[id] = (counts[id] or 0) + 1 end - end - end - local common, cids = {}, {} - for _, v in ipairs(map[active[1]]) do - local id = ser_id(v) - if counts[id] == #active and not cids[id] then cids[id] = true; common[#common+1] = v end - end - local delta = {} - for _, os_ in ipairs(order) do - local d = {} - for _, v in ipairs(map[os_] or {}) do if not cids[ser_id(v)] then d[#d+1] = v end end - delta[os_] = d - end - return common, delta -end --- `dnn` is an OS-only feature (mcpp#253): it exists only on the platforms whose --- snapshot actually built it. Each such platform carries the FULL payload under --- mcpp..features.dnn — there is NO neutral dnn, so a platform without it --- cannot half-enable the feature. Windows is intentionally excluded: mlas's x86 --- kernels are GAS/ELF `.S` (`.type …,@function`), which clang-cl cannot assemble --- to Windows COFF (would need the MASM amd64 `.asm` variant or a C++-only mlas). -local neutral_features = {} -for fname, fdef in pairs(base.mcpp.features or {}) do - if fname ~= "dnn" then neutral_features[fname] = fdef end -end -local base_dnn = base.mcpp.features and base.mcpp.features.dnn -local dnn_defines = (base_dnn and base_dnn.defines) or { "HAVE_OPENCV_DNN" } --- an OS "ships dnn" only if it built the actual module — gen_descriptor always --- seeds features.dnn.sources with mcpp_generated/mlas_hgemm_stub.cpp even for a --- videoio-only (non-dnn) snapshot, so a non-empty list is NOT enough. -local function ships_dnn(os_) - for _, s in ipairs(dnn_src[os_] or {}) do - if type(s) == "string" and s:find("modules/dnn", 1, true) then return true end - end - return false -end - -merged.mcpp = { - language = base.mcpp.language, - targets = base.mcpp.targets, - features = neutral_features, -} -for _, os_ in ipairs(order) do - local p = pkgs[os_] - local blk = {} - for _, k in ipairs(PEROS) do blk[k] = p.mcpp[k] end - blk.flags = base_flg[os_] -- dnn-group globs stripped - local sub = p.mcpp[os_] - if sub and sub.ldflags then blk.ldflags = sub.ldflags end - if ships_dnn(os_) then -- this OS ships dnn -> full payload - blk.features = { dnn = { defines = dnn_defines, sources = dnn_src[os_], flags = dnn_flg[os_] } } - end - merged.mcpp[os_] = blk -end - --- ---- emit ---- -local hdr = ([[-- Auto-generated by tools/compat-opencv/merge_opencv.lua — do not edit by hand. --- OpenCV 5.0.0, multi-platform source build (linux-x86_64 + macosx-arm64). --- Each mcpp. block carries that platform's full frozen snapshot (include_dirs, --- SIMD flags, sources, and ALL generated_files — zero global generated_files, per --- mcpp's emplace-no-overwrite rule). Neutral keys (language/deps/targets/features) --- stay top-level. Headless highgui on every platform (BUILTIN_BACKEND=NONE). --- Regenerate: capture per-OS snapshots (snapshot-*-opencv.yml) -> gen_descriptor.py --- -> merge_opencv.lua. -]]) -local body = "package = " .. ser(merged, "") .. "\n" -local fh = assert(io.open(OUT, "w")) -fh:write(hdr, body) -fh:close() -io.write("wrote " .. OUT .. "\n")