Skip to content

Commit 6f543d4

Browse files
Jenkins CIoryonatan
authored andcommitted
Update OpenCV to 4.13.0 with Lightricks customizations
Add opencv_contrib pinned to the 4.13.0 tag and keep the Lightricks CV_16F mixChannels fix, mapping half-float channel copies to the 16-bit copy implementation without adding a ninth CV_DEPTH_MAX table entry. Build the iOS xcframework for the targets we actually ship: iOS 17+ arm64 device and arm64 simulator. The workflow uses macos-latest-xlarge, splits device and simulator builds into parallel matrix jobs, and keeps --build_only_specified_archs so OpenCV does not fall back to deprecated default architectures. Disable stitching from the iOS build invocation instead of changing the root OpenCV module defaults. Leave the upstream IPP default untouched because IPP does not apply to arm64 iOS builds.
1 parent fe38fc6 commit 6f543d4

6 files changed

Lines changed: 70 additions & 2 deletions

File tree

.github/workflows/LT_CI.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: Build OpenCV iOS xcframework
2+
on: [push, pull_request]
3+
4+
jobs:
5+
build-ios-framework:
6+
runs-on: macos-latest-xlarge
7+
strategy:
8+
fail-fast: false
9+
matrix:
10+
include:
11+
- platform: iphoneos
12+
archs: arm64
13+
output: iphoneos
14+
arch_flag: --iphoneos_archs
15+
- platform: iphonesimulator
16+
archs: arm64
17+
output: iphonesimulator
18+
arch_flag: --iphonesimulator_archs
19+
steps:
20+
- uses: actions/checkout@v4
21+
with:
22+
submodules: recursive
23+
24+
- name: Build Release
25+
env:
26+
IPHONEOS_DEPLOYMENT_TARGET: "17.0"
27+
run: |-
28+
mkdir -p out/${{ matrix.output }}
29+
python3 platforms/ios/build_framework.py --iphoneos_deployment_target $IPHONEOS_DEPLOYMENT_TARGET --contrib opencv_contrib --build_only_specified_archs ${{ matrix.arch_flag }} ${{ matrix.archs }} --without stitching out/${{ matrix.output }}
30+
zip --symlinks -r opencv_ios_${{ matrix.output }}.zip out/${{ matrix.output }}/opencv2.framework
31+
zip --symlinks -r opencv_ios_${{ matrix.output }}_build_data.zip out/${{ matrix.output }}/build
32+
- uses: actions/upload-artifact@v4
33+
with:
34+
name: ios_${{ matrix.output }}_framework
35+
path: opencv_ios_${{ matrix.output }}.zip
36+
- uses: actions/upload-artifact@v4
37+
with:
38+
name: ios_${{ matrix.output }}_build_data
39+
path: opencv_ios_${{ matrix.output }}_build_data.zip
40+
41+
package-ios:
42+
runs-on: macos-latest-xlarge
43+
needs: build-ios-framework
44+
steps:
45+
- uses: actions/download-artifact@v4
46+
with:
47+
name: ios_iphoneos_framework
48+
- uses: actions/download-artifact@v4
49+
with:
50+
name: ios_iphonesimulator_framework
51+
- name: Create xcframework
52+
run: |-
53+
unzip opencv_ios_iphoneos.zip
54+
unzip opencv_ios_iphonesimulator.zip
55+
mkdir -p out/xcframework
56+
xcodebuild -create-xcframework -framework out/iphoneos/opencv2.framework -framework out/iphonesimulator/opencv2.framework -output out/xcframework/opencv2.xcframework
57+
zip --symlinks -r opencv_ios_xcframework.zip out/xcframework/opencv2.xcframework
58+
- uses: actions/upload-artifact@v4
59+
with:
60+
name: ios_lib
61+
path: opencv_ios_xcframework.zip

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# ignore dot files/directories
22
.*
33
!.gitignore
4+
!.github
45

56
*.autosave
67
*.pyc

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "opencv_contrib"]
2+
path = opencv_contrib
3+
url = https://github.com/opencv/opencv_contrib.git

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ OCV_OPTION(WITH_FRAMEBUFFER_XVFB "Include virtual framebuffer support" OFF
281281
OCV_OPTION(WITH_WAYLAND "Include Wayland support" OFF
282282
VISIBLE_IF UNIX AND NOT APPLE AND NOT ANDROID
283283
VERIFY HAVE_WAYLAND)
284-
OCV_OPTION(WITH_IPP "Include Intel IPP support" (NOT MINGW AND NOT CV_DISABLE_OPTIMIZATION)
284+
OCV_OPTION(WITH_IPP "Include Intel IPP support" (X86_64 OR X86) AND NOT IOS AND NOT XROS
285285
VISIBLE_IF (X86_64 OR X86) AND NOT WINRT AND NOT IOS AND NOT XROS
286286
VERIFY HAVE_IPP)
287287
OCV_OPTION(WITH_HALIDE "Include Halide support" OFF
@@ -557,6 +557,8 @@ if(ENABLE_IMPL_COLLECTION)
557557
add_definitions(-DCV_COLLECT_IMPL_DATA)
558558
endif()
559559

560+
# OpenCV modules to skip
561+
# ===================================================
560562
if(OPENCV_DISABLE_FILESYSTEM_SUPPORT)
561563
add_definitions(-DOPENCV_HAVE_FILESYSTEM_SUPPORT=0)
562564
endif()

modules/core/src/channels.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static MixChannelsFunc getMixchFunc(int depth)
8383
{
8484
mixChannels8u, mixChannels8u, mixChannels16u,
8585
mixChannels16u, mixChannels32s, mixChannels32s,
86-
mixChannels64s, 0
86+
mixChannels64s, mixChannels16u
8787
};
8888

8989
return mixchTab[depth];

opencv_contrib

Submodule opencv_contrib added at d99ad2a

0 commit comments

Comments
 (0)