diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bf7bf0a..591f1e0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -160,7 +160,7 @@ jobs: zip -9 -r opencv-mobile-${{ env.opencv-version }}.zip opencv-mobile-${{ env.opencv-version }} - name: opencv4-source env: - opencv-version: 4.11.0 + opencv-version: 4.12.0 run: | wget -q https://github.com/opencv/opencv/archive/${{ env.opencv-version }}.zip -O opencv-${{ env.opencv-version }}.zip unzip -q opencv-${{ env.opencv-version }}.zip @@ -169,6 +169,8 @@ jobs: truncate -s 0 cmake/OpenCVFindLibsGrfmt.cmake rm -rf modules/gapi + truncate -s 0 cmake/platforms/OpenCV-Linux.cmake + rm modules/core/src/cuda_* rm modules/core/src/direct* rm modules/core/src/gl_* @@ -219,9 +221,7 @@ jobs: patch -p1 -i ../patches/opencv-${{ env.opencv-version }}-drawing-mono-font.patch rm -rf modules/highgui cp -r ../highgui modules/ - mv 3rdparty/kleidicv . - rm -rf 3rdparty/* - mv kleidicv 3rdparty/ + rm -rf 3rdparty rm -rf apps data doc samples platforms rm -rf modules/java rm -rf modules/js @@ -247,15 +247,15 @@ jobs: - name: upload-opencv4-source uses: actions/upload-artifact@v4 with: - name: opencv-mobile-4.11.0-source - path: opencv-mobile-4.11.0.zip + name: opencv-mobile-4.12.0-source + path: opencv-mobile-4.12.0.zip android: needs: [setup] runs-on: ubuntu-latest strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_POLICY_DEFAULT_CMP0057=NEW \ @@ -357,7 +357,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: OHOS_NDK_CMAKE: $GITHUB_WORKSPACE/ohos-sdk/linux/native/build-tools/cmake/bin/cmake COMMON_CMAKE_OPTIONS: | @@ -418,7 +418,7 @@ jobs: if: matrix.opencv-version == '2.4.13.7' || matrix.opencv-version == '3.4.20' run: echo "OPENCV_SUBDIR=share/OpenCV" >> $GITHUB_ENV - name: set-opencv-dir - if: matrix.opencv-version == '4.11.0' + if: matrix.opencv-version == '4.12.0' run: echo "OPENCV_SUBDIR=lib/cmake/opencv4" >> $GITHUB_ENV - name: test-armeabi-v7a run: | @@ -452,7 +452,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -524,7 +524,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -606,7 +606,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_C_FLAGS="-fno-rtti -fno-exceptions" \ @@ -666,7 +666,7 @@ jobs: if: matrix.opencv-version == '2.4.13.7' || matrix.opencv-version == '3.4.20' run: echo "OPENCV_SUBDIR=share/OpenCV" >> $GITHUB_ENV - name: set-opencv-dir - if: matrix.opencv-version == '4.11.0' + if: matrix.opencv-version == '4.12.0' run: echo "OPENCV_SUBDIR=lib/cmake/opencv4" >> $GITHUB_ENV - name: test-arm-linux-gnueabi run: | @@ -700,7 +700,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -786,7 +786,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -868,7 +868,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -950,7 +950,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -1032,7 +1032,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -1114,7 +1114,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -1196,7 +1196,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -1268,7 +1268,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../../toolchains/ios.toolchain.cmake \ @@ -1349,11 +1349,11 @@ jobs: needs: [setup] strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] os-compiler: - - { msvc-version: vs2015, windows-version: 2019, toolset-version: v140 } - - { msvc-version: vs2017, windows-version: 2019, toolset-version: v141 } - - { msvc-version: vs2019, windows-version: 2019, toolset-version: v142 } + - { msvc-version: vs2015, windows-version: 2022, toolset-version: v140 } + - { msvc-version: vs2017, windows-version: 2022, toolset-version: v141 } + - { msvc-version: vs2019, windows-version: 2022, toolset-version: v142 } - { msvc-version: vs2022, windows-version: 2022, toolset-version: v143 } runs-on: windows-${{ matrix.os-compiler.windows-version }} env: @@ -1361,11 +1361,6 @@ jobs: COMMON_CMAKE_OPTIONS: -T ${{ matrix.os-compiler.toolset-version }},host=x64 -DCMAKE_INSTALL_PREFIX=install steps: - uses: actions/checkout@v4 - - name: patch-windows-sdk - if: matrix.os-compiler.msvc-version == 'vs2022' - run: | - cd "C:\Program Files (x86)" - & "C:\Program Files\Git\usr\bin\patch.exe" -p0 -i $env:GITHUB_WORKSPACE\fix-windows-sdk-26100-arm64-wchar.patch - uses: actions/download-artifact@v4 with: name: opencv-mobile-${{ matrix.opencv-version }}-source @@ -1374,6 +1369,27 @@ jobs: unzip -q opencv-mobile-${{ matrix.opencv-version }}.zip echo "SOURCE_DIR=opencv-mobile-${{ matrix.opencv-version }}" >> $env:GITHUB_ENV echo "PACKAGE_NAME=opencv-mobile-${{ matrix.opencv-version }}-windows-${{ matrix.os-compiler.msvc-version }}" >> $env:GITHUB_ENV + + - name: Install and Setup VS 2015 (v140) Build Tools + if: matrix.os-compiler.msvc-version == 'vs2015' + run: | + $vs140Path = "C:/vs140_build_tools" + Invoke-WebRequest -Uri "https://aka.ms/vs/15/release/vs_buildtools.exe" -OutFile vs_buildtools.exe + Start-Process -FilePath "vs_buildtools.exe" -ArgumentList "--installPath `"$vs140Path`" --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Component.VC.140 --quiet --wait --norestart --nocache" -Wait + $vcvarsPath = (Get-ChildItem -Path $vs140Path -Filter "vcvars64.bat" -Recurse | Select-Object -First 1).FullName + $cmd = "`"$vcvarsPath`" && powershell -Command `"`$env:PATH;`$env:INCLUDE;`$env:LIB`"" + $output = cmd.exe /c $cmd + $lines = $output -split "`r`n" + echo "PATH=$($lines[0]);$($env:PATH)" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "INCLUDE=$($lines[1])" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + echo "LIB=$($lines[2])" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append + + - name: Install VS 2017 (v141) Build Tools + if: matrix.os-compiler.msvc-version == 'vs2017' + run: | + $vsInstallPath = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath + Start-Process -FilePath "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vs_installer.exe" -ArgumentList "modify --installPath `"$vsInstallPath`" --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --quiet --norestart --nocache" -Wait + - name: build-x86 run: | cd ${{ env.SOURCE_DIR }} @@ -1393,7 +1409,7 @@ jobs: run: | cd ${{ env.SOURCE_DIR }} mkdir build-arm64; cd build-arm64 - cmake ${{ env.COMMON_CMAKE_OPTIONS }} -A arm64 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64 $(type ../options.txt) -DBUILD_opencv_world=OFF .. + cmake ${{ env.COMMON_CMAKE_OPTIONS }} -A arm64 -DCMAKE_SYSTEM_NAME=Windows -DCMAKE_SYSTEM_PROCESSOR=ARM64 -DCMAKE_WINDOWS_KITS_10_DIR="C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0" -DCMAKE_SYSTEM_VERSION="10.0.22621.0" $(type ../options.txt) -DBUILD_opencv_world=OFF .. cmake --build . --config Release -j 4 cmake --build . --config Release --target install - name: package @@ -1445,7 +1461,7 @@ jobs: needs: [setup] strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] os-ubuntu: - { ubuntu-id: 2204, ubuntu-version: 22.04 } - { ubuntu-id: 2404, ubuntu-version: 24.04 } @@ -1480,7 +1496,7 @@ jobs: if: matrix.opencv-version == '2.4.13.7' || matrix.opencv-version == '3.4.20' run: echo "OPENCV_SUBDIR=share/OpenCV" >> $GITHUB_ENV - name: set-opencv-dir - if: matrix.opencv-version == '4.11.0' + if: matrix.opencv-version == '4.12.0' run: echo "OPENCV_SUBDIR=lib/cmake/opencv4" >> $GITHUB_ENV - name: test run: | @@ -1499,7 +1515,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] env: COMMON_CMAKE_OPTIONS: | -DCMAKE_TOOLCHAIN_FILE=../emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake \ @@ -1585,7 +1601,7 @@ jobs: if: matrix.opencv-version == '2.4.13.7' || matrix.opencv-version == '3.4.20' run: echo "OPENCV_SUBDIR=share/OpenCV" >> $GITHUB_ENV - name: set-opencv-dir - if: matrix.opencv-version == '4.11.0' + if: matrix.opencv-version == '4.12.0' run: echo "OPENCV_SUBDIR=lib/cmake/opencv4" >> $GITHUB_ENV - name: test run: | @@ -1634,7 +1650,7 @@ jobs: runs-on: macos-13 strategy: matrix: - opencv-version: [2.4.13.7, 3.4.20, 4.11.0] + opencv-version: [2.4.13.7, 3.4.20, 4.12.0] steps: - run: sudo xcode-select --switch /Applications/Xcode_15.2.app - uses: actions/checkout@v4 @@ -1834,8 +1850,8 @@ jobs: single-core: true cmake-toolchain: arm-openwrt-linux-muslgnueabi.toolchain.cmake setup-toolchain-cmd: | - wget -q https://github.com/YuzukiHD/Yuzukilizard/releases/download/Toolchains/toolchain-sunxi-musl-gcc-830.tar.gz - tar -xf toolchain-sunxi-musl-gcc-830.tar.gz + wget -q https://github.com/YuzukiHD/sunxi-bsp-toolchains/releases/download/1.0.0/toolchain-sunxi-musl-arm-gcc-830.tar.gz + tar -xf toolchain-sunxi-musl-arm-gcc-830.tar.gz setup-env-cmd: | export TOOLCHAIN_ROOT_PATH=$GITHUB_WORKSPACE/toolchain-sunxi-musl-gcc-830/toolchain export STAGING_DIR=$GITHUB_WORKSPACE/toolchain-sunxi-musl-gcc-830/toolchain @@ -1848,8 +1864,8 @@ jobs: single-core: true cmake-toolchain: arm-openwrt-linux-muslgnueabi.toolchain.cmake setup-toolchain-cmd: | - wget -q https://github.com/YuzukiHD/Yuzukilizard/releases/download/Toolchains/toolchain-sunxi-musl-gcc-830.tar.gz - tar -xf toolchain-sunxi-musl-gcc-830.tar.gz + wget -q https://github.com/YuzukiHD/sunxi-bsp-toolchains/releases/download/1.0.0/toolchain-sunxi-musl-arm-gcc-830.tar.gz + tar -xf toolchain-sunxi-musl-arm-gcc-830.tar.gz setup-env-cmd: | export TOOLCHAIN_ROOT_PATH=$GITHUB_WORKSPACE/toolchain-sunxi-musl-gcc-830/toolchain export STAGING_DIR=$GITHUB_WORKSPACE/toolchain-sunxi-musl-gcc-830/toolchain @@ -1946,20 +1962,20 @@ jobs: - uses: actions/checkout@v4 - uses: actions/download-artifact@v4 with: - name: opencv-mobile-4.11.0-source + name: opencv-mobile-4.12.0-source - name: setup-toolchain run: ${{ matrix.setup-toolchain-cmd }} - name: setup-opencv-source run: | - unzip -q opencv-mobile-4.11.0.zip - echo "SOURCE_DIR=opencv-mobile-4.11.0" >> $GITHUB_ENV - echo "PACKAGE_NAME=opencv-mobile-4.11.0-${{ matrix.name }}" >> $GITHUB_ENV + unzip -q opencv-mobile-4.12.0.zip + echo "SOURCE_DIR=opencv-mobile-4.12.0" >> $GITHUB_ENV + echo "PACKAGE_NAME=opencv-mobile-4.12.0-${{ matrix.name }}" >> $GITHUB_ENV - name: build-disable-thread if: ${{ matrix.single-core }} run: | cd ${{ env.SOURCE_DIR }} - patch -p1 -i ../patches/opencv-4.11.0-no-atomic.patch + patch -p1 -i ../patches/opencv-4.12.0-no-atomic.patch mkdir build && cd build ${{ matrix.setup-env-cmd }} cmake ${{ env.COMMON_CMAKE_OPTIONS }} ${{ matrix.cmake-options }} \ diff --git a/README.md b/README.md index 274238d..d4abfbc 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ :heavy_check_mark: Packages for **Windows**, **Linux**, **MacOS**, **HarmonyOS** and **WebAssembly** are available now. -:heavy_check_mark: We provide prebuild binary packages for opencv **2.4.13.7**, **3.4.20** and **4.11.0**. +:heavy_check_mark: We provide prebuild binary packages for opencv **2.4.13.7**, **3.4.20** and **4.12.0**. :heavy_check_mark: We also provide prebuild package for **Mac-Catalyst**, **watchOS**, **tvOS**, **visionOS** and **Apple xcframework**. @@ -30,7 +30,7 @@ :heavy_check_mark: ***NEW FEATURE*** [`cv::VideoWriter` supports jpg streaming over http](#cvvideowriter-supports-jpg-streaming-over-http) -|opencv 4.11.0 package size|The official opencv|opencv-mobile| +|opencv 4.12.0 package size|The official opencv|opencv-mobile| |:-:|:-:|:-:| |source zip|95.3 MB|8.17 MB| |android|301 MB|18 MB| @@ -61,7 +61,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0.zip) @@ -75,7 +75,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-android.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-android.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-android.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-android.zip) @@ -89,7 +89,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-harmonyos.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-harmonyos.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-harmonyos.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-harmonyos.zip) @@ -103,7 +103,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-ios.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-ios.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-ios.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-ios.zip) @@ -113,7 +113,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-ios-simulator.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-ios-simulator.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-ios-simulator.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-ios-simulator.zip) @@ -127,7 +127,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-macos.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-macos.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-macos.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-macos.zip) @@ -137,7 +137,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-mac-catalyst.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-mac-catalyst.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-mac-catalyst.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-mac-catalyst.zip) @@ -147,7 +147,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-watchos.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-watchos.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-watchos.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-watchos.zip) @@ -157,7 +157,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-watchos-simulator.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-watchos-simulator.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-watchos-simulator.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-watchos-simulator.zip) @@ -167,7 +167,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-tvos.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-tvos.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-tvos.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-tvos.zip) @@ -177,7 +177,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-tvos-simulator.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-tvos-simulator.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-tvos-simulator.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-tvos-simulator.zip) @@ -187,7 +187,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-visionos.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-visionos.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-visionos.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-visionos.zip) @@ -197,7 +197,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-visionos-simulator.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-visionos-simulator.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-visionos-simulator.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-visionos-simulator.zip) @@ -207,7 +207,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-apple.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-apple.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-apple.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-apple.zip) @@ -221,7 +221,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-ubuntu-2204.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-ubuntu-2204.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-ubuntu-2204.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-ubuntu-2204.zip) @@ -231,7 +231,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-ubuntu-2404.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-ubuntu-2404.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-ubuntu-2404.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-ubuntu-2404.zip) @@ -245,7 +245,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-windows-vs2015.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-windows-vs2015.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-windows-vs2015.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-windows-vs2015.zip) @@ -255,7 +255,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-windows-vs2017.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-windows-vs2017.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-windows-vs2017.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-windows-vs2017.zip) @@ -265,7 +265,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-windows-vs2019.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-windows-vs2019.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-windows-vs2019.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-windows-vs2019.zip) @@ -275,7 +275,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-windows-vs2022.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-windows-vs2022.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-windows-vs2022.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-windows-vs2022.zip) @@ -289,7 +289,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-webassembly.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-webassembly.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-webassembly.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-webassembly.zip) @@ -303,7 +303,7 @@ https://github.com/nihui/opencv-mobile/releases/latest [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-2.4.13.7-armlinux.zip) [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-3.4.20-armlinux.zip) - [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0-armlinux.zip) + [](https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0-armlinux.zip) @@ -325,8 +325,8 @@ https://github.com/nihui/opencv-mobile/releases/latest ||arm|aarch64| |---|---|---| -|bullseye|opencv4-debian|opencv4-debian| -|bookworm|opencv4-debian|opencv4-debian| +|bullseye|opencv4-debian|opencv4-debian| +|bookworm|opencv4-debian|opencv4-debian| @@ -339,8 +339,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
riscv64-linux-musl
✅ HW JPG decoder
✅ MIPI CSI camera
- - opencv4-milkv-duo + + opencv4-milkv-duo @@ -351,8 +351,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
riscv64-linux-musl
✅ HW JPG decoder
✅ MIPI CSI camera
- - opencv4-licheerv-nano + + opencv4-licheerv-nano @@ -364,8 +364,8 @@ https://github.com/nihui/opencv-mobile/releases/latest ✅ HW JPG encoder
✅ MIPI CSI camera
✅ DPI LCD screen
- - opencv4-luckfox-pico + + opencv4-luckfox-pico @@ -378,8 +378,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
arm-linux-uclibcgnueabihf
✅ MIPI CSI camera
extra isp lib into /usr/lib
- - opencv4-yuzuki-lizard + + opencv4-yuzuki-lizard @@ -392,8 +392,8 @@ https://github.com/nihui/opencv-mobile/releases/latest ✅ HW JPG encoder
✅ MIPI CSI camera
✅ SPI LCD screen
- - opencv4-tinyvision + + opencv4-tinyvision @@ -404,8 +404,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
arm-openwrt-linux-gnueabi
✅ HW JPG decoder
✅ HW JPG encoder
- - opencv4-yuzuki-chameleon + + opencv4-yuzuki-chameleon @@ -416,8 +416,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
avaota-f1
riscv32-linux-musl
- - opencv4-avaota-f1 + + opencv4-avaota-f1 @@ -426,8 +426,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
purple-pi
arm-linux-uclibcgnueabihf
- - opencv4-purple-pi + + opencv4-purple-pi @@ -438,8 +438,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
arm-linux-gnueabi
✅ HW JPG decoder
✅ HW JPG encoder
- - opencv4-myir-t113i + + opencv4-myir-t113i @@ -450,8 +450,8 @@ https://github.com/nihui/opencv-mobile/releases/latest
2k0300-fengniao
loongarch64-linux-gnu
- - opencv4-2k0300-fengniao + + opencv4-2k0300-fengniao @@ -463,8 +463,8 @@ https://github.com/nihui/opencv-mobile/releases/latest ✅ HW JPG encoder
✅ MIPI CSI camera
✅ DPI LCD screen
- - opencv4-lockzhiner-vision-module + + opencv4-lockzhiner-vision-module @@ -476,7 +476,7 @@ https://github.com/nihui/opencv-mobile/releases/latest 2. Modify ```/app/src/main/jni/CMakeLists.txt``` to find and link opencv ```cmake -set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.11.0-android/sdk/native/jni) +set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.12.0-android/sdk/native/jni) find_package(OpenCV REQUIRED) target_link_libraries(your_jni_target ${OpenCV_LIBS}) @@ -493,7 +493,7 @@ target_link_libraries(your_jni_target ${OpenCV_LIBS}) 3. Pass ```-DOpenCV_STATIC=ON``` to cmake option for windows build ```cmake -set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.11.0-armlinux/arm-linux-gnueabihf/lib/cmake/opencv4) +set(OpenCV_DIR ${CMAKE_SOURCE_DIR}/opencv-mobile-4.12.0-armlinux/arm-linux-gnueabihf/lib/cmake/opencv4) find_package(OpenCV REQUIRED) target_link_libraries(your_target ${OpenCV_LIBS}) @@ -512,9 +512,9 @@ The opencv-mobile source code package is the result of steps 1 and 2. Based on i **step 1. download opencv-mobile source** ```shell -wget -q https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.11.0.zip -unzip -q opencv-mobile-4.11.0.zip -cd opencv-mobile-4.11.0 +wget -q https://github.com/nihui/opencv-mobile/releases/latest/download/opencv-mobile-4.12.0.zip +unzip -q opencv-mobile-4.12.0.zip +cd opencv-mobile-4.12.0 ``` **step 2. apply your opencv option changes to options.txt** @@ -536,7 +536,7 @@ make install **step 4. make a package** ```shell -zip -r -9 opencv-mobile-4.11.0-mypackage.zip install +zip -r -9 opencv-mobile-4.12.0-mypackage.zip install ``` # Some notes diff --git a/highgui/src/capture_cvi.cpp b/highgui/src/capture_cvi.cpp index 49fd45b..659e4a9 100644 --- a/highgui/src/capture_cvi.cpp +++ b/highgui/src/capture_cvi.cpp @@ -3876,7 +3876,7 @@ int capture_cvi_impl::read_frame(unsigned char* bgrdata) for (int i = 0; i < h2; i++) { -#if __riscv_vector +#if __riscv_vector_071 int j = 0; int n = w2; while (n > 0) { @@ -3887,6 +3887,17 @@ int capture_cvi_impl::read_frame(unsigned char* bgrdata) j += vl; n -= vl; } +#elif __riscv_vector + int j = 0; + int n = w2; + while (n > 0) { + size_t vl = __riscv_vsetvl_e8m8(n); + vuint8m8_t bgr = __riscv_vle8_v_u8m8(ptr + j, vl); + __riscv_vse8_v_u8m8(bgrdata, bgr, vl); + bgrdata += vl; + j += vl; + n -= vl; + } #else memcpy(bgrdata, ptr, w2); bgrdata += w2; diff --git a/highgui/src/jpeg_decoder_cvi.cpp b/highgui/src/jpeg_decoder_cvi.cpp index e6d167e..a891f68 100644 --- a/highgui/src/jpeg_decoder_cvi.cpp +++ b/highgui/src/jpeg_decoder_cvi.cpp @@ -2228,7 +2228,7 @@ int jpeg_decoder_cvi_impl::decode(const unsigned char* jpgdata, int jpgsize, uns for (int i = 0; i < h2; i++) { -#if __riscv_vector +#if __riscv_vector_071 int j = 0; int n = w2; while (n > 0) { @@ -2239,6 +2239,17 @@ int jpeg_decoder_cvi_impl::decode(const unsigned char* jpgdata, int jpgsize, uns j += vl; n -= vl; } +#elif __riscv_vector + int j = 0; + int n = w2; + while (n > 0) { + size_t vl = __riscv_vsetvl_e8m8(n); + vuint8m8_t bgr = __riscv_vle8_v_u8m8(ptr + j, vl); + __riscv_vse8_v_u8m8(outbgr, bgr, vl); + outbgr += vl; + j += vl; + n -= vl; + } #else memcpy(outbgr, ptr, w2); outbgr += w2; @@ -2273,7 +2284,7 @@ int jpeg_decoder_cvi_impl::decode(const unsigned char* jpgdata, int jpgsize, uns for (int i = 0; i < height; i++) { -#if __riscv_vector +#if __riscv_vector_071 int j = 0; int n = width; while (n > 0) { @@ -2285,6 +2296,18 @@ int jpeg_decoder_cvi_impl::decode(const unsigned char* jpgdata, int jpgsize, uns j += vl; n -= vl; } +#elif __riscv_vector + int j = 0; + int n = width; + while (n > 0) { + size_t vl = __riscv_vsetvl_e8m2(n); + vuint8m2_t g = __riscv_vle8_v_u8m2(ptr + j, vl); + vuint8m2x3_t o = __riscv_vcreate_v_u8m2x3(g, g, g); + __riscv_vsseg3e8_v_u8m2x3(outbgr, o, vl); + outbgr += vl * 3; + j += vl; + n -= vl; + } #else for (int j = 0; j < width; j++) { diff --git a/highgui/src/stb_image.h b/highgui/src/stb_image.h index 766c2a1..adc9a6c 100644 --- a/highgui/src/stb_image.h +++ b/highgui/src/stb_image.h @@ -2946,6 +2946,156 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) // scratch buffer for data transpose short tmp[64]; +#if __riscv_vector_071 + const size_t vl = vsetvl_e16m1(8); + + // column pass + { + vint16m1_t row0 = vle16_v_i16m1(data + 0*8, vl); + vint16m1_t row1 = vle16_v_i16m1(data + 1*8, vl); + vint16m1_t row2 = vle16_v_i16m1(data + 2*8, vl); + vint16m1_t row3 = vle16_v_i16m1(data + 3*8, vl); + vint16m1_t row4 = vle16_v_i16m1(data + 4*8, vl); + vint16m1_t row5 = vle16_v_i16m1(data + 5*8, vl); + vint16m1_t row6 = vle16_v_i16m1(data + 6*8, vl); + vint16m1_t row7 = vle16_v_i16m1(data + 7*8, vl); + + // even part + vint16m1_t sum26 = vadd_vv_i16m1(row2, row6, vl); + vint32m2_t p1e = vwmul_vx_i32m2(sum26, rot0_0, vl); + vint32m2_t t2e = vwmacc_vx_i32m2(p1e, rot0_1, row6, vl); + vint32m2_t t3e = vwmacc_vx_i32m2(p1e, rot0_2, row2, vl); + vint32m2_t t0e = vsll_vx_i32m2(vwadd_vv_i32m2(row0, row4, vl), 12, vl); + vint32m2_t t1e = vsll_vx_i32m2(vwsub_vv_i32m2(row0, row4, vl), 12, vl); + vint32m2_t x0 = vadd_vv_i32m2(t0e, t3e, vl); + vint32m2_t x3 = vsub_vv_i32m2(t0e, t3e, vl); + vint32m2_t x1 = vadd_vv_i32m2(t1e, t2e, vl); + vint32m2_t x2 = vsub_vv_i32m2(t1e, t2e, vl); + + // odd part + vint16m1_t sum15 = vadd_vv_i16m1(row1, row5, vl); + vint16m1_t sum17 = vadd_vv_i16m1(row1, row7, vl); + vint16m1_t sum35 = vadd_vv_i16m1(row3, row5, vl); + vint16m1_t sum37 = vadd_vv_i16m1(row3, row7, vl); + vint32m2_t p5o = vwmul_vx_i32m2(vadd_vv_i16m1(sum17, sum35, vl), rot1_0, vl); + vint32m2_t p1o = vwmacc_vx_i32m2(p5o, rot1_1, sum17, vl); + vint32m2_t p2o = vwmacc_vx_i32m2(p5o, rot1_2, sum35, vl); + vint32m2_t p3o = vwmul_vx_i32m2(sum37, rot2_0, vl); + vint32m2_t p4o = vwmul_vx_i32m2(sum15, rot2_1, vl); + vint32m2_t sump13o = vadd_vv_i32m2(p1o, p3o, vl); + vint32m2_t sump24o = vadd_vv_i32m2(p2o, p4o, vl); + vint32m2_t sump23o = vadd_vv_i32m2(p2o, p3o, vl); + vint32m2_t sump14o = vadd_vv_i32m2(p1o, p4o, vl); + vint32m2_t x4 = vwmacc_vx_i32m2(sump13o, rot3_0, row7, vl); + vint32m2_t x5 = vwmacc_vx_i32m2(sump24o, rot3_1, row5, vl); + vint32m2_t x6 = vwmacc_vx_i32m2(sump23o, rot3_2, row3, vl); + vint32m2_t x7 = vwmacc_vx_i32m2(sump14o, rot3_3, row1, vl); + + // bfly32 + x0 = vadd_vx_i32m2(x0, 512, vl); + x1 = vadd_vx_i32m2(x1, 512, vl); + x2 = vadd_vx_i32m2(x2, 512, vl); + x3 = vadd_vx_i32m2(x3, 512, vl); + vint16m1_t out0 = vnsra_wx_i16m1(vadd_vv_i32m2(x0, x7, vl), 10, vl); + vint16m1_t out7 = vnsra_wx_i16m1(vsub_vv_i32m2(x0, x7, vl), 10, vl); + vint16m1_t out1 = vnsra_wx_i16m1(vadd_vv_i32m2(x1, x6, vl), 10, vl); + vint16m1_t out6 = vnsra_wx_i16m1(vsub_vv_i32m2(x1, x6, vl), 10, vl); + vint16m1_t out2 = vnsra_wx_i16m1(vadd_vv_i32m2(x2, x5, vl), 10, vl); + vint16m1_t out5 = vnsra_wx_i16m1(vsub_vv_i32m2(x2, x5, vl), 10, vl); + vint16m1_t out3 = vnsra_wx_i16m1(vadd_vv_i32m2(x3, x4, vl), 10, vl); + vint16m1_t out4 = vnsra_wx_i16m1(vsub_vv_i32m2(x3, x4, vl), 10, vl); + + // 8x8 transpose + // I would prefer to implement this transpose in register without save+load, + // but rvv does not have shuffle/zip instructions among multiple registers. + // what a pity :( --- nihui + vsse16_v_i16m1(tmp + 0, 8 * 2, out0, vl); + vsse16_v_i16m1(tmp + 1, 8 * 2, out1, vl); + vsse16_v_i16m1(tmp + 2, 8 * 2, out2, vl); + vsse16_v_i16m1(tmp + 3, 8 * 2, out3, vl); + vsse16_v_i16m1(tmp + 4, 8 * 2, out4, vl); + vsse16_v_i16m1(tmp + 5, 8 * 2, out5, vl); + vsse16_v_i16m1(tmp + 6, 8 * 2, out6, vl); + vsse16_v_i16m1(tmp + 7, 8 * 2, out7, vl); + } + + // row pass + { + vint16m1_t row0 = vle16_v_i16m1(tmp + 0*8, vl); + vint16m1_t row1 = vle16_v_i16m1(tmp + 1*8, vl); + vint16m1_t row2 = vle16_v_i16m1(tmp + 2*8, vl); + vint16m1_t row3 = vle16_v_i16m1(tmp + 3*8, vl); + vint16m1_t row4 = vle16_v_i16m1(tmp + 4*8, vl); + vint16m1_t row5 = vle16_v_i16m1(tmp + 5*8, vl); + vint16m1_t row6 = vle16_v_i16m1(tmp + 6*8, vl); + vint16m1_t row7 = vle16_v_i16m1(tmp + 7*8, vl); + + // even part + vint16m1_t sum26 = vadd_vv_i16m1(row2, row6, vl); + vint32m2_t p1e = vwmul_vx_i32m2(sum26, rot0_0, vl); + vint32m2_t t2e = vwmacc_vx_i32m2(p1e, rot0_1, row6, vl); + vint32m2_t t3e = vwmacc_vx_i32m2(p1e, rot0_2, row2, vl); + vint32m2_t t0e = vsll_vx_i32m2(vwadd_vv_i32m2(row0, row4, vl), 12, vl); + vint32m2_t t1e = vsll_vx_i32m2(vwsub_vv_i32m2(row0, row4, vl), 12, vl); + vint32m2_t x0 = vadd_vv_i32m2(t0e, t3e, vl); + vint32m2_t x3 = vsub_vv_i32m2(t0e, t3e, vl); + vint32m2_t x1 = vadd_vv_i32m2(t1e, t2e, vl); + vint32m2_t x2 = vsub_vv_i32m2(t1e, t2e, vl); + + // odd part + vint16m1_t sum15 = vadd_vv_i16m1(row1, row5, vl); + vint16m1_t sum17 = vadd_vv_i16m1(row1, row7, vl); + vint16m1_t sum35 = vadd_vv_i16m1(row3, row5, vl); + vint16m1_t sum37 = vadd_vv_i16m1(row3, row7, vl); + vint32m2_t p5o = vwmul_vx_i32m2(vadd_vv_i16m1(sum17, sum35, vl), rot1_0, vl); + vint32m2_t p1o = vwmacc_vx_i32m2(p5o, rot1_1, sum17, vl); + vint32m2_t p2o = vwmacc_vx_i32m2(p5o, rot1_2, sum35, vl); + vint32m2_t p3o = vwmul_vx_i32m2(sum37, rot2_0, vl); + vint32m2_t p4o = vwmul_vx_i32m2(sum15, rot2_1, vl); + vint32m2_t sump13o = vadd_vv_i32m2(p1o, p3o, vl); + vint32m2_t sump24o = vadd_vv_i32m2(p2o, p4o, vl); + vint32m2_t sump23o = vadd_vv_i32m2(p2o, p3o, vl); + vint32m2_t sump14o = vadd_vv_i32m2(p1o, p4o, vl); + vint32m2_t x4 = vwmacc_vx_i32m2(sump13o, rot3_0, row7, vl); + vint32m2_t x5 = vwmacc_vx_i32m2(sump24o, rot3_1, row5, vl); + vint32m2_t x6 = vwmacc_vx_i32m2(sump23o, rot3_2, row3, vl); + vint32m2_t x7 = vwmacc_vx_i32m2(sump14o, rot3_3, row1, vl); + + // bfly32 + x0 = vadd_vx_i32m2(x0, (int)(65536 + (128<<17)), vl); + x1 = vadd_vx_i32m2(x1, (int)(65536 + (128<<17)), vl); + x2 = vadd_vx_i32m2(x2, (int)(65536 + (128<<17)), vl); + x3 = vadd_vx_i32m2(x3, (int)(65536 + (128<<17)), vl); + vint16m1_t out0 = vnsra_wx_i16m1(vadd_vv_i32m2(x0, x7, vl), 17, vl); + vint16m1_t out7 = vnsra_wx_i16m1(vsub_vv_i32m2(x0, x7, vl), 17, vl); + vint16m1_t out1 = vnsra_wx_i16m1(vadd_vv_i32m2(x1, x6, vl), 17, vl); + vint16m1_t out6 = vnsra_wx_i16m1(vsub_vv_i32m2(x1, x6, vl), 17, vl); + vint16m1_t out2 = vnsra_wx_i16m1(vadd_vv_i32m2(x2, x5, vl), 17, vl); + vint16m1_t out5 = vnsra_wx_i16m1(vsub_vv_i32m2(x2, x5, vl), 17, vl); + vint16m1_t out3 = vnsra_wx_i16m1(vadd_vv_i32m2(x3, x4, vl), 17, vl); + vint16m1_t out4 = vnsra_wx_i16m1(vsub_vv_i32m2(x3, x4, vl), 17, vl); + + // clamp 0~255 + vuint8m1_t out0u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out0, 0, vl)), 0, vl); + vuint8m1_t out7u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out7, 0, vl)), 0, vl); + vuint8m1_t out1u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out1, 0, vl)), 0, vl); + vuint8m1_t out6u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out6, 0, vl)), 0, vl); + vuint8m1_t out2u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out2, 0, vl)), 0, vl); + vuint8m1_t out5u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out5, 0, vl)), 0, vl); + vuint8m1_t out3u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out3, 0, vl)), 0, vl); + vuint8m1_t out4u8 = vnclipu_wx_u8m1(vreinterpret_v_i16m1_u16m2(vmax_vx_i16m1(out4, 0, vl)), 0, vl); + + // 8x8 transpose + vsse8_v_u8m1(out + 0, out_stride, out0u8, vl); + vsse8_v_u8m1(out + 1, out_stride, out1u8, vl); + vsse8_v_u8m1(out + 2, out_stride, out2u8, vl); + vsse8_v_u8m1(out + 3, out_stride, out3u8, vl); + vsse8_v_u8m1(out + 4, out_stride, out4u8, vl); + vsse8_v_u8m1(out + 5, out_stride, out5u8, vl); + vsse8_v_u8m1(out + 6, out_stride, out6u8, vl); + vsse8_v_u8m1(out + 7, out_stride, out7u8, vl); + } +#else const size_t vl = __riscv_vsetvl_e16m1(8); // column pass @@ -3074,6 +3224,35 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) vint16m1_t out3 = __riscv_vnsra_wx_i16m1(__riscv_vadd_vv_i32m2(x3, x4, vl), 17, vl); vint16m1_t out4 = __riscv_vnsra_wx_i16m1(__riscv_vsub_vv_i32m2(x3, x4, vl), 17, vl); +#ifdef __THEAD_VERSION__ + // clamp 0~255 + out0 = __riscv_vmax_vx_i16m1(out0, 0, vl); + out7 = __riscv_vmax_vx_i16m1(out7, 0, vl); + out1 = __riscv_vmax_vx_i16m1(out1, 0, vl); + out6 = __riscv_vmax_vx_i16m1(out6, 0, vl); + out2 = __riscv_vmax_vx_i16m1(out2, 0, vl); + out5 = __riscv_vmax_vx_i16m1(out5, 0, vl); + out3 = __riscv_vmax_vx_i16m1(out3, 0, vl); + out4 = __riscv_vmax_vx_i16m1(out4, 0, vl); + vuint8m1_t out0u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out0, out0)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out7u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out7, out7)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out1u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out1, out1)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out6u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out6, out6)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out2u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out2, out2)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out5u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out5, out5)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out3u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out3, out3)), 0, __RISCV_VXRM_RNU, vl); + vuint8m1_t out4u8 = __riscv_vnclipu_wx_u8m1(__riscv_vreinterpret_v_i16m2_u16m2(__riscv_vcreate_v_i16m1_i16m2(out4, out4)), 0, __RISCV_VXRM_RNU, vl); + + // 8x8 transpose + __riscv_vsse8_v_u8m1(out + 0, out_stride, out0u8, vl); + __riscv_vsse8_v_u8m1(out + 1, out_stride, out1u8, vl); + __riscv_vsse8_v_u8m1(out + 2, out_stride, out2u8, vl); + __riscv_vsse8_v_u8m1(out + 3, out_stride, out3u8, vl); + __riscv_vsse8_v_u8m1(out + 4, out_stride, out4u8, vl); + __riscv_vsse8_v_u8m1(out + 5, out_stride, out5u8, vl); + __riscv_vsse8_v_u8m1(out + 6, out_stride, out6u8, vl); + __riscv_vsse8_v_u8m1(out + 7, out_stride, out7u8, vl); +#else // __THEAD_VERSION__ // clamp 0~255 vuint8mf2_t out0u8 = __riscv_vnclipu_wx_u8mf2(__riscv_vreinterpret_v_i16m1_u16m1(__riscv_vmax_vx_i16m1(out0, 0, vl)), 0, __RISCV_VXRM_RNU, vl); vuint8mf2_t out7u8 = __riscv_vnclipu_wx_u8mf2(__riscv_vreinterpret_v_i16m1_u16m1(__riscv_vmax_vx_i16m1(out7, 0, vl)), 0, __RISCV_VXRM_RNU, vl); @@ -3093,7 +3272,9 @@ static void stbi__idct_simd(stbi_uc *out, int out_stride, short data[64]) __riscv_vsse8_v_u8mf2(out + 5, out_stride, out5u8, vl); __riscv_vsse8_v_u8mf2(out + 6, out_stride, out6u8, vl); __riscv_vsse8_v_u8mf2(out + 7, out_stride, out7u8, vl); +#endif // __THEAD_VERSION__ } +#endif } #endif // STBI_RVV @@ -3730,6 +3911,36 @@ static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stb // because we need to handle the filter boundary conditions. int n = w-1; while (n > 0) { +#if __riscv_vector_071 + size_t vl = vsetvl_e8m4(n); + + // load and perform the vertical filtering pass + vuint8m4_t farb = vle8_v_u8m4(in_far + i, vl); + vuint8m4_t nearb = vle8_v_u8m4(in_near + i, vl); + vuint16m8_t curr = vadd_vv_u16m8(vwmulu_vx_u16m8(nearb, 3, vl), vwcvtu_x_x_v_u16m8(farb, vl), vl); // current row + + // horizontal filter works the same based on shifted vers of current + // row. "prev" is current row shifted right by 1 pixel; we need to + // insert the previous pixel value (from t1). + // "next" is current row shifted left by 1 pixel, with first pixel + // of next block of vl*4 pixels added in. + vuint16m8_t prev = vslide1up_vx_u16m8(curr, t1, vl); + vuint16m8_t next = vslide1down_vx_u16m8(curr, 3*in_near[i+vl] + in_far[i+vl], vl); + + // horizontal filter, polyphase implementation since it's convenient: + // even pixels = 3*cur + prev + 8 + // odd pixels = 3*cur + next + 8 + // note the shared term. + vuint16m8_t curs = vmacc_vx_u16m8(vmv_v_x_u16m8(8, vl), 3, curr, vl); + vuint16m8_t even = vadd_vv_u16m8(curs, prev, vl); + vuint16m8_t odd = vadd_vv_u16m8(curs, next, vl); + + // undo scaling and round, then store with even/odd phases interleaved + vuint8m4_t evenu8 = vnclipu_wx_u8m4(vsrl_vx_u16m8(even, 4, vl), 0, vl); + vuint8m4_t oddu8 = vnclipu_wx_u8m4(vsrl_vx_u16m8(odd, 4, vl), 0, vl); + vuint8m4x2_t o = vcreate_u8m4x2(evenu8, oddu8); + vsseg2e8_v_u8m4x2(out + i*2, o, vl); +#else size_t vl = __riscv_vsetvl_e8m4(n); // load and perform the vertical filtering pass @@ -3758,6 +3969,7 @@ static stbi_uc *stbi__resample_row_hv_2_simd(stbi_uc *out, stbi_uc *in_near, stb vuint8m4_t oddu8 = __riscv_vnclipu_wx_u8m4(__riscv_vsrl_vx_u16m8(odd, 4, vl), 0, __RISCV_VXRM_RNU, vl); vuint8m4x2_t o = __riscv_vcreate_v_u8m4x2(evenu8, oddu8); __riscv_vsseg2e8_v_u8m4x2(out + i*2, o, vl); +#endif // "previous" value for next iter t1 = 3*in_near[i+(vl-1)] + in_far[i+(vl-1)]; @@ -4074,6 +4286,39 @@ static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc cons int n = count; while (n > 0) { +#if __riscv_vector_071 + size_t vl = vsetvl_e8m2(n); + + // load + vuint8m2_t y_bytes = vle8_v_u8m2(y + i, vl); + vuint8m2_t cr_bytes = vle8_v_u8m2(pcr + i, vl); + vuint8m2_t cb_bytes = vle8_v_u8m2(pcb + i, vl); + vint8m2_t cr_biased = vreinterpret_v_u8m2_i8m2(vsub_vx_u8m2(cr_bytes, signflip, vl)); + vint8m2_t cb_biased = vreinterpret_v_u8m2_i8m2(vsub_vx_u8m2(cb_bytes, signflip, vl)); + + // expand to s16 + vint16m4_t yws = vadd_vx_i16m4(vsll_vx_i16m4(vreinterpret_v_u16m4_i16m4(vwcvtu_x_x_v_u16m4(y_bytes, vl)), 4, vl), 8, vl); + vint16m4_t crw = vsll_vx_i16m4(vwcvt_x_x_v_i16m4(cr_biased, vl), 8, vl); + vint16m4_t cbw = vsll_vx_i16m4(vwcvt_x_x_v_i16m4(cb_biased, vl), 8, vl); + + // color transform + vint16m4_t cr0 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(crw, cr_const0, vl), 16, vl), 0, vl); + vint16m4_t cb0 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(cbw, cb_const0, vl), 16, vl), 0, vl); + vint16m4_t cr1 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(crw, cr_const1, vl), 16, vl), 0, vl); + vint16m4_t cb1 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(cbw, cb_const1, vl), 16, vl), 0, vl); + vint16m4_t rws = vadd_vv_i16m4(yws, cr0, vl); + vint16m4_t gws = vadd_vv_i16m4(vadd_vv_i16m4(yws, cb0, vl), cr1, vl); + vint16m4_t bws = vadd_vv_i16m4(yws, cb1, vl); + + // undo scaling, round, convert to byte + vuint8m2_t rb = vnclipu_wx_u8m2(vreinterpret_v_i16m4_u16m4(vmax_vx_i16m4(vsra_vx_i16m4(rws, 4, vl), 0, vl)), 0, vl); + vuint8m2_t gb = vnclipu_wx_u8m2(vreinterpret_v_i16m4_u16m4(vmax_vx_i16m4(vsra_vx_i16m4(gws, 4, vl), 0, vl)), 0, vl); + vuint8m2_t bb = vnclipu_wx_u8m2(vreinterpret_v_i16m4_u16m4(vmax_vx_i16m4(vsra_vx_i16m4(bws, 4, vl), 0, vl)), 0, vl); + + // store, interleaving r/g/b + vuint8m2x3_t o = vcreate_u8m2x3(rb, gb, bb); + vsseg3e8_v_u8m2x3(out, o, vl); +#else size_t vl = __riscv_vsetvl_e8m2(n); // load @@ -4105,6 +4350,7 @@ static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc cons // store, interleaving r/g/b vuint8m2x3_t o = __riscv_vcreate_v_u8m2x3(rb, gb, bb); __riscv_vsseg3e8_v_u8m2x3(out, o, vl); +#endif out += vl*3; i += vl; @@ -4121,6 +4367,40 @@ static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc cons int n = count; while (n > 0) { +#if __riscv_vector_071 + size_t vl = vsetvl_e8m1(n); + + // load + vuint8m2_t y_bytes = vle8_v_u8m2(y + i, vl); + vuint8m2_t cr_bytes = vle8_v_u8m2(pcr + i, vl); + vuint8m2_t cb_bytes = vle8_v_u8m2(pcb + i, vl); + vint8m2_t cr_biased = vreinterpret_v_u8m2_i8m2(vsub_vx_u8m2(cr_bytes, signflip, vl)); + vint8m2_t cb_biased = vreinterpret_v_u8m2_i8m2(vsub_vx_u8m2(cb_bytes, signflip, vl)); + + // expand to s16 + vint16m4_t yws = vadd_vx_i16m4(vsll_vx_i16m4(vreinterpret_v_u16m4_i16m4(vwcvtu_x_x_v_u16m4(y_bytes, vl)), 4, vl), 8, vl); + vint16m4_t crw = vsll_vx_i16m4(vwcvt_x_x_v_i16m4(cr_biased, vl), 8, vl); + vint16m4_t cbw = vsll_vx_i16m4(vwcvt_x_x_v_i16m4(cb_biased, vl), 8, vl); + + // color transform + vint16m4_t cr0 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(crw, cr_const0, vl), 16, vl), 0, vl); + vint16m4_t cb0 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(cbw, cb_const0, vl), 16, vl), 0, vl); + vint16m4_t cr1 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(crw, cr_const1, vl), 16, vl), 0, vl); + vint16m4_t cb1 = vnclip_wx_i16m4(vsra_vx_i32m8(vwmul_vx_i32m8(cbw, cb_const1, vl), 16, vl), 0, vl); + vint16m4_t rws = vadd_vv_i16m4(yws, cr0, vl); + vint16m4_t gws = vadd_vv_i16m4(vadd_vv_i16m4(yws, cb0, vl), cr1, vl); + vint16m4_t bws = vadd_vv_i16m4(yws, cb1, vl); + + // undo scaling, round, convert to byte + vuint8m2_t rb = vnclipu_wx_u8m2(vreinterpret_v_i16m4_u16m4(vmax_vx_i16m4(vsra_vx_i16m4(rws, 4, vl), 0, vl)), 0, vl); + vuint8m2_t gb = vnclipu_wx_u8m2(vreinterpret_v_i16m4_u16m4(vmax_vx_i16m4(vsra_vx_i16m4(gws, 4, vl), 0, vl)), 0, vl); + vuint8m2_t bb = vnclipu_wx_u8m2(vreinterpret_v_i16m4_u16m4(vmax_vx_i16m4(vsra_vx_i16m4(bws, 4, vl), 0, vl)), 0, vl); + vuint8m2_t ab = vmv_v_x_u8m2(255, vl); + + // store, interleaving r/g/b/a + vuint8m2x4_t o = vcreate_u8m2x4(rb, gb, bb, ab); + vsseg4e8_v_u8m2x4(out, o, vl); +#else size_t vl = __riscv_vsetvl_e8m1(n); // load @@ -4153,6 +4433,7 @@ static void stbi__YCbCr_to_RGB_simd(stbi_uc *out, stbi_uc const *y, stbi_uc cons // store, interleaving r/g/b/a vuint8m2x4_t o = __riscv_vcreate_v_u8m2x4(rb, gb, bb, ab); __riscv_vsseg4e8_v_u8m2x4(out, o, vl); +#endif out += vl*4; i += vl; diff --git a/patches/opencv-4.11.0-no-zlib.patch b/patches/opencv-4.11.0-no-zlib.patch deleted file mode 100644 index b86f2ea..0000000 --- a/patches/opencv-4.11.0-no-zlib.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -Nuarp opencv-4.11.0.orig/modules/core/src/persistence.hpp opencv-4.11.0/modules/core/src/persistence.hpp ---- opencv-4.11.0.orig/modules/core/src/persistence.hpp 2025-01-18 23:31:52.826608631 +0800 -+++ opencv-4.11.0/modules/core/src/persistence.hpp 2025-01-18 23:46:02.204299996 +0800 -@@ -12,7 +12,7 @@ - #include - #include - --#define USE_ZLIB 1 -+#define USE_ZLIB 0 - #if USE_ZLIB - # ifndef _LFS64_LARGEFILE - # define _LFS64_LARGEFILE 0 diff --git a/patches/opencv-4.11.0-drawing-mono-font.patch b/patches/opencv-4.12.0-drawing-mono-font.patch similarity index 88% rename from patches/opencv-4.11.0-drawing-mono-font.patch rename to patches/opencv-4.12.0-drawing-mono-font.patch index 9f2b403..2a41919 100644 --- a/patches/opencv-4.11.0-drawing-mono-font.patch +++ b/patches/opencv-4.12.0-drawing-mono-font.patch @@ -1,7 +1,7 @@ -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/include/opencv2/imgproc.hpp opencv-4.11.0/modules/imgproc/include/opencv2/imgproc.hpp ---- opencv-4.11.0.orig/modules/imgproc/include/opencv2/imgproc.hpp 2025-01-19 00:07:25.706895750 +0800 -+++ opencv-4.11.0/modules/imgproc/include/opencv2/imgproc.hpp 2025-01-19 00:19:27.955301521 +0800 -@@ -4929,6 +4929,37 @@ CV_EXPORTS_W double getFontScaleFromHeig +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/include/opencv2/imgproc.hpp opencv-4.12.0/modules/imgproc/include/opencv2/imgproc.hpp +--- opencv-4.12.0.orig/modules/imgproc/include/opencv2/imgproc.hpp 2025-07-13 20:34:53.921109201 +0800 ++++ opencv-4.12.0/modules/imgproc/include/opencv2/imgproc.hpp 2025-07-13 20:47:35.128999775 +0800 +@@ -4985,6 +4985,37 @@ CV_EXPORTS_W double getFontScaleFromHeig const int pixelHeight, const int thickness = 1); @@ -39,9 +39,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/include/opencv2/imgproc.hpp openc /** @brief Class for iterating over all pixels on a raster line segment. The class LineIterator is used to get each pixel of a raster line connecting -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/drawing.cpp opencv-4.11.0/modules/imgproc/src/drawing.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/drawing.cpp 2025-01-19 00:07:25.768896509 +0800 -+++ opencv-4.11.0/modules/imgproc/src/drawing.cpp 2025-01-19 00:24:39.379680129 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/drawing.cpp opencv-4.12.0/modules/imgproc/src/drawing.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/drawing.cpp 2025-07-13 20:34:53.982915100 +0800 ++++ opencv-4.12.0/modules/imgproc/src/drawing.cpp 2025-07-13 20:47:35.129302958 +0800 @@ -43,6 +43,25 @@ using namespace cv; namespace cv @@ -262,9 +262,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/drawing.cpp opencv-4.11.0/mod font->font_face = font_face; font->hscale = (float)hscale; font->vscale = (float)vscale; -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/hershey_fonts.cpp opencv-4.11.0/modules/imgproc/src/hershey_fonts.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/hershey_fonts.cpp 2025-01-19 00:07:25.781896668 +0800 -+++ opencv-4.11.0/modules/imgproc/src/hershey_fonts.cpp 2025-01-19 00:19:27.956301532 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/hershey_fonts.cpp opencv-4.12.0/modules/imgproc/src/hershey_fonts.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/hershey_fonts.cpp 2025-07-13 20:34:53.994911429 +0800 ++++ opencv-4.12.0/modules/imgproc/src/hershey_fonts.cpp 2025-07-13 20:47:35.129521420 +0800 @@ -51,6 +51,7 @@ namespace cv { diff --git a/patches/opencv-4.11.0-fix-windows-arm-arch.patch b/patches/opencv-4.12.0-fix-windows-arm-arch.patch similarity index 62% rename from patches/opencv-4.11.0-fix-windows-arm-arch.patch rename to patches/opencv-4.12.0-fix-windows-arm-arch.patch index 62eb3d7..1a506f4 100644 --- a/patches/opencv-4.11.0-fix-windows-arm-arch.patch +++ b/patches/opencv-4.12.0-fix-windows-arm-arch.patch @@ -1,6 +1,6 @@ -diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-4.11.0/cmake/OpenCVDetectCXXCompiler.cmake ---- opencv-4.11.0.orig/cmake/OpenCVDetectCXXCompiler.cmake 2025-01-18 23:31:52.784608127 +0800 -+++ opencv-4.11.0/cmake/OpenCVDetectCXXCompiler.cmake 2025-01-18 23:48:03.298849297 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-4.12.0/cmake/OpenCVDetectCXXCompiler.cmake +--- opencv-4.12.0.orig/cmake/OpenCVDetectCXXCompiler.cmake 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/cmake/OpenCVDetectCXXCompiler.cmake 2025-07-13 20:45:15.821962247 +0800 @@ -154,9 +154,9 @@ elseif(MSVC) # see Modules/CMakeGenericSystem.cmake if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") @@ -13,9 +13,9 @@ diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVDetectCXXCompiler.cmake opencv-4.11.0 set(OpenCV_ARCH "ARM") elseif("${CMAKE_SIZEOF_VOID_P}" STREQUAL "8") set(OpenCV_ARCH "x64") -diff -Nuarp opencv-4.11.0.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in opencv-4.11.0/cmake/templates/OpenCVConfig.root-WIN32.cmake.in ---- opencv-4.11.0.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2025-01-18 23:31:52.785608139 +0800 -+++ opencv-4.11.0/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2025-01-18 23:48:03.298849297 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in opencv-4.12.0/cmake/templates/OpenCVConfig.root-WIN32.cmake.in +--- opencv-4.12.0.orig/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/cmake/templates/OpenCVConfig.root-WIN32.cmake.in 2025-07-13 20:45:15.822091762 +0800 @@ -99,9 +99,9 @@ elseif(MSVC) # see Modules/CMakeGenericSystem.cmake if("${CMAKE_GENERATOR}" MATCHES "(Win64|IA64)") diff --git a/patches/opencv-4.11.0-link-openmp.patch b/patches/opencv-4.12.0-link-openmp.patch similarity index 50% rename from patches/opencv-4.11.0-link-openmp.patch rename to patches/opencv-4.12.0-link-openmp.patch index 9c2f1ee..ccd622b 100644 --- a/patches/opencv-4.11.0-link-openmp.patch +++ b/patches/opencv-4.12.0-link-openmp.patch @@ -1,6 +1,6 @@ -diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVGenConfig.cmake opencv-4.11.0/cmake/OpenCVGenConfig.cmake ---- opencv-4.11.0.orig/cmake/OpenCVGenConfig.cmake 2025-01-18 23:31:52.784608127 +0800 -+++ opencv-4.11.0/cmake/OpenCVGenConfig.cmake 2025-01-18 23:46:35.410724844 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/OpenCVGenConfig.cmake opencv-4.12.0/cmake/OpenCVGenConfig.cmake +--- opencv-4.12.0.orig/cmake/OpenCVGenConfig.cmake 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/cmake/OpenCVGenConfig.cmake 2025-07-13 20:44:03.721541472 +0800 @@ -19,6 +19,10 @@ if(HAVE_CUDA) endif() endif() @@ -12,9 +12,9 @@ diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVGenConfig.cmake opencv-4.11.0/cmake/O if(ANDROID) if(NOT ANDROID_NATIVE_API_LEVEL) set(OpenCV_ANDROID_NATIVE_API_LEVEL_CONFIGCMAKE 0) -diff -Nuarp opencv-4.11.0.orig/cmake/templates/OpenCVConfig.cmake.in opencv-4.11.0/cmake/templates/OpenCVConfig.cmake.in ---- opencv-4.11.0.orig/cmake/templates/OpenCVConfig.cmake.in 2025-01-18 23:31:52.785608139 +0800 -+++ opencv-4.11.0/cmake/templates/OpenCVConfig.cmake.in 2025-01-18 23:46:35.410724844 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/templates/OpenCVConfig.cmake.in opencv-4.12.0/cmake/templates/OpenCVConfig.cmake.in +--- opencv-4.12.0.orig/cmake/templates/OpenCVConfig.cmake.in 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/cmake/templates/OpenCVConfig.cmake.in 2025-07-13 20:44:03.721676457 +0800 @@ -94,6 +94,7 @@ endif() @@ -23,19 +23,19 @@ diff -Nuarp opencv-4.11.0.orig/cmake/templates/OpenCVConfig.cmake.in opencv-4.11 @ANDROID_CONFIGCMAKE@ @IPPICV_CONFIGCMAKE@ -diff -Nuarp opencv-4.11.0.orig/cmake/templates/OpenCVConfig-OPENMP.cmake.in opencv-4.11.0/cmake/templates/OpenCVConfig-OPENMP.cmake.in ---- opencv-4.11.0.orig/cmake/templates/OpenCVConfig-OPENMP.cmake.in 1970-01-01 08:00:00.000000000 +0800 -+++ opencv-4.11.0/cmake/templates/OpenCVConfig-OPENMP.cmake.in 2025-01-18 23:46:35.410724844 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/templates/OpenCVConfig-OPENMP.cmake.in opencv-4.12.0/cmake/templates/OpenCVConfig-OPENMP.cmake.in +--- opencv-4.12.0.orig/cmake/templates/OpenCVConfig-OPENMP.cmake.in 1970-01-01 08:00:00.000000000 +0800 ++++ opencv-4.12.0/cmake/templates/OpenCVConfig-OPENMP.cmake.in 2025-07-13 20:44:03.721720150 +0800 @@ -0,0 +1,5 @@ +set(OpenCV_USE_OPENMP "@HAVE_OPENMP@") + +if(OpenCV_USE_OPENMP) + find_package(OpenMP) +endif() -diff -Nuarp opencv-4.11.0.orig/modules/core/CMakeLists.txt opencv-4.11.0/modules/core/CMakeLists.txt ---- opencv-4.11.0.orig/modules/core/CMakeLists.txt 2025-01-18 23:31:52.823608595 +0800 -+++ opencv-4.11.0/modules/core/CMakeLists.txt 2025-01-18 23:46:35.410724844 +0800 -@@ -198,8 +198,14 @@ if(HAVE_HPX) +diff -Nuarp opencv-4.12.0.orig/modules/core/CMakeLists.txt opencv-4.12.0/modules/core/CMakeLists.txt +--- opencv-4.12.0.orig/modules/core/CMakeLists.txt 2025-07-13 20:34:53.411195513 +0800 ++++ opencv-4.12.0/modules/core/CMakeLists.txt 2025-07-13 20:44:03.721762991 +0800 +@@ -205,8 +205,14 @@ if(HAVE_HPX) ocv_target_link_libraries(${the_module} LINK_PRIVATE "${HPX_LIBRARIES}") endif() @@ -52,9 +52,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/CMakeLists.txt opencv-4.11.0/modules endif() ocv_add_accuracy_tests() -diff -Nuarp opencv-4.11.0.orig/modules/video/CMakeLists.txt opencv-4.11.0/modules/video/CMakeLists.txt ---- opencv-4.11.0.orig/modules/video/CMakeLists.txt 2025-01-18 23:31:52.852608943 +0800 -+++ opencv-4.11.0/modules/video/CMakeLists.txt 2025-01-18 23:46:35.410724844 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/video/CMakeLists.txt opencv-4.12.0/modules/video/CMakeLists.txt +--- opencv-4.12.0.orig/modules/video/CMakeLists.txt 2025-07-13 20:34:54.325975364 +0800 ++++ opencv-4.12.0/modules/video/CMakeLists.txt 2025-07-13 20:44:03.721811613 +0800 @@ -10,7 +10,3 @@ ocv_define_module(video python js diff --git a/patches/opencv-4.11.0-minimal-install.patch b/patches/opencv-4.12.0-minimal-install.patch similarity index 73% rename from patches/opencv-4.11.0-minimal-install.patch rename to patches/opencv-4.12.0-minimal-install.patch index 689408e..1b362ff 100644 --- a/patches/opencv-4.11.0-minimal-install.patch +++ b/patches/opencv-4.12.0-minimal-install.patch @@ -1,6 +1,6 @@ -diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVGenAndroidMK.cmake opencv-4.11.0/cmake/OpenCVGenAndroidMK.cmake ---- opencv-4.11.0.orig/cmake/OpenCVGenAndroidMK.cmake 2025-01-18 23:31:52.784608127 +0800 -+++ opencv-4.11.0/cmake/OpenCVGenAndroidMK.cmake 2025-01-18 23:49:42.727186205 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/OpenCVGenAndroidMK.cmake opencv-4.12.0/cmake/OpenCVGenAndroidMK.cmake +--- opencv-4.12.0.orig/cmake/OpenCVGenAndroidMK.cmake 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/cmake/OpenCVGenAndroidMK.cmake 2025-07-13 20:45:44.236083195 +0800 @@ -76,6 +76,4 @@ if(ANDROID) configure_file("${OpenCV_SOURCE_DIR}/cmake/templates/OpenCV.mk.in" "${CMAKE_BINARY_DIR}/unix-install/OpenCV.mk" @ONLY) @@ -8,9 +8,9 @@ diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVGenAndroidMK.cmake opencv-4.11.0/cmak - install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCV.mk DESTINATION ${OPENCV_CONFIG_INSTALL_PATH} COMPONENT dev) - install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCV-${ANDROID_NDK_ABI_NAME}.mk DESTINATION ${OPENCV_CONFIG_INSTALL_PATH} COMPONENT dev) endif(ANDROID) -diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVUtils.cmake opencv-4.11.0/cmake/OpenCVUtils.cmake ---- opencv-4.11.0.orig/cmake/OpenCVUtils.cmake 2025-01-18 23:31:52.785608139 +0800 -+++ opencv-4.11.0/cmake/OpenCVUtils.cmake 2025-01-18 23:49:42.727186205 +0800 +diff -Nuarp opencv-4.12.0.orig/cmake/OpenCVUtils.cmake opencv-4.12.0/cmake/OpenCVUtils.cmake +--- opencv-4.12.0.orig/cmake/OpenCVUtils.cmake 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/cmake/OpenCVUtils.cmake 2025-07-13 20:45:44.236238188 +0800 @@ -980,11 +980,6 @@ macro(ocv_finalize_status) endif() endif() @@ -23,10 +23,10 @@ diff -Nuarp opencv-4.11.0.orig/cmake/OpenCVUtils.cmake opencv-4.11.0/cmake/OpenC endmacro() -diff -Nuarp opencv-4.11.0.orig/CMakeLists.txt opencv-4.11.0/CMakeLists.txt ---- opencv-4.11.0.orig/CMakeLists.txt 2025-01-18 23:31:52.783608115 +0800 -+++ opencv-4.11.0/CMakeLists.txt 2025-01-18 23:49:42.727186205 +0800 -@@ -1068,20 +1068,12 @@ ocv_add_modules_compiler_options() +diff -Nuarp opencv-4.12.0.orig/CMakeLists.txt opencv-4.12.0/CMakeLists.txt +--- opencv-4.12.0.orig/CMakeLists.txt 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/CMakeLists.txt 2025-07-13 20:45:44.236390165 +0800 +@@ -1096,20 +1096,12 @@ ocv_add_modules_compiler_options() ocv_register_modules() # Generate targets for documentation @@ -47,7 +47,7 @@ diff -Nuarp opencv-4.11.0.orig/CMakeLists.txt opencv-4.11.0/CMakeLists.txt # ---------------------------------------------------------------------------- # Finalization: generate configuration-based files -@@ -1093,20 +1085,13 @@ ocv_cmake_hook(PRE_FINALIZE) +@@ -1121,20 +1113,13 @@ ocv_cmake_hook(PRE_FINALIZE) include(cmake/OpenCVGenHeaders.cmake) # Generate opencv.pc for pkg-config command @@ -68,7 +68,7 @@ diff -Nuarp opencv-4.11.0.orig/CMakeLists.txt opencv-4.11.0/CMakeLists.txt # Generate ABI descriptor include(cmake/OpenCVGenABI.cmake) -@@ -1132,12 +1117,6 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PA +@@ -1160,12 +1145,6 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PA endif() endif() @@ -81,7 +81,7 @@ diff -Nuarp opencv-4.11.0.orig/CMakeLists.txt opencv-4.11.0/CMakeLists.txt if(NOT OPENCV_LICENSE_FILE) set(OPENCV_LICENSE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE) endif() -@@ -1147,11 +1126,6 @@ if(ANDROID OR NOT UNIX) +@@ -1175,11 +1154,6 @@ if(ANDROID OR NOT UNIX) install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ DESTINATION ./ COMPONENT libs) @@ -93,9 +93,9 @@ diff -Nuarp opencv-4.11.0.orig/CMakeLists.txt opencv-4.11.0/CMakeLists.txt endif() if(COMMAND ocv_pylint_finalize) -diff -Nuarp opencv-4.11.0.orig/data/CMakeLists.txt opencv-4.11.0/data/CMakeLists.txt ---- opencv-4.11.0.orig/data/CMakeLists.txt 2025-01-18 23:31:52.786608151 +0800 -+++ opencv-4.11.0/data/CMakeLists.txt 2025-01-18 23:49:42.727186205 +0800 +diff -Nuarp opencv-4.12.0.orig/data/CMakeLists.txt opencv-4.12.0/data/CMakeLists.txt +--- opencv-4.12.0.orig/data/CMakeLists.txt 2025-07-02 15:54:13.000000000 +0800 ++++ opencv-4.12.0/data/CMakeLists.txt 2025-07-13 20:45:44.236516824 +0800 @@ -1,9 +1,6 @@ file(GLOB HAAR_CASCADES haarcascades/*.xml) file(GLOB LBP_CASCADES lbpcascades/*.xml) diff --git a/patches/opencv-4.11.0-no-atomic.patch b/patches/opencv-4.12.0-no-atomic.patch similarity index 52% rename from patches/opencv-4.11.0-no-atomic.patch rename to patches/opencv-4.12.0-no-atomic.patch index 23f5b78..c11f7e3 100644 --- a/patches/opencv-4.11.0-no-atomic.patch +++ b/patches/opencv-4.12.0-no-atomic.patch @@ -1,7 +1,7 @@ -diff -Nuarp opencv-4.11.0.orig/modules/core/src/mathfuncs.cpp opencv-4.11.0/modules/core/src/mathfuncs.cpp ---- opencv-4.11.0.orig/modules/core/src/mathfuncs.cpp 2025-01-18 23:31:52.827608643 +0800 -+++ opencv-4.11.0/modules/core/src/mathfuncs.cpp 2025-01-18 23:55:21.143734178 +0800 -@@ -2170,8 +2170,13 @@ const double* getExpTab64f() +diff -Nuarp opencv-4.12.0.orig/modules/core/src/mathfuncs.cpp opencv-4.12.0/modules/core/src/mathfuncs.cpp +--- opencv-4.12.0.orig/modules/core/src/mathfuncs.cpp 2025-07-13 20:34:53.536599577 +0800 ++++ opencv-4.12.0/modules/core/src/mathfuncs.cpp 2025-07-13 20:49:01.526535532 +0800 +@@ -1929,8 +1929,13 @@ const double* getExpTab64f() const float* getExpTab32f() { static float CV_DECL_ALIGNED(64) expTab_f[EXPTAB_MASK+1]; @@ -15,10 +15,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/mathfuncs.cpp opencv-4.11.0/modu { for( int j = 0; j <= EXPTAB_MASK; j++ ) expTab_f[j] = (float)expTab[j]; -diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel.cpp opencv-4.11.0/modules/core/src/parallel.cpp ---- opencv-4.11.0.orig/modules/core/src/parallel.cpp 2025-01-18 23:43:48.356574419 +0800 -+++ opencv-4.11.0/modules/core/src/parallel.cpp 2025-01-18 23:55:21.143734178 +0800 -@@ -497,6 +497,7 @@ void parallel_for_(const cv::Range& rang +diff -Nuarp opencv-4.12.0.orig/modules/core/src/parallel.cpp opencv-4.12.0/modules/core/src/parallel.cpp +--- opencv-4.12.0.orig/modules/core/src/parallel.cpp 2025-07-13 20:34:53.534609328 +0800 ++++ opencv-4.12.0/modules/core/src/parallel.cpp 2025-07-13 20:49:01.526709430 +0800 +@@ -517,6 +517,7 @@ void parallel_for_(const cv::Range& rang if (range.empty()) return; @@ -26,7 +26,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel.cpp opencv-4.11.0/modul static std::atomic flagNestedParallelFor(false); bool isNotNestedRegion = !flagNestedParallelFor.load(); if (isNotNestedRegion) -@@ -509,6 +510,7 @@ void parallel_for_(const cv::Range& rang +@@ -535,6 +536,7 @@ void parallel_for_(const cv::Range& rang } } else // nested parallel_for_() calls are not parallelized diff --git a/patches/opencv-4.11.0-no-gpu.patch b/patches/opencv-4.12.0-no-gpu.patch similarity index 87% rename from patches/opencv-4.11.0-no-gpu.patch rename to patches/opencv-4.12.0-no-gpu.patch index 4991147..cdff726 100644 --- a/patches/opencv-4.11.0-no-gpu.patch +++ b/patches/opencv-4.12.0-no-gpu.patch @@ -1,7 +1,7 @@ -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/base.hpp opencv-4.11.0/modules/core/include/opencv2/core/base.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/base.hpp 2025-01-19 00:07:25.164889119 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/base.hpp 2025-01-19 00:07:45.979143770 +0800 -@@ -608,8 +608,6 @@ class CV_EXPORTS RNG; +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/base.hpp opencv-4.12.0/modules/core/include/opencv2/core/base.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/base.hpp 2025-07-13 20:34:53.375658621 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/base.hpp 2025-07-13 20:35:40.837459176 +0800 +@@ -672,8 +672,6 @@ class CV_EXPORTS RNG; class CV_EXPORTS Mat; class CV_EXPORTS MatExpr; @@ -10,7 +10,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/base.hpp opencv class CV_EXPORTS SparseMat; typedef Mat MatND; -@@ -624,26 +622,6 @@ template class MatConstIte +@@ -688,26 +686,6 @@ template class MatConstIte template class SparseMatIterator_; template class SparseMatConstIterator_; @@ -37,9 +37,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/base.hpp opencv namespace ipp { CV_EXPORTS unsigned long long getIppFeatures(); -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/cvdef.h opencv-4.11.0/modules/core/include/opencv2/core/cvdef.h ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/cvdef.h 2025-01-19 00:07:25.192889461 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/cvdef.h 2025-01-19 00:07:45.979143770 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/cvdef.h opencv-4.12.0/modules/core/include/opencv2/core/cvdef.h +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/cvdef.h 2025-07-13 20:34:53.403872892 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/cvdef.h 2025-07-13 20:35:40.837977165 +0800 @@ -945,4 +945,9 @@ CV_INLINE int CV_FOURCC(char c1, char c2 #include "opencv2/core/fast_math.hpp" // define cvRound(double) #endif @@ -50,9 +50,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/cvdef.h opencv- +#define CV_OVX_RUN(condition, func, ...) + #endif // OPENCV_CORE_CVDEF_H -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/cvstd.inl.hpp opencv-4.11.0/modules/core/include/opencv2/core/cvstd.inl.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/cvstd.inl.hpp 2025-01-19 00:07:25.154888997 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/cvstd.inl.hpp 2025-01-19 00:07:45.979143770 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/cvstd.inl.hpp opencv-4.12.0/modules/core/include/opencv2/core/cvstd.inl.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/cvstd.inl.hpp 2025-07-13 20:34:53.365526433 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/cvstd.inl.hpp 2025-07-13 20:35:40.838081151 +0800 @@ -89,12 +89,6 @@ std::ostream& operator << (std::ostream& return out << Formatter::get()->format(mtx); } @@ -66,9 +66,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/cvstd.inl.hpp o template static inline std::ostream& operator << (std::ostream& out, const Complex<_Tp>& c) { -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv-4.11.0/modules/core/include/opencv2/core/mat.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp 2025-01-19 00:07:25.181889327 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/mat.hpp 2025-01-19 00:07:45.980143782 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/mat.hpp opencv-4.12.0/modules/core/include/opencv2/core/mat.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/mat.hpp 2025-07-13 20:34:53.392294934 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/mat.hpp 2025-07-13 20:36:48.508863793 +0800 @@ -175,13 +175,7 @@ public: #if OPENCV_ABI_COMPATIBILITY < 500 EXPR = 6 << KIND_SHIFT, //!< removed: https://github.com/opencv/opencv/pull/17046 @@ -173,9 +173,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- void create(Size sz, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast<_OutputArray::DepthMask>(0)) const; void create(int rows, int cols, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast<_OutputArray::DepthMask>(0)) const; void create(int dims, const int* size, int type, int i=-1, bool allowTransposed=false, _OutputArray::DepthMask fixedDepthMask=static_cast<_OutputArray::DepthMask>(0)) const; -@@ -373,13 +332,10 @@ public: - void clear() const; +@@ -374,13 +333,10 @@ public: void setTo(const _InputArray& value, const _InputArray & mask = _InputArray()) const; + Mat reinterpret( int type ) const; - void assign(const UMat& u) const; void assign(const Mat& m) const; @@ -187,7 +187,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- void move(Mat& m) const; }; -@@ -391,10 +347,6 @@ public: +@@ -392,10 +348,6 @@ public: _InputOutputArray(int _flags, void* _obj); _InputOutputArray(Mat& m); _InputOutputArray(std::vector& vec); @@ -198,7 +198,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- template _InputOutputArray(std::vector<_Tp>& vec); _InputOutputArray(std::vector& vec) = delete; // not supported template _InputOutputArray(std::vector >& vec); -@@ -402,24 +354,15 @@ public: +@@ -403,24 +355,15 @@ public: template _InputOutputArray(Mat_<_Tp>& m); template _InputOutputArray(_Tp* vec, int n); template _InputOutputArray(Matx<_Tp, m, n>& matx); @@ -223,7 +223,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- template _InputOutputArray(std::array<_Tp, _Nm>& arr); template _InputOutputArray(const std::array<_Tp, _Nm>& arr); -@@ -1074,9 +1017,6 @@ public: +@@ -1075,9 +1018,6 @@ public: */ template explicit Mat(const MatCommaInitializer_<_Tp>& commaInitializer); @@ -233,7 +233,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- //! destructor - calls release() ~Mat(); -@@ -1099,9 +1039,6 @@ public: +@@ -1100,9 +1040,6 @@ public: */ Mat& operator = (const MatExpr& expr); @@ -243,7 +243,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- /** @brief Creates a matrix header for the specified matrix row. The method makes a new header for the specified matrix row and returns it. This is an O(1) -@@ -2445,227 +2382,6 @@ typedef Mat_ Mat2d; +@@ -2455,227 +2392,6 @@ typedef Mat_ Mat2d; typedef Mat_ Mat3d; typedef Mat_ Mat4d; @@ -274,8 +274,8 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- - UMat(const UMat& m, const Range* ranges); - UMat(const UMat& m, const std::vector& ranges); - -- // FIXIT copyData=false is not implemented, drop this in favor of cv::Mat (OpenCV 5.0) -- //! builds matrix from std::vector with or without copying the data +- //! builds matrix from std::vector. The data is always copied. The copyData +- //! parameter is deprecated and will be removed in OpenCV 5.0. - template explicit UMat(const std::vector<_Tp>& vec, bool copyData=false); - - //! destructor - calls release() @@ -471,9 +471,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.hpp opencv- /////////////////////////// multi-dimensional sparse matrix ////////////////////////// -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.inl.hpp opencv-4.11.0/modules/core/include/opencv2/core/mat.inl.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.inl.hpp 2025-01-19 00:07:25.152888972 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/mat.inl.hpp 2025-01-19 00:08:39.406797435 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/mat.inl.hpp opencv-4.12.0/modules/core/include/opencv2/core/mat.inl.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/mat.inl.hpp 2025-07-13 20:34:53.364382733 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/mat.inl.hpp 2025-07-13 20:37:18.246092541 +0800 @@ -102,8 +102,6 @@ inline _InputArray::_InputArray() { init inline _InputArray::_InputArray(int _flags, void* _obj) { init(_flags, _obj); } inline _InputArray::_InputArray(const Mat& m) { init(+MAT+ACCESS_READ, &m); } @@ -620,24 +620,19 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.inl.hpp ope template inline _InputOutputArray _InputOutputArray::rawInOut(std::vector<_Tp>& vec) { -@@ -3246,132 +3166,6 @@ const Mat_<_Tp>& operator /= (const Mat_ +@@ -3252,127 +3172,6 @@ const Mat_<_Tp>& operator /= (const Mat_ //////////////////////////////// UMat //////////////////////////////// -template inline -UMat::UMat(const std::vector<_Tp>& vec, bool copyData) --: flags(+MAGIC_VAL + traits::Type<_Tp>::value + CV_MAT_CONT_FLAG), dims(2), rows((int)vec.size()), --cols(1), allocator(0), usageFlags(USAGE_DEFAULT), u(0), offset(0), size(&rows) +- : flags(+MAGIC_VAL + traits::Type<_Tp>::value + CV_MAT_CONT_FLAG), dims(2), rows((int)vec.size()), +- cols(1), allocator(0), usageFlags(USAGE_DEFAULT), u(0), offset(0), size(&rows) -{ +- CV_UNUSED(copyData); // parameter kept for backward compatibility - if(vec.empty()) - return; -- if( !copyData ) -- { -- // !!!TODO!!! -- CV_Error(Error::StsNotImplemented, ""); -- } -- else -- Mat((int)vec.size(), 1, traits::Type<_Tp>::value, (uchar*)&vec[0]).copyTo(*this); +- Mat((int)vec.size(), 1, traits::Type<_Tp>::value, (uchar*)&vec[0]).copyTo(*this); -} - -inline @@ -753,9 +748,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/mat.inl.hpp ope inline bool UMatData::hostCopyObsolete() const { return (flags & HOST_COPY_OBSOLETE) != 0; } inline bool UMatData::deviceCopyObsolete() const { return (flags & DEVICE_COPY_OBSOLETE) != 0; } -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/operations.hpp opencv-4.11.0/modules/core/include/opencv2/core/operations.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/operations.hpp 2025-01-19 00:07:25.159889058 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/operations.hpp 2025-01-19 00:07:45.980143782 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/operations.hpp opencv-4.12.0/modules/core/include/opencv2/core/operations.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/operations.hpp 2025-07-13 20:34:53.370280032 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/operations.hpp 2025-07-13 20:35:40.838862737 +0800 @@ -450,12 +450,6 @@ int print(const Mat& mtx, FILE* stream = return print(Formatter::get()->format(mtx), stream); } @@ -769,9 +764,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/operations.hpp template static inline int print(const std::vector >& vec, FILE* stream = stdout) { -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core.hpp opencv-4.11.0/modules/core/include/opencv2/core.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core.hpp 2025-01-19 00:07:25.197889523 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core.hpp 2025-01-19 00:07:45.980143782 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core.hpp opencv-4.12.0/modules/core/include/opencv2/core.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core.hpp 2025-07-13 20:34:53.407787797 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core.hpp 2025-07-13 20:35:40.838992422 +0800 @@ -217,8 +217,6 @@ enum ReduceTypes { REDUCE_SUM = 0, //!< /** @brief Swaps two matrices */ @@ -781,7 +776,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core.hpp opencv-4.11 /** @brief Computes the source location of an extrapolated pixel. -@@ -1521,10 +1519,6 @@ CV_EXPORTS_W void min(InputArray src1, I +@@ -1526,10 +1524,6 @@ CV_EXPORTS_W void min(InputArray src1, I needed to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare) */ CV_EXPORTS void min(const Mat& src1, const Mat& src2, Mat& dst); @@ -792,7 +787,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core.hpp opencv-4.11 /** @brief Calculates per-element maximum of two arrays or an array and a scalar. -@@ -1542,10 +1536,6 @@ CV_EXPORTS_W void max(InputArray src1, I +@@ -1547,10 +1541,6 @@ CV_EXPORTS_W void max(InputArray src1, I needed to avoid conflicts with const _Tp& std::min(const _Tp&, const _Tp&, _Compare) */ CV_EXPORTS void max(const Mat& src1, const Mat& src2, Mat& dst); @@ -803,9 +798,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core.hpp opencv-4.11 /** @brief Calculates a square root of array elements. -diff -Nuarp opencv-4.11.0.orig/modules/core/src/arithm.cpp opencv-4.11.0/modules/core/src/arithm.cpp ---- opencv-4.11.0.orig/modules/core/src/arithm.cpp 2025-01-19 00:07:25.325891089 +0800 -+++ opencv-4.11.0/modules/core/src/arithm.cpp 2025-01-19 00:07:45.980143782 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/arithm.cpp opencv-4.12.0/modules/core/src/arithm.cpp +--- opencv-4.12.0.orig/modules/core/src/arithm.cpp 2025-07-13 20:34:53.535113841 +0800 ++++ opencv-4.12.0/modules/core/src/arithm.cpp 2025-07-13 20:35:40.839145391 +0800 @@ -418,22 +418,6 @@ void cv::min(const Mat& src1, const Mat& binary_op(src1, src2, _dst, noArray(), getMinTab(), false, OCL_OP_MIN ); } @@ -843,9 +838,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/arithm.cpp opencv-4.11.0/modules /****************************************************************************************\ * addWeighted * \****************************************************************************************/ -diff -Nuarp opencv-4.11.0.orig/modules/core/src/async.cpp opencv-4.11.0/modules/core/src/async.cpp ---- opencv-4.11.0.orig/modules/core/src/async.cpp 2025-01-19 00:07:25.292890685 +0800 -+++ opencv-4.11.0/modules/core/src/async.cpp 2025-01-19 00:07:45.980143782 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/async.cpp opencv-4.12.0/modules/core/src/async.cpp +--- opencv-4.12.0.orig/modules/core/src/async.cpp 2025-07-13 20:34:53.501516332 +0800 ++++ opencv-4.12.0/modules/core/src/async.cpp 2025-07-13 20:35:40.839258365 +0800 @@ -40,7 +40,6 @@ struct AsyncArray::Impl mutable bool has_result; // Mat, UMat or exception @@ -918,9 +913,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/async.cpp opencv-4.11.0/modules/ { result_mat = makePtr(); value.copyTo(*result_mat.get()); -diff -Nuarp opencv-4.11.0.orig/modules/core/src/channels.cpp opencv-4.11.0/modules/core/src/channels.cpp ---- opencv-4.11.0.orig/modules/core/src/channels.cpp 2025-01-19 00:07:25.338891248 +0800 -+++ opencv-4.11.0/modules/core/src/channels.cpp 2025-01-19 00:07:45.981143795 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/channels.cpp opencv-4.12.0/modules/core/src/channels.cpp +--- opencv-4.12.0.orig/modules/core/src/channels.cpp 2025-07-13 20:34:53.548123063 +0800 ++++ opencv-4.12.0/modules/core/src/channels.cpp 2025-07-13 20:35:40.839309972 +0800 @@ -282,12 +282,10 @@ void cv::mixChannels(InputArrayOfArrays bool src_is_mat = src.kind() != _InputArray::STD_VECTOR_MAT && @@ -951,10 +946,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/channels.cpp opencv-4.11.0/modul int i; int nsrc = src_is_mat ? 1 : (int)src.total(); int ndst = dst_is_mat ? 1 : (int)dst.total(); -diff -Nuarp opencv-4.11.0.orig/modules/core/src/convert.dispatch.cpp opencv-4.11.0/modules/core/src/convert.dispatch.cpp ---- opencv-4.11.0.orig/modules/core/src/convert.dispatch.cpp 2025-01-19 00:07:25.320891028 +0800 -+++ opencv-4.11.0/modules/core/src/convert.dispatch.cpp 2025-01-19 00:07:45.981143795 +0800 -@@ -301,44 +301,6 @@ void Mat::convertTo(OutputArray dst, int +diff -Nuarp opencv-4.12.0.orig/modules/core/src/convert.dispatch.cpp opencv-4.12.0/modules/core/src/convert.dispatch.cpp +--- opencv-4.12.0.orig/modules/core/src/convert.dispatch.cpp 2025-07-13 20:34:53.530116341 +0800 ++++ opencv-4.12.0/modules/core/src/convert.dispatch.cpp 2025-07-13 20:35:40.839358734 +0800 +@@ -310,44 +310,6 @@ void Mat::convertTo(OutputArray dst, int } } @@ -999,10 +994,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/convert.dispatch.cpp opencv-4.11 //================================================================================================== void convertFp16(InputArray _src, OutputArray _dst) -diff -Nuarp opencv-4.11.0.orig/modules/core/src/copy.cpp opencv-4.11.0/modules/core/src/copy.cpp ---- opencv-4.11.0.orig/modules/core/src/copy.cpp 2025-01-19 00:07:25.336891223 +0800 -+++ opencv-4.11.0/modules/core/src/copy.cpp 2025-01-19 00:07:45.981143795 +0800 -@@ -327,22 +327,6 @@ void Mat::copyTo( OutputArray _dst ) con +diff -Nuarp opencv-4.12.0.orig/modules/core/src/copy.cpp opencv-4.12.0/modules/core/src/copy.cpp +--- opencv-4.12.0.orig/modules/core/src/copy.cpp 2025-07-13 20:34:53.546154585 +0800 ++++ opencv-4.12.0/modules/core/src/copy.cpp 2025-07-13 20:35:40.839436311 +0800 +@@ -449,22 +449,6 @@ void Mat::copyTo( OutputArray _dst ) con return; } @@ -1025,9 +1020,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/copy.cpp opencv-4.11.0/modules/c if( dims <= 2 ) { _dst.create( rows, cols, type() ); -diff -Nuarp opencv-4.11.0.orig/modules/core/src/dxt.cpp opencv-4.11.0/modules/core/src/dxt.cpp ---- opencv-4.11.0.orig/modules/core/src/dxt.cpp 2025-01-19 00:07:25.339891260 +0800 -+++ opencv-4.11.0/modules/core/src/dxt.cpp 2025-01-19 00:07:45.981143795 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/dxt.cpp opencv-4.12.0/modules/core/src/dxt.cpp +--- opencv-4.12.0.orig/modules/core/src/dxt.cpp 2025-07-13 20:34:53.549364337 +0800 ++++ opencv-4.12.0/modules/core/src/dxt.cpp 2025-07-13 20:35:40.839589510 +0800 @@ -40,8 +40,6 @@ //M*/ @@ -1037,9 +1032,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/dxt.cpp opencv-4.11.0/modules/co #include namespace cv -diff -Nuarp opencv-4.11.0.orig/modules/core/src/lapack.cpp opencv-4.11.0/modules/core/src/lapack.cpp ---- opencv-4.11.0.orig/modules/core/src/lapack.cpp 2025-01-19 00:07:25.321891040 +0800 -+++ opencv-4.11.0/modules/core/src/lapack.cpp 2025-01-19 00:07:45.981143795 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/lapack.cpp opencv-4.12.0/modules/core/src/lapack.cpp +--- opencv-4.12.0.orig/modules/core/src/lapack.cpp 2025-07-13 20:34:53.531061887 +0800 ++++ opencv-4.12.0/modules/core/src/lapack.cpp 2025-07-13 20:35:40.839724673 +0800 @@ -1017,13 +1017,6 @@ double invert( InputArray _src, OutputAr return result; } @@ -1054,9 +1049,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/lapack.cpp opencv-4.11.0/modules /****************************************************************************************\ * Solving a linear system * -diff -Nuarp opencv-4.11.0.orig/modules/core/src/matmul.dispatch.cpp opencv-4.11.0/modules/core/src/matmul.dispatch.cpp ---- opencv-4.11.0.orig/modules/core/src/matmul.dispatch.cpp 2025-01-19 00:07:25.305890844 +0800 -+++ opencv-4.11.0/modules/core/src/matmul.dispatch.cpp 2025-01-19 00:07:45.981143795 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/matmul.dispatch.cpp opencv-4.12.0/modules/core/src/matmul.dispatch.cpp +--- opencv-4.12.0.orig/modules/core/src/matmul.dispatch.cpp 2025-07-13 20:34:53.514799531 +0800 ++++ opencv-4.12.0/modules/core/src/matmul.dispatch.cpp 2025-07-13 20:35:40.839869569 +0800 @@ -44,10 +44,6 @@ #include "precomp.hpp" #include @@ -1089,9 +1084,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matmul.dispatch.cpp opencv-4.11. } // namespace cv:: -diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_operations.cpp opencv-4.11.0/modules/core/src/matrix_operations.cpp ---- opencv-4.11.0.orig/modules/core/src/matrix_operations.cpp 2025-01-19 00:07:25.331891162 +0800 -+++ opencv-4.11.0/modules/core/src/matrix_operations.cpp 2025-01-19 00:07:45.981143795 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/matrix_operations.cpp opencv-4.12.0/modules/core/src/matrix_operations.cpp +--- opencv-4.12.0.orig/modules/core/src/matrix_operations.cpp 2025-07-13 20:34:53.540491007 +0800 ++++ opencv-4.12.0/modules/core/src/matrix_operations.cpp 2025-07-13 20:35:40.839949280 +0800 @@ -226,22 +226,6 @@ void cv::setIdentity( InputOutputArray _ } @@ -1127,10 +1122,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_operations.cpp opencv-4.1 Mat src = _src.getMat(); _dst.create(dim == 0 ? 1 : src.rows, dim == 0 ? src.cols : 1, dtype); Mat dst = _dst.getMat(), temp = dst; -diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_transform.cpp opencv-4.11.0/modules/core/src/matrix_transform.cpp ---- opencv-4.11.0.orig/modules/core/src/matrix_transform.cpp 2025-01-19 00:07:25.330891150 +0800 -+++ opencv-4.11.0/modules/core/src/matrix_transform.cpp 2025-01-19 00:07:45.981143795 +0800 -@@ -1105,12 +1105,6 @@ void rotate(InputArray _src, OutputArray +diff -Nuarp opencv-4.12.0.orig/modules/core/src/matrix_transform.cpp opencv-4.12.0/modules/core/src/matrix_transform.cpp +--- opencv-4.12.0.orig/modules/core/src/matrix_transform.cpp 2025-07-13 20:34:53.539931560 +0800 ++++ opencv-4.12.0/modules/core/src/matrix_transform.cpp 2025-07-13 20:35:40.840023330 +0800 +@@ -991,12 +991,6 @@ void rotate(InputArray _src, OutputArray CV_Assert(_src.dims() <= 2); int angle; @@ -1143,9 +1138,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_transform.cpp opencv-4.11 Mat src = _src.getMat(); int type = src.type(); if( src.empty() ) -diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/modules/core/src/matrix_wrap.cpp ---- opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp 2025-01-19 00:07:25.287890624 +0800 -+++ opencv-4.11.0/modules/core/src/matrix_wrap.cpp 2025-01-19 00:07:45.982143807 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.12.0/modules/core/src/matrix_wrap.cpp +--- opencv-4.12.0.orig/modules/core/src/matrix_wrap.cpp 2025-07-13 20:34:53.496646123 +0800 ++++ opencv-4.12.0/modules/core/src/matrix_wrap.cpp 2025-07-13 20:35:40.840132085 +0800 @@ -24,14 +24,6 @@ Mat _InputArray::getMat_(int i) const return m->row(i); } @@ -2015,7 +2010,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo CV_Error(Error::StsNotImplemented, "Unknown/unsupported array type"); } -@@ -1674,42 +1027,6 @@ void _OutputArray::release() const +@@ -1680,42 +1033,6 @@ void _OutputArray::release() const return; } @@ -2058,7 +2053,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo if( k == NONE ) return; -@@ -1731,20 +1048,6 @@ void _OutputArray::release() const +@@ -1737,20 +1054,6 @@ void _OutputArray::release() const return; } @@ -2079,7 +2074,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo CV_Error(Error::StsNotImplemented, "Unknown/unsupported array type"); } -@@ -1792,50 +1095,6 @@ Mat& _OutputArray::getMatRef(int i) cons +@@ -1798,50 +1101,6 @@ Mat& _OutputArray::getMatRef(int i) cons } } @@ -2130,7 +2125,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo void _OutputArray::setTo(const _InputArray& arr, const _InputArray & mask) const { _InputArray::KindFlag k = kind(); -@@ -1847,53 +1106,15 @@ void _OutputArray::setTo(const _InputArr +@@ -1853,53 +1112,15 @@ void _OutputArray::setTo(const _InputArr Mat m = getMat(); m.setTo(arr, mask); } @@ -2185,7 +2180,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo { *(Mat*)obj = m; } -@@ -1908,36 +1129,6 @@ void _OutputArray::assign(const Mat& m) +@@ -1914,36 +1135,6 @@ void _OutputArray::assign(const Mat& m) } @@ -2222,7 +2217,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo void _OutputArray::move(Mat& m) const { if (fixedSize()) -@@ -1947,12 +1138,7 @@ void _OutputArray::move(Mat& m) const +@@ -1953,12 +1144,7 @@ void _OutputArray::move(Mat& m) const return; } int k = kind(); @@ -2236,7 +2231,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo { *(Mat*)obj = std::move(m); } -@@ -1968,62 +1154,10 @@ void _OutputArray::move(Mat& m) const +@@ -1974,62 +1160,10 @@ void _OutputArray::move(Mat& m) const } @@ -2300,9 +2295,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix_wrap.cpp opencv-4.11.0/mo { std::vector& this_v = *(std::vector*)obj; CV_Assert(this_v.size() == v.size()); -diff -Nuarp opencv-4.11.0.orig/modules/core/src/precomp.hpp opencv-4.11.0/modules/core/src/precomp.hpp ---- opencv-4.11.0.orig/modules/core/src/precomp.hpp 2025-01-19 00:07:25.337891236 +0800 -+++ opencv-4.11.0/modules/core/src/precomp.hpp 2025-01-19 00:07:45.982143807 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/precomp.hpp opencv-4.12.0/modules/core/src/precomp.hpp +--- opencv-4.12.0.orig/modules/core/src/precomp.hpp 2025-07-13 20:34:53.546680858 +0800 ++++ opencv-4.12.0/modules/core/src/precomp.hpp 2025-07-13 20:35:40.840285324 +0800 @@ -343,9 +343,6 @@ struct ImplCollector struct CoreTLSData { @@ -2325,9 +2320,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/precomp.hpp opencv-4.11.0/module int useIPP; // 1 - use, 0 - do not use, -1 - auto/not initialized int useIPP_NE; // 1 - use, 0 - do not use, -1 - auto/not initialized #ifdef HAVE_OPENVX -diff -Nuarp opencv-4.11.0.orig/modules/core/src/umatrix.cpp opencv-4.11.0/modules/core/src/umatrix.cpp ---- opencv-4.11.0.orig/modules/core/src/umatrix.cpp 2025-01-19 00:07:25.320891028 +0800 -+++ opencv-4.11.0/modules/core/src/umatrix.cpp 2025-01-19 00:07:45.982143807 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/umatrix.cpp opencv-4.12.0/modules/core/src/umatrix.cpp +--- opencv-4.12.0.orig/modules/core/src/umatrix.cpp 2025-07-13 20:34:53.529610255 +0800 ++++ opencv-4.12.0/modules/core/src/umatrix.cpp 2025-07-13 20:35:40.840350137 +0800 @@ -40,7 +40,6 @@ //M*/ @@ -2366,9 +2361,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/umatrix.cpp opencv-4.11.0/module } -diff -Nuarp opencv-4.11.0.orig/modules/features2d/include/opencv2/features2d.hpp opencv-4.11.0/modules/features2d/include/opencv2/features2d.hpp ---- opencv-4.11.0.orig/modules/features2d/include/opencv2/features2d.hpp 2025-01-19 00:07:25.397891969 +0800 -+++ opencv-4.11.0/modules/features2d/include/opencv2/features2d.hpp 2025-01-19 00:07:45.982143807 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/features2d/include/opencv2/features2d.hpp opencv-4.12.0/modules/features2d/include/opencv2/features2d.hpp +--- opencv-4.12.0.orig/modules/features2d/include/opencv2/features2d.hpp 2025-07-13 20:34:53.609038991 +0800 ++++ opencv-4.12.0/modules/features2d/include/opencv2/features2d.hpp 2025-07-13 20:35:40.840442952 +0800 @@ -1234,7 +1234,6 @@ protected: //! Collection of descriptors from train images. @@ -2377,9 +2372,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/features2d/include/opencv2/features2d.hpp }; /** @brief Brute-force descriptor matcher. -diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/agast.cpp opencv-4.11.0/modules/features2d/src/agast.cpp ---- opencv-4.11.0.orig/modules/features2d/src/agast.cpp 2025-01-19 00:07:25.421892263 +0800 -+++ opencv-4.11.0/modules/features2d/src/agast.cpp 2025-01-19 00:07:45.982143807 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/features2d/src/agast.cpp opencv-4.12.0/modules/features2d/src/agast.cpp +--- opencv-4.12.0.orig/modules/features2d/src/agast.cpp 2025-07-13 20:34:53.632271182 +0800 ++++ opencv-4.12.0/modules/features2d/src/agast.cpp 2025-07-13 20:35:40.840724686 +0800 @@ -7980,11 +7980,10 @@ public: } @@ -2393,10 +2388,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/agast.cpp opencv-4.11.0/mo cvtColor( _image, ogray, COLOR_BGR2GRAY ); gray = ogray; } -diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/fast.cpp opencv-4.11.0/modules/features2d/src/fast.cpp ---- opencv-4.11.0.orig/modules/features2d/src/fast.cpp 2025-01-19 00:07:25.419892239 +0800 -+++ opencv-4.11.0/modules/features2d/src/fast.cpp 2025-01-19 00:07:45.982143807 +0800 -@@ -569,11 +569,10 @@ public: +diff -Nuarp opencv-4.12.0.orig/modules/features2d/src/fast.cpp opencv-4.12.0/modules/features2d/src/fast.cpp +--- opencv-4.12.0.orig/modules/features2d/src/fast.cpp 2025-07-13 20:34:53.630663185 +0800 ++++ opencv-4.12.0/modules/features2d/src/fast.cpp 2025-07-13 20:35:40.840976300 +0800 +@@ -501,11 +501,10 @@ public: } Mat mask = _mask.getMat(), grayImage; @@ -2409,9 +2404,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/fast.cpp opencv-4.11.0/mod cvtColor( _image, ogray, COLOR_BGR2GRAY ); gray = ogray; } -diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/feature2d.cpp opencv-4.11.0/modules/features2d/src/feature2d.cpp ---- opencv-4.11.0.orig/modules/features2d/src/feature2d.cpp 2025-01-19 00:07:25.429892361 +0800 -+++ opencv-4.11.0/modules/features2d/src/feature2d.cpp 2025-01-19 00:07:45.983143819 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/features2d/src/feature2d.cpp opencv-4.12.0/modules/features2d/src/feature2d.cpp +--- opencv-4.12.0.orig/modules/features2d/src/feature2d.cpp 2025-07-13 20:34:53.640743955 +0800 ++++ opencv-4.12.0/modules/features2d/src/feature2d.cpp 2025-07-13 20:35:40.841029831 +0800 @@ -93,16 +93,6 @@ void Feature2D::detect( InputArrayOfArra detect(images.getMat(i), keypoints[i], masks.empty() ? noArray() : masks.getMat(i)); } @@ -2445,9 +2440,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/feature2d.cpp opencv-4.11. else { CV_Error(Error::StsBadArg, "descriptors must be vector or vector"); -diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/gftt.cpp opencv-4.11.0/modules/features2d/src/gftt.cpp ---- opencv-4.11.0.orig/modules/features2d/src/gftt.cpp 2025-01-19 00:07:25.435892434 +0800 -+++ opencv-4.11.0/modules/features2d/src/gftt.cpp 2025-01-19 00:07:45.983143819 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/features2d/src/gftt.cpp opencv-4.12.0/modules/features2d/src/gftt.cpp +--- opencv-4.12.0.orig/modules/features2d/src/gftt.cpp 2025-07-13 20:34:53.646639932 +0800 ++++ opencv-4.12.0/modules/features2d/src/gftt.cpp 2025-07-13 20:35:40.841069245 +0800 @@ -122,18 +122,6 @@ public: std::vector corners; std::vector cornersQuality; @@ -2467,9 +2462,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/gftt.cpp opencv-4.11.0/mod { Mat image = _image.getMat(), grayImage = image; if( image.type() != CV_8U ) -diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/kaze/AKAZEFeatures.cpp opencv-4.11.0/modules/features2d/src/kaze/AKAZEFeatures.cpp ---- opencv-4.11.0.orig/modules/features2d/src/kaze/AKAZEFeatures.cpp 2025-01-19 00:07:25.423892288 +0800 -+++ opencv-4.11.0/modules/features2d/src/kaze/AKAZEFeatures.cpp 2025-01-19 00:07:45.983143819 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/features2d/src/kaze/AKAZEFeatures.cpp opencv-4.12.0/modules/features2d/src/kaze/AKAZEFeatures.cpp +--- opencv-4.12.0.orig/modules/features2d/src/kaze/AKAZEFeatures.cpp 2025-07-13 20:34:53.634577458 +0800 ++++ opencv-4.12.0/modules/features2d/src/kaze/AKAZEFeatures.cpp 2025-07-13 20:35:40.841146371 +0800 @@ -519,15 +519,7 @@ convertScalePyramid(const std::vector( mergedDescriptors.getDescriptors(), *indexParams ); } -diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/orb.cpp opencv-4.11.0/modules/features2d/src/orb.cpp ---- opencv-4.11.0.orig/modules/features2d/src/orb.cpp 2025-01-19 00:07:25.418892226 +0800 -+++ opencv-4.11.0/modules/features2d/src/orb.cpp 2025-01-19 00:07:45.983143819 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/features2d/src/orb.cpp opencv-4.12.0/modules/features2d/src/orb.cpp +--- opencv-4.12.0.orig/modules/features2d/src/orb.cpp 2025-07-13 20:34:53.629551465 +0800 ++++ opencv-4.12.0/modules/features2d/src/orb.cpp 2025-07-13 20:35:40.841389099 +0800 @@ -823,10 +823,8 @@ static void uploadORBKeypoints(const std * @param keypoints the resulting keypoints, clustered per level */ @@ -2792,9 +2787,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/features2d/src/orb.cpp opencv-4.11.0/modu nfeatures, scaleFactor, edgeThreshold, patchSize, scoreType, useOCL, fastThreshold); } else -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours.cpp opencv-4.11.0/modules/imgproc/src/contours.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/contours.cpp 2025-01-19 00:07:25.750896288 +0800 -+++ opencv-4.11.0/modules/imgproc/src/contours.cpp 2025-01-19 00:07:45.983143819 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/contours.cpp opencv-4.12.0/modules/imgproc/src/contours.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/contours.cpp 2025-07-13 20:34:53.964955888 +0800 ++++ opencv-4.12.0/modules/imgproc/src/contours.cpp 2025-07-13 20:35:40.841485411 +0800 @@ -1820,8 +1820,7 @@ void cv::findContours_legacy( InputArray CV_INSTRUMENT_REGION(); @@ -2805,10 +2800,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours.cpp opencv-4.11.0/mo CV_Assert(_contours.empty() || (_contours.channels() == 2 && _contours.depth() == CV_32S)); -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours_link.cpp opencv-4.11.0/modules/imgproc/src/contours_link.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/contours_link.cpp 2025-01-19 00:07:25.774896582 +0800 -+++ opencv-4.11.0/modules/imgproc/src/contours_link.cpp 2025-01-19 00:07:45.983143819 +0800 -@@ -390,8 +390,7 @@ void cv::findContoursLinkRuns(InputArray +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/contours_link.cpp opencv-4.12.0/modules/imgproc/src/contours_link.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/contours_link.cpp 2025-07-13 20:34:53.988078623 +0800 ++++ opencv-4.12.0/modules/imgproc/src/contours_link.cpp 2025-07-13 20:35:40.841557517 +0800 +@@ -393,8 +393,7 @@ void cv::findContoursLinkRuns(InputArray // Sanity check: output must be of type vector> CV_Assert(_contours.kind() == _InputArray::STD_VECTOR_VECTOR || @@ -2818,10 +2813,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours_link.cpp opencv-4.11 if (!_contours.empty()) CV_CheckTypeEQ(_contours.type(), CV_32SC2, "Contours must have type CV_32SC2"); -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours_new.cpp opencv-4.11.0/modules/imgproc/src/contours_new.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/contours_new.cpp 2025-01-19 00:07:25.758896386 +0800 -+++ opencv-4.11.0/modules/imgproc/src/contours_new.cpp 2025-01-19 00:07:45.983143819 +0800 -@@ -653,8 +653,7 @@ void cv::findContours(InputArray _image, +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/contours_new.cpp opencv-4.12.0/modules/imgproc/src/contours_new.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/contours_new.cpp 2025-07-13 20:34:53.972701188 +0800 ++++ opencv-4.12.0/modules/imgproc/src/contours_new.cpp 2025-07-13 20:35:40.841623833 +0800 +@@ -658,8 +658,7 @@ void cv::findContours(InputArray _image, // Sanity check: output must be of type vector> CV_Assert((_contours.kind() == _InputArray::STD_VECTOR_VECTOR) || @@ -2831,10 +2826,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours_new.cpp opencv-4.11. const int res_type = (method == 0 /*CV_CHAIN_CODE*/) ? CV_8SC1 : CV_32SC2; if (!_contours.empty()) -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/hough.cpp opencv-4.11.0/modules/imgproc/src/hough.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/hough.cpp 2025-01-19 00:07:25.765896472 +0800 -+++ opencv-4.11.0/modules/imgproc/src/hough.cpp 2025-01-19 00:07:45.983143819 +0800 -@@ -2279,7 +2279,7 @@ static void HoughCircles( InputArray _im +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/hough.cpp opencv-4.12.0/modules/imgproc/src/hough.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/hough.cpp 2025-07-13 20:34:53.980257811 +0800 ++++ opencv-4.12.0/modules/imgproc/src/hough.cpp 2025-07-13 20:35:40.841724699 +0800 +@@ -2280,7 +2280,7 @@ static void HoughCircles( InputArray _im CV_CheckType(type, type == CV_32FC3 || type == CV_32FC4, "Wrong type of output circles"); } @@ -2843,10 +2838,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/hough.cpp opencv-4.11.0/modul if( dp <= 0 || minDist <= 0 || param1 <= 0) CV_Error( Error::StsOutOfRange, "dp, min_dist and canny_threshold must be all positive numbers" ); -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/pyramids.cpp opencv-4.11.0/modules/imgproc/src/pyramids.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/pyramids.cpp 2025-01-19 00:07:25.772896558 +0800 -+++ opencv-4.11.0/modules/imgproc/src/pyramids.cpp 2025-01-19 00:07:45.984143831 +0800 -@@ -1617,16 +1617,6 @@ void cv::buildPyramid( InputArray _src, +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/pyramids.cpp opencv-4.12.0/modules/imgproc/src/pyramids.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/pyramids.cpp 2025-07-13 20:34:53.986355628 +0800 ++++ opencv-4.12.0/modules/imgproc/src/pyramids.cpp 2025-07-13 20:35:40.841845121 +0800 +@@ -1535,16 +1535,6 @@ void cv::buildPyramid( InputArray _src, CV_Assert(borderType != BORDER_CONSTANT); @@ -2863,9 +2858,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/pyramids.cpp opencv-4.11.0/mo Mat src = _src.getMat(); _dst.create( maxlevel + 1, 1, 0 ); _dst.getMatRef(0) = src; -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/resize.cpp opencv-4.11.0/modules/imgproc/src/resize.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/resize.cpp 2025-01-19 00:07:25.789896766 +0800 -+++ opencv-4.11.0/modules/imgproc/src/resize.cpp 2025-01-19 00:07:45.984143831 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/resize.cpp opencv-4.12.0/modules/imgproc/src/resize.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/resize.cpp 2025-07-13 20:34:54.002011098 +0800 ++++ opencv-4.12.0/modules/imgproc/src/resize.cpp 2025-07-13 20:35:40.841994803 +0800 @@ -4224,11 +4224,6 @@ void cv::resize( InputArray _src, Output CV_OCL_RUN(_src.dims() <= 2 && _dst.isUMat() && _src.cols() > 10 && _src.rows() > 10, ocl_resize(_src, _dst, dsize, inv_scale_x, inv_scale_y, interpolation)) @@ -2878,9 +2873,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/resize.cpp opencv-4.11.0/modu Mat src = _src.getMat(); _dst.create(dsize, src.type()); Mat dst = _dst.getMat(); -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/smooth.dispatch.cpp opencv-4.11.0/modules/imgproc/src/smooth.dispatch.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/smooth.dispatch.cpp 2025-01-19 00:07:25.787896741 +0800 -+++ opencv-4.11.0/modules/imgproc/src/smooth.dispatch.cpp 2025-01-19 00:07:45.984143831 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/smooth.dispatch.cpp opencv-4.12.0/modules/imgproc/src/smooth.dispatch.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/smooth.dispatch.cpp 2025-07-13 20:34:54.001098545 +0800 ++++ opencv-4.12.0/modules/imgproc/src/smooth.dispatch.cpp 2025-07-13 20:35:40.842137403 +0800 @@ -637,9 +637,7 @@ void GaussianBlur(InputArray _src, Outpu if (sigma2 <= 0) sigma2 = sigma1; @@ -2892,9 +2887,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/smooth.dispatch.cpp opencv-4. CV_UNUSED(useOpenCL); int sdepth = CV_MAT_DEPTH(type), cn = CV_MAT_CN(type); -diff -Nuarp opencv-4.11.0.orig/modules/video/src/camshift.cpp opencv-4.11.0/modules/video/src/camshift.cpp ---- opencv-4.11.0.orig/modules/video/src/camshift.cpp 2025-01-19 00:07:26.134900987 +0800 -+++ opencv-4.11.0/modules/video/src/camshift.cpp 2025-01-19 00:07:45.984143831 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/video/src/camshift.cpp opencv-4.12.0/modules/video/src/camshift.cpp +--- opencv-4.12.0.orig/modules/video/src/camshift.cpp 2025-07-13 20:34:54.341869985 +0800 ++++ opencv-4.12.0/modules/video/src/camshift.cpp 2025-07-13 20:35:40.842201524 +0800 @@ -48,13 +48,8 @@ int cv::meanShift( InputArray _probImage Size size; int cn; diff --git a/patches/opencv-4.11.0-no-rtti.patch b/patches/opencv-4.12.0-no-rtti.patch similarity index 68% rename from patches/opencv-4.11.0-no-rtti.patch rename to patches/opencv-4.12.0-no-rtti.patch index 3c42552..d94b9e9 100644 --- a/patches/opencv-4.11.0-no-rtti.patch +++ b/patches/opencv-4.12.0-no-rtti.patch @@ -1,6 +1,6 @@ -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/bindings_utils.hpp opencv-4.11.0/modules/core/include/opencv2/core/bindings_utils.hpp ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/bindings_utils.hpp 2025-03-23 14:08:46.538169441 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/bindings_utils.hpp 2025-03-23 14:09:34.498912320 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/bindings_utils.hpp opencv-4.12.0/modules/core/include/opencv2/core/bindings_utils.hpp +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/bindings_utils.hpp 2025-07-13 20:34:53.372129425 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/bindings_utils.hpp 2025-07-13 21:38:10.818186252 +0800 @@ -202,12 +202,6 @@ void generateVectorOfMat(size_t len, int } @@ -29,9 +29,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/bindings_utils. return p.getArrayResult(); } -diff -Nuarp opencv-4.11.0.orig/modules/core/src/async.cpp opencv-4.11.0/modules/core/src/async.cpp ---- opencv-4.11.0.orig/modules/core/src/async.cpp 2025-03-23 14:09:27.002559685 +0800 -+++ opencv-4.11.0/modules/core/src/async.cpp 2025-03-23 14:09:57.134437023 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/async.cpp opencv-4.12.0/modules/core/src/async.cpp +--- opencv-4.12.0.orig/modules/core/src/async.cpp 2025-07-13 20:39:13.959090096 +0800 ++++ opencv-4.12.0/modules/core/src/async.cpp 2025-07-13 21:38:10.818321197 +0800 @@ -100,7 +100,6 @@ struct AsyncArray::Impl if (has_exception) { @@ -48,10 +48,10 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/async.cpp opencv-4.11.0/modules/ } CV_Error(Error::StsInternal, "AsyncArray: invalid state of 'has_result = true'"); return false; -diff -Nuarp opencv-4.11.0.orig/modules/core/src/bindings_utils.cpp opencv-4.11.0/modules/core/src/bindings_utils.cpp ---- opencv-4.11.0.orig/modules/core/src/bindings_utils.cpp 2025-03-23 14:08:46.699988132 +0800 -+++ opencv-4.11.0/modules/core/src/bindings_utils.cpp 2025-03-23 14:09:34.499350445 +0800 -@@ -17,7 +17,7 @@ String dumpInputArray(InputArray argumen +diff -Nuarp opencv-4.12.0.orig/modules/core/src/bindings_utils.cpp opencv-4.12.0/modules/core/src/bindings_utils.cpp +--- opencv-4.12.0.orig/modules/core/src/bindings_utils.cpp 2025-07-13 20:34:53.534086711 +0800 ++++ opencv-4.12.0/modules/core/src/bindings_utils.cpp 2025-07-13 21:38:10.818378715 +0800 +@@ -22,7 +22,7 @@ String dumpInputArray(InputArray argumen return "InputArray: noArray()"; std::ostringstream ss; ss << "InputArray:"; @@ -60,18 +60,22 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/bindings_utils.cpp opencv-4.11.0 do { ss << (argument.empty() ? " empty()=true" : " empty()=false"); ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); -@@ -51,10 +51,6 @@ String dumpInputArray(InputArray argumen +@@ -56,14 +56,6 @@ String dumpInputArray(InputArray argumen ss << " type(-1)=" << cv::typeToString(argument.type(-1)); } while (0); } +- catch (const std::exception& e) +- { +- ss << " ERROR: exception occurred: " << e.what(); +- } - catch (...) - { -- ss << " ERROR: exception occurred, dump is non-complete"; // need to properly support different kinds +- ss << " ERROR: unknown exception occurred, dump is non-complete"; - } return ss.str(); } -@@ -64,7 +60,7 @@ CV_EXPORTS_W String dumpInputArrayOfArra +@@ -73,7 +65,7 @@ CV_EXPORTS_W String dumpInputArrayOfArra return "InputArrayOfArrays: noArray()"; std::ostringstream ss; ss << "InputArrayOfArrays:"; @@ -80,18 +84,22 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/bindings_utils.cpp opencv-4.11.0 do { ss << (argument.empty() ? " empty()=true" : " empty()=false"); ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); -@@ -104,10 +100,6 @@ CV_EXPORTS_W String dumpInputArrayOfArra +@@ -113,14 +105,6 @@ CV_EXPORTS_W String dumpInputArrayOfArra } } while (0); } +- catch (const std::exception& e) +- { +- ss << " ERROR: exception occurred: " << e.what(); +- } - catch (...) - { -- ss << " ERROR: exception occurred, dump is non-complete"; // need to properly support different kinds +- ss << " ERROR: unknown exception occurred, dump is non-complete"; - } return ss.str(); } -@@ -117,7 +109,7 @@ CV_EXPORTS_W String dumpInputOutputArray +@@ -130,7 +114,7 @@ CV_EXPORTS_W String dumpInputOutputArray return "InputOutputArray: noArray()"; std::ostringstream ss; ss << "InputOutputArray:"; @@ -100,18 +108,22 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/bindings_utils.cpp opencv-4.11.0 do { ss << (argument.empty() ? " empty()=true" : " empty()=false"); ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); -@@ -151,10 +143,6 @@ CV_EXPORTS_W String dumpInputOutputArray +@@ -164,14 +148,6 @@ CV_EXPORTS_W String dumpInputOutputArray ss << " type(-1)=" << cv::typeToString(argument.type(-1)); } while (0); } +- catch (const std::exception& e) +- { +- ss << " ERROR: exception occurred: " << e.what(); +- } - catch (...) - { -- ss << " ERROR: exception occurred, dump is non-complete"; // need to properly support different kinds +- ss << " ERROR: unknown exception occurred, dump is non-complete"; - } return ss.str(); } -@@ -164,7 +152,7 @@ CV_EXPORTS_W String dumpInputOutputArray +@@ -181,7 +157,7 @@ CV_EXPORTS_W String dumpInputOutputArray return "InputOutputArrayOfArrays: noArray()"; std::ostringstream ss; ss << "InputOutputArrayOfArrays:"; @@ -120,20 +132,24 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/bindings_utils.cpp opencv-4.11.0 do { ss << (argument.empty() ? " empty()=true" : " empty()=false"); ss << cv::format(" kind=0x%08llx", (long long int)argument.kind()); -@@ -204,10 +192,6 @@ CV_EXPORTS_W String dumpInputOutputArray +@@ -221,14 +197,6 @@ CV_EXPORTS_W String dumpInputOutputArray } } while (0); } +- catch (const std::exception& e) +- { +- ss << " ERROR: exception occurred: " << e.what(); +- } - catch (...) - { -- ss << " ERROR: exception occurred, dump is non-complete"; // need to properly support different kinds +- ss << " ERROR: unknown exception occurred, dump is non-complete"; - } return ss.str(); } -diff -Nuarp opencv-4.11.0.orig/modules/core/src/command_line_parser.cpp opencv-4.11.0/modules/core/src/command_line_parser.cpp ---- opencv-4.11.0.orig/modules/core/src/command_line_parser.cpp 2025-03-23 14:08:46.703748512 +0800 -+++ opencv-4.11.0/modules/core/src/command_line_parser.cpp 2025-03-23 14:09:34.499431498 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/command_line_parser.cpp opencv-4.12.0/modules/core/src/command_line_parser.cpp +--- opencv-4.12.0.orig/modules/core/src/command_line_parser.cpp 2025-07-13 20:34:53.537230759 +0800 ++++ opencv-4.12.0/modules/core/src/command_line_parser.cpp 2025-07-13 21:38:10.818428600 +0800 @@ -119,7 +119,6 @@ static void from_str(const String& str, void CommandLineParser::getByName(const String& name, bool space_delete, Param type, void* dst) const @@ -230,9 +246,61 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/command_line_parser.cpp opencv-4 } return vec; -diff -Nuarp opencv-4.11.0.orig/modules/core/src/glob.cpp opencv-4.11.0/modules/core/src/glob.cpp ---- opencv-4.11.0.orig/modules/core/src/glob.cpp 2025-03-23 14:08:46.701975058 +0800 -+++ opencv-4.11.0/modules/core/src/glob.cpp 2025-03-23 14:09:34.499503524 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/dxt.cpp opencv-4.12.0/modules/core/src/dxt.cpp +--- opencv-4.12.0.orig/modules/core/src/dxt.cpp 2025-07-13 20:39:13.959381686 +0800 ++++ opencv-4.12.0/modules/core/src/dxt.cpp 2025-07-13 21:37:40.157743062 +0800 +@@ -826,6 +826,30 @@ struct OcvDftOptions { + } + }; + ++template ++struct HALDFTCaller; ++ ++template<> ++struct HALDFTCaller { ++ static void call(const OcvDftOptions& c, const Complex* src, Complex* dst) { ++ CALL_HAL(dft, cv_hal_dft, reinterpret_cast(src), reinterpret_cast(dst), CV_32F, ++ c.nf, c.factors, c.scale, c.itab, c.wave, c.tab_size, c.n, c.isInverse, c.noPermute); ++ } ++}; ++ ++template<> ++struct HALDFTCaller { ++ static void call(const OcvDftOptions& c, const Complex* src, Complex* dst) { ++ CALL_HAL(dft, cv_hal_dft, reinterpret_cast(src), reinterpret_cast(dst), CV_64F, ++ c.nf, c.factors, c.scale, c.itab, c.wave, c.tab_size, c.n, c.isInverse, c.noPermute); ++ } ++}; ++ ++template ++static void HALDFT(const OcvDftOptions& c, const Complex* src, Complex* dst) { ++ HALDFTCaller::call(c, src, dst); ++} ++ + // mixed-radix complex discrete Fourier transform: double-precision version + template static void + DFT(const OcvDftOptions & c, const Complex* src, Complex* dst) +@@ -841,16 +865,7 @@ DFT(const OcvDftOptions & c, const Compl + Complex t; + T scale = (T)c.scale; + +- if(typeid(T) == typeid(float)) +- { +- CALL_HAL(dft, cv_hal_dft, reinterpret_cast(src), reinterpret_cast(dst), CV_32F, +- c.nf, c.factors, c.scale, c.itab, c.wave, c.tab_size, c.n, c.isInverse, c.noPermute); +- } +- if(typeid(T) == typeid(double)) +- { +- CALL_HAL(dft, cv_hal_dft, reinterpret_cast(src), reinterpret_cast(dst), CV_64F, +- c.nf, c.factors, c.scale, c.itab, c.wave, c.tab_size, c.n, c.isInverse, c.noPermute); +- } ++ HALDFT(c, src, dst); + + if( c.useIpp ) + { +diff -Nuarp opencv-4.12.0.orig/modules/core/src/glob.cpp opencv-4.12.0/modules/core/src/glob.cpp +--- opencv-4.12.0.orig/modules/core/src/glob.cpp 2025-07-13 20:34:53.536156931 +0800 ++++ opencv-4.12.0/modules/core/src/glob.cpp 2025-07-13 21:38:10.818490446 +0800 @@ -243,7 +243,6 @@ static void glob_rec(const cv::String& d if ((dir = opendir (directory.c_str())) != 0) { @@ -253,9 +321,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/glob.cpp opencv-4.11.0/modules/c closedir(dir); } else -diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix.cpp opencv-4.11.0/modules/core/src/matrix.cpp ---- opencv-4.11.0.orig/modules/core/src/matrix.cpp 2025-03-23 14:08:46.711660990 +0800 -+++ opencv-4.11.0/modules/core/src/matrix.cpp 2025-03-23 14:09:34.499586741 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/matrix.cpp opencv-4.12.0/modules/core/src/matrix.cpp +--- opencv-4.12.0.orig/modules/core/src/matrix.cpp 2025-07-13 20:34:53.545189782 +0800 ++++ opencv-4.12.0/modules/core/src/matrix.cpp 2025-07-13 21:38:10.818552694 +0800 @@ -694,20 +694,11 @@ void Mat::create(int d, const int* _size MatAllocator *a = allocator, *a0 = getDefaultAllocator(); if(!a) @@ -297,9 +365,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/matrix.cpp opencv-4.11.0/modules updateContinuityFlag(); -diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel/parallel.cpp opencv-4.11.0/modules/core/src/parallel/parallel.cpp ---- opencv-4.11.0.orig/modules/core/src/parallel/parallel.cpp 2025-03-23 14:08:46.672302402 +0800 -+++ opencv-4.11.0/modules/core/src/parallel/parallel.cpp 2025-03-23 14:09:34.499675177 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/parallel/parallel.cpp opencv-4.12.0/modules/core/src/parallel/parallel.cpp +--- opencv-4.12.0.orig/modules/core/src/parallel/parallel.cpp 2025-07-13 20:34:53.506481139 +0800 ++++ opencv-4.12.0/modules/core/src/parallel/parallel.cpp 2025-07-13 21:38:10.818617917 +0800 @@ -60,7 +60,6 @@ std::shared_ptr createPa } isKnown = true; @@ -323,9 +391,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel/parallel.cpp opencv-4.1 } if (name.empty()) { -diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp opencv-4.11.0/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp ---- opencv-4.11.0.orig/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp 2025-03-23 14:08:46.671847895 +0800 -+++ opencv-4.11.0/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp 2025-03-23 14:09:34.499726244 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp opencv-4.12.0/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp +--- opencv-4.12.0.orig/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp 2025-07-13 20:34:53.506007655 +0800 ++++ opencv-4.12.0/modules/core/src/parallel/plugin_parallel_wrapper.impl.hpp 2025-07-13 21:38:10.818654306 +0800 @@ -155,15 +155,10 @@ protected: void initBackend() { @@ -361,9 +429,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel/plugin_parallel_wrapper } } -diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel.cpp opencv-4.11.0/modules/core/src/parallel.cpp ---- opencv-4.11.0.orig/modules/core/src/parallel.cpp 2025-03-23 14:08:46.700448089 +0800 -+++ opencv-4.11.0/modules/core/src/parallel.cpp 2025-03-23 14:09:34.499800724 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/parallel.cpp opencv-4.12.0/modules/core/src/parallel.cpp +--- opencv-4.12.0.orig/modules/core/src/parallel.cpp 2025-07-13 20:34:53.534609328 +0800 ++++ opencv-4.12.0/modules/core/src/parallel.cpp 2025-07-13 21:38:10.818707437 +0800 @@ -355,29 +355,9 @@ namespace { CV_TRACE_ARG_VALUE(range_end, "range.end", (int64)r.end); #endif @@ -411,9 +479,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/parallel.cpp opencv-4.11.0/modul } else // nested parallel_for_() calls are not parallelized { -diff -Nuarp opencv-4.11.0.orig/modules/core/src/persistence.cpp opencv-4.11.0/modules/core/src/persistence.cpp ---- opencv-4.11.0.orig/modules/core/src/persistence.cpp 2025-03-23 14:08:46.705088428 +0800 -+++ opencv-4.11.0/modules/core/src/persistence.cpp 2025-03-23 14:09:34.499938885 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/persistence.cpp opencv-4.12.0/modules/core/src/persistence.cpp +--- opencv-4.12.0.orig/modules/core/src/persistence.cpp 2025-07-13 20:34:53.538606458 +0800 ++++ opencv-4.12.0/modules/core/src/persistence.cpp 2025-07-13 21:38:10.818819829 +0800 @@ -758,7 +758,7 @@ bool FileStorage::Impl::open(const char strbufpos = bufOffset; bufofs = 0; @@ -456,9 +524,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/persistence.cpp opencv-4.11.0/mo } bool FileStorage::isOpened() const { return p->is_opened; } -diff -Nuarp opencv-4.11.0.orig/modules/core/src/system.cpp opencv-4.11.0/modules/core/src/system.cpp ---- opencv-4.11.0.orig/modules/core/src/system.cpp 2025-03-23 14:08:46.669043317 +0800 -+++ opencv-4.11.0/modules/core/src/system.cpp 2025-03-23 14:09:34.500145073 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/system.cpp opencv-4.12.0/modules/core/src/system.cpp +--- opencv-4.12.0.orig/modules/core/src/system.cpp 2025-07-13 20:34:53.503020142 +0800 ++++ opencv-4.12.0/modules/core/src/system.cpp 2025-07-13 21:38:10.818983909 +0800 @@ -1272,7 +1272,6 @@ void error( const Exception& exc ) *p = 0; } @@ -518,9 +586,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/system.cpp opencv-4.11.0/modules return defaultValue; } -diff -Nuarp opencv-4.11.0.orig/modules/core/src/umatrix.cpp opencv-4.11.0/modules/core/src/umatrix.cpp ---- opencv-4.11.0.orig/modules/core/src/umatrix.cpp 2025-03-23 14:09:27.003883461 +0800 -+++ opencv-4.11.0/modules/core/src/umatrix.cpp 2025-03-23 14:09:34.500300727 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/umatrix.cpp opencv-4.12.0/modules/core/src/umatrix.cpp +--- opencv-4.12.0.orig/modules/core/src/umatrix.cpp 2025-07-13 20:39:13.960069736 +0800 ++++ opencv-4.12.0/modules/core/src/umatrix.cpp 2025-07-13 21:38:10.819101641 +0800 @@ -594,14 +594,9 @@ UMat Mat::getUMat(AccessFlag accessFlags new_u->originalUMatData = u; } @@ -599,9 +667,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/umatrix.cpp opencv-4.11.0/module CV_XADD(&u->refcount, -1); CV_Assert(u->data != 0 && "Error mapping of UMat to host memory."); return Mat(); -diff -Nuarp opencv-4.11.0.orig/modules/core/src/utils/filesystem.cpp opencv-4.11.0/modules/core/src/utils/filesystem.cpp ---- opencv-4.11.0.orig/modules/core/src/utils/filesystem.cpp 2025-03-23 14:08:46.694309756 +0800 -+++ opencv-4.11.0/modules/core/src/utils/filesystem.cpp 2025-03-23 14:09:34.500401958 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/src/utils/filesystem.cpp opencv-4.12.0/modules/core/src/utils/filesystem.cpp +--- opencv-4.12.0.orig/modules/core/src/utils/filesystem.cpp 2025-07-13 20:34:53.528264934 +0800 ++++ opencv-4.12.0/modules/core/src/utils/filesystem.cpp 2025-07-13 21:38:10.819174299 +0800 @@ -508,14 +508,9 @@ cv::String getCacheDirectory(const char* && !utils::fs::isDirectory(default_cache_path)) { @@ -617,9 +685,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/src/utils/filesystem.cpp opencv-4.11 if (!existedCacheDirs.empty()) { CV_LOG_WARNING(NULL, "Creating new OpenCV cache directory: " << default_cache_path); -diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours.cpp opencv-4.11.0/modules/imgproc/src/contours.cpp ---- opencv-4.11.0.orig/modules/imgproc/src/contours.cpp 2025-03-23 14:09:27.005327533 +0800 -+++ opencv-4.11.0/modules/imgproc/src/contours.cpp 2025-03-23 14:09:34.500500914 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/imgproc/src/contours.cpp opencv-4.12.0/modules/imgproc/src/contours.cpp +--- opencv-4.12.0.orig/modules/imgproc/src/contours.cpp 2025-07-13 20:39:13.961175625 +0800 ++++ opencv-4.12.0/modules/imgproc/src/contours.cpp 2025-07-13 21:38:10.819246104 +0800 @@ -1760,7 +1760,6 @@ cvFindContours_Impl( void* img, CvMemS } else @@ -641,9 +709,9 @@ diff -Nuarp opencv-4.11.0.orig/modules/imgproc/src/contours.cpp opencv-4.11.0/mo *firstContour = cvEndFindContours( &scanner ); } -diff -Nuarp opencv-4.11.0.orig/modules/video/src/tracking/detail/tracking_feature.cpp opencv-4.11.0/modules/video/src/tracking/detail/tracking_feature.cpp ---- opencv-4.11.0.orig/modules/video/src/tracking/detail/tracking_feature.cpp 2025-03-23 14:08:47.499649574 +0800 -+++ opencv-4.11.0/modules/video/src/tracking/detail/tracking_feature.cpp 2025-03-23 14:09:34.500614849 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/video/src/tracking/detail/tracking_feature.cpp opencv-4.12.0/modules/video/src/tracking/detail/tracking_feature.cpp +--- opencv-4.12.0.orig/modules/video/src/tracking/detail/tracking_feature.cpp 2025-07-13 20:34:54.331668306 +0800 ++++ opencv-4.12.0/modules/video/src/tracking/detail/tracking_feature.cpp 2025-07-13 21:38:10.819330454 +0800 @@ -107,15 +107,9 @@ void CvHaarEvaluator::generateFeatures(i CvHaarEvaluator::FeatureHaar::FeatureHaar(Size patchSize) diff --git a/patches/opencv-4.12.0-no-zlib.patch b/patches/opencv-4.12.0-no-zlib.patch new file mode 100644 index 0000000..7f31e66 --- /dev/null +++ b/patches/opencv-4.12.0-no-zlib.patch @@ -0,0 +1,12 @@ +diff -Nuarp opencv-4.12.0.orig/modules/core/src/persistence.hpp opencv-4.12.0/modules/core/src/persistence.hpp +--- opencv-4.12.0.orig/modules/core/src/persistence.hpp 2025-07-13 20:34:53.501081691 +0800 ++++ opencv-4.12.0/modules/core/src/persistence.hpp 2025-07-13 20:42:31.885337310 +0800 +@@ -11,7 +11,7 @@ + #include + #include + +-#define USE_ZLIB 1 ++#define USE_ZLIB 0 + #if USE_ZLIB + # ifndef _LFS64_LARGEFILE + # define _LFS64_LARGEFILE 0 diff --git a/patches/opencv-4.11.0-unsafe-xadd.patch b/patches/opencv-4.12.0-unsafe-xadd.patch similarity index 77% rename from patches/opencv-4.11.0-unsafe-xadd.patch rename to patches/opencv-4.12.0-unsafe-xadd.patch index 6f53fce..be89153 100644 --- a/patches/opencv-4.11.0-unsafe-xadd.patch +++ b/patches/opencv-4.12.0-unsafe-xadd.patch @@ -1,6 +1,6 @@ -diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/cvdef.h opencv-4.11.0/modules/core/include/opencv2/core/cvdef.h ---- opencv-4.11.0.orig/modules/core/include/opencv2/core/cvdef.h 2025-01-18 23:41:09.776469917 +0800 -+++ opencv-4.11.0/modules/core/include/opencv2/core/cvdef.h 2025-01-18 23:56:07.110333645 +0800 +diff -Nuarp opencv-4.12.0.orig/modules/core/include/opencv2/core/cvdef.h opencv-4.12.0/modules/core/include/opencv2/core/cvdef.h +--- opencv-4.12.0.orig/modules/core/include/opencv2/core/cvdef.h 2025-07-13 20:39:13.958121426 +0800 ++++ opencv-4.12.0/modules/core/include/opencv2/core/cvdef.h 2025-07-13 20:51:01.801632352 +0800 @@ -694,33 +694,7 @@ __CV_ENUM_FLAGS_BITWISE_XOR_EQ (EnumTy * exchange-add operation for atomic operations on reference counters * \****************************************************************************************/ @@ -8,7 +8,7 @@ diff -Nuarp opencv-4.11.0.orig/modules/core/include/opencv2/core/cvdef.h opencv- -#ifdef CV_XADD - // allow to use user-defined macro -#elif defined __GNUC__ || defined __clang__ --# if defined __clang__ && __clang_major__ >= 3 && !defined __ANDROID__ && !defined __EMSCRIPTEN__ && !defined(__CUDACC__) && !defined __INTEL_COMPILER +-# if defined __clang__ && __clang_major__ >= 3 && !defined __EMSCRIPTEN__ && !defined __INTEL_COMPILER -# ifdef __ATOMIC_ACQ_REL -# define CV_XADD(addr, delta) __c11_atomic_fetch_add((_Atomic(int)*)(addr), delta, __ATOMIC_ACQ_REL) -# else