Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
0de26fd
Add zlib-ng as an alternative zlib implementation
FantasqueX Dec 27, 2023
5e09fca
Skip InferList.TestStreamingInfer
dkurt Apr 3, 2024
fb194a4
imgcodecs: jpeg: refactoring for JpegEncoder
Kumataro Apr 19, 2024
26798e1
imgcodecs: tiff: test: ASSERT_NO_THROW() for imwrite/imread
Kumataro Apr 19, 2024
3f8b56e
Merge pull request #25459 from Kumataro:investigate_tiff_test
asmorkalov Apr 22, 2024
096ccd4
change js_face_recognition sample with yunet
WanliZhong Apr 22, 2024
ae85e51
Merge pull request #25423 from LuukvandenBent:CalibrateHandEyeDatatyp…
LuukvandenBent Apr 22, 2024
50b6edc
Merge pull request #25321 from dkurt:skip_gapi_test
asmorkalov Apr 22, 2024
616a913
Merge pull request #25468 from WanliZhong:change_js_ocvFaceDet_sample
asmorkalov Apr 22, 2024
5b08437
Merge pull request #25453 from Kumataro:fix25452
asmorkalov Apr 22, 2024
7e56908
Merge pull request #25469 from mshabunin:cpp-emd
mshabunin Apr 24, 2024
ebea657
Merge pull request #24938 from DariaMityagina:icv/dm/add-media-frame-…
DariaMityagina Apr 24, 2024
7bad12c
Fixed build warnings introduced in #24938
asmorkalov Apr 24, 2024
2225b25
Merge pull request #25488 from inkredibl:doc-fix-findEssentialMat
inkredibl Apr 25, 2024
7b58ffe
Merge pull request #25486 from asmorkalov:as/gapi_warning_fix
asmorkalov Apr 25, 2024
d0978ce
Added moments interface to HAL.
asmorkalov Apr 25, 2024
2cd3304
Merge pull request #25490 from asmorkalov:as/HAL_moments
asmorkalov Apr 26, 2024
8f7e55a
Replace static numpy allocator by function containing static.
vrabaud Apr 26, 2024
8af7669
Merge pull request #25493 from vrabaud:tiff
asmorkalov Apr 27, 2024
357b9ab
Merge pull request #25450 from savuor:rv/svd_perf
savuor Apr 27, 2024
12e2cc9
Merge pull request #25491 from savuor:rv/hal_norm_hamming
savuor Apr 27, 2024
6682270
highgui: wayland: reduce cpu usage for cv::waitKey()
Kumataro Apr 28, 2024
b1e0197
Merge pull request #25308 from dkurt:not_normalized_findHomography
dkurt Apr 29, 2024
2a2ff55
Merge pull request #25496 from Kumataro:fix25495
Kumataro Apr 29, 2024
716826c
highgui: wayland: support imshow() without pre-calling namedWindow()
Kumataro Apr 30, 2024
cbf71c3
Merge pull request #25502 from Kumataro:fix25501
asmorkalov Apr 30, 2024
e3fc850
Fix doc about uniform parameter for imgproc calcBackProject function
xndcn Apr 30, 2024
22de887
fix statckblur big kernel case
zihaomu Apr 30, 2024
1f6f092
Merge pull request #25513 from zihaomu:fix_25498
asmorkalov May 1, 2024
b5cf4f1
Merge pull request #25514 from xndcn:patch-1
asmorkalov May 1, 2024
f3f29fa
Added more OpenVINO layers to dnn
May 2, 2024
1c9efbd
Merge pull request #25523 from Kumataro:fix25522
Kumataro May 2, 2024
ce642e9
Merge pull request #25510 from Kumataro:fix25497
asmorkalov May 2, 2024
c999cb3
Update text_detection.cpp
NlSEMONO May 2, 2024
ed47cce
change fcn8s-heavy-pascal tests from caffe to onnx
WanliZhong Apr 17, 2024
5aaa570
Fixed SyntaxWarning: invalid escape sequence '\w' in header parser.
asmorkalov May 2, 2024
bc95f27
Merge pull request #25509 from savuor:rv/hal_otsu
savuor May 2, 2024
7ea4364
Merge pull request #25528 from asmorkalov:as/python_hdr_parser_fix
asmorkalov May 3, 2024
02c3132
Fix moments integration to OpenCV HAL.
asmorkalov May 3, 2024
6bf758e
Merge pull request #24782 from FantasqueX:4.x-zlib-ng
asmorkalov May 3, 2024
9fe5615
Got rid of deprecated convertFp16 in imgcodecs module.
asmorkalov May 3, 2024
c539cfd
Merge pull request #25435 from WanliZhong:fcn2onnx
asmorkalov May 3, 2024
d9555db
Merge pull request #25535 from asmorkalov:as/convertfp16_imgcodecs
asmorkalov May 3, 2024
6e5a53c
Merge pull request #25532 from asmorkalov:as/HAL_moments_bug
asmorkalov May 3, 2024
ac9a858
Merge pull request #25524 from alexlyulkov:al/openvino-layers
asmorkalov May 3, 2024
75f3f0f
Merge pull request #25526 from NlSEMONO:patch-1
asmorkalov May 3, 2024
d8e18f4
Made fcn-resnet50-12.onnx model optional.
asmorkalov May 3, 2024
b94cb5b
HAL interface for meanStdDev.
asmorkalov May 3, 2024
af4531b
python: adapt test to NumPy 2.x
mshabunin May 3, 2024
c4ce942
imgproc: fixed alignment issue and improved test for boundingRect
mshabunin Apr 24, 2024
a8df49f
doc: fixed modern Javadoc issue
mshabunin May 3, 2024
4081a30
doc: disabled inheritance graphs
mshabunin May 3, 2024
c43957c
Merge pull request #25538 from asmorkalov:as/resnet_optional
asmorkalov May 6, 2024
70d333d
Merge pull request #25483 from asmorkalov:as/HAL_meanStdDev
asmorkalov May 6, 2024
a4486c0
Merge pull request #25541 from mshabunin:fix-numpy2x-test
asmorkalov May 6, 2024
26a5730
Merge pull request #25542 from mshabunin:fix-disable-diagram
asmorkalov May 6, 2024
7127161
videoio: decreased log level for failed backends in VideoCapture and …
mshabunin May 6, 2024
8bc90a4
Merge pull request #25484 from mshabunin:bounding-rect-alignment
asmorkalov May 7, 2024
ba65d2e
Merge pull request #25549 from mshabunin:fix-cap-images-noise
asmorkalov May 7, 2024
392fd4e
Tune sanity threshold in Moments performance test for Android aarch64.
asmorkalov May 7, 2024
a9e489f
Merge pull request #25558 from asmorkalov:as/moments_sanity
asmorkalov May 7, 2024
faa259a
Merge pull request #25553 from asmorkalov:as/HAL_min_max_idx
asmorkalov May 7, 2024
5bd64e0
Merge pull request #25554 from savuor:rv/hal_lut
savuor May 8, 2024
1f1ba7e
Merge pull request #25563 from asmorkalov:as/HAL_min_max_idx
asmorkalov May 8, 2024
55eebe8
Synchornized cv::moments documentation with actual implementation.
asmorkalov May 9, 2024
1d9a412
Merge pull request #25565 from savuor:rv/hal_eq_hist
savuor May 9, 2024
78c9793
doc: fix env change method in the environment reference
mshabunin May 13, 2024
8dc9ff5
Merge pull request #25551 from Kumataro:fix25550
Kumataro May 13, 2024
023d805
Fix zlib-ng version parse
FantasqueX May 13, 2024
3c7e94b
Merge pull request #25576 from mshabunin:fix-env-doc
asmorkalov May 13, 2024
1614b8d
imgproc: fix allocation issue in EMD
mshabunin May 14, 2024
58e007e
Merge pull request #25583 from mshabunin:fix-emd-32bit
asmorkalov May 14, 2024
02ad8c2
Merge pull request #25577 from FantasqueX:fix-zlib-ng-version-parse-1
asmorkalov May 14, 2024
f4e5438
Merge pull request #25566 from asmorkalov:as/moments_documentation
asmorkalov May 14, 2024
7fc8a49
set policy 0148 explicitly
FantasqueX May 14, 2024
03507e0
Merge pull request #25518 from alexlyulkov:al/fixed-gemm-openvino
alexlyulkov May 14, 2024
47a6ffb
Merge pull request #25561 from Kumataro:fix25560
Kumataro May 15, 2024
2e07ec1
Restored and extended Highgui test logic for small windows.
asmorkalov May 15, 2024
4d4def2
Merge pull request #25590 from asmorkalov:as/restore_highgui_test
asmorkalov May 15, 2024
c034c46
Disable more streaming test in G-API due to instability.
asmorkalov May 15, 2024
68581e7
Merge pull request #25592 from asmorkalov:as/gapi_disable_steaming_again
asmorkalov May 15, 2024
76d9f7a
Merge pull request #25591 from LaurentBerger:I25589
LaurentBerger May 15, 2024
5009109
typo
LaurentBerger May 15, 2024
7713c84
Merge pull request #25297 from CNOCycle:tflite/transpose
CNOCycle May 15, 2024
7d6b616
Update imgcodecs tests
sturkmen72 May 15, 2024
78ed6de
Merge pull request #25594 from LaurentBerger:I25587
asmorkalov May 16, 2024
5f3a505
Added Ubuntu 24.04 to regular CI.
asmorkalov May 16, 2024
d29ad2f
Merge pull request #25443 from asmorkalov:as/kleidicv_hal
asmorkalov May 16, 2024
f2d6527
Merge pull request #25596 from asmorkalov:as/ci_ubuntu24.04
asmorkalov May 16, 2024
41f0898
Merge pull request #25585 from FantasqueX:add-policy-0148
asmorkalov May 16, 2024
0044047
Merge pull request #25598 from asmorkalov:as/tables_range_check_core
asmorkalov May 17, 2024
bc0618b
Merge pull request #25582 from fengyuentau:dnn/dump_pbtxt
fengyuentau May 17, 2024
5e78878
Merge pull request #25525 from sturkmen72:png-spng-test
asmorkalov May 17, 2024
5f509e2
Skip Test_Caffe_layers.Concat with Vulkan due to sporadic failures.
asmorkalov May 17, 2024
8aa129d
Merge pull request #25603 from asmorkalov:as/skip_vulkan_concat
asmorkalov May 17, 2024
6350bfb
Merge pull request #25564 from mshabunin:cleanup-imgproc-2
mshabunin May 17, 2024
e05ad56
Merge pull request #24903 from cristidbr-adapta:feature-barcode-detec…
cristidbr-adapta May 20, 2024
83e32c4
Merge pull request #25511 from savuor:rv/hal_projectpoints
savuor May 20, 2024
69af621
Merge pull request #25506 from savuor:rv/hal_mul16
savuor May 20, 2024
d95ff3a
HAL for sub8x32f added
May 12, 2024
23ba63b
Merge pull request #25574 from savuor:rv/hal_sub8x32f
asmorkalov May 20, 2024
40faced
OpenJPEG update to 2.5.2.
asmorkalov May 20, 2024
c71d495
Merge pull request #25611 from asmorkalov:as/openjpeg_2.5.2
asmorkalov May 20, 2024
0b39a51
pre: OpenCV 4.10.0 (version++).
asmorkalov May 21, 2024
e525401
Merge pull request #25586 from hanliutong:rvv-64f
hanliutong May 21, 2024
49f80cb
Merge pull request #24804 from fengyuentau:fix_lapack_warnings
fengyuentau May 21, 2024
8393885
Merge pull request #25615 from asmorkalov:update_version_4.10.0-pre
asmorkalov May 21, 2024
5696413
ffmpeg/4.x: update FFmpeg wrapper 2024.05
alalek May 22, 2024
28d029c
Replace non-ascii character
lackhole May 22, 2024
e765c9f
Merge pull request #25580 from sturkmen72:libpng_1_6_43
sturkmen72 May 22, 2024
f2c48e5
Merge pull request #25622 from lackhole:remove-unicode-character
asmorkalov May 22, 2024
f850145
Fixed width and height order in HAL call for LUT.
asmorkalov May 23, 2024
5002077
Disambiguate cv::format
vrabaud May 23, 2024
f8ad6eb
Delete option --memory-init-file of em++
arobase-che May 23, 2024
9f15595
Merge pull request #25627 from vrabaud:tiff
asmorkalov May 23, 2024
16b5096
Merge pull request #25618 from asmorkalov:as/kleidicv_0.1.0
asmorkalov May 23, 2024
6fb3f63
Support VS 2022 17.1x.y
bebuch May 23, 2024
4824354
Merge pull request #25631 from asmorkalov:as/png_build_fix
asmorkalov May 23, 2024
de3eb0e
Merge pull request #25626 from asmorkalov:as/HAL_lut_size
asmorkalov May 23, 2024
f5793d2
Merge pull request #25632 from bebuch:patch-1
asmorkalov May 23, 2024
f1aef89
Merge pull request #25619 from opencv-pushbot:gitee/alalek/update_ffm…
alalek May 23, 2024
6bee2fa
Use leftarrow in color conversion Doc
FantasqueX May 24, 2024
28c3000
Merge pull request #25629 from arobase-che:fix-opencv.js-compilation-…
asmorkalov May 24, 2024
f85818b
Support VS 2022 17.1x.y in OpenCVDetectCXXCompiler.cmake
bebuch May 24, 2024
ba28b7d
Merge pull request #25636 from FantasqueX:use-left-arrow-1
asmorkalov May 24, 2024
7e3f687
Prevent signed integer overflow in LshTable
vrabaud May 24, 2024
f17b122
Merge pull request #25638 from bebuch:patch-2
asmorkalov May 25, 2024
b267f17
Merge pull request #25633 from savuor:rv/rotate_tests
savuor May 25, 2024
cc49aee
Merge pull request #25634 from savuor:rv/boxfilter_tests
savuor May 25, 2024
7b31cc7
Merge pull request #24897 from JStech:fix-handeye
JStech May 25, 2024
d97df26
Merge pull request #25623 from asmorkalov:as/jpegturbo_3.0.3
asmorkalov May 25, 2024
1fa96b1
Merge pull request #25616 from savuor:rv/yuv_docs
savuor May 25, 2024
8955a27
minor cosmetic changes
sturkmen72 May 26, 2024
f1890e3
Merge pull request #25650 from sturkmen72:libjpeg-turbo
asmorkalov May 27, 2024
c5976f7
Merge pull request #25641 from vrabaud:lsh
asmorkalov May 27, 2024
b659351
Merge pull request #25647 from Kumataro:fix25646
Kumataro May 27, 2024
05e4860
Merge pull request #25412 from ZelboK:update-cudnn-to-9
ZelboK May 28, 2024
1668203
Added branch with variadic version of Trust tuple
asmorkalov May 28, 2024
d9421ac
Merge pull request #25167 from plctlab:rvp_3rdparty
Junyan721113 May 28, 2024
e7bf077
Have the findContours_legacy overload call findContours_legacy.
vrabaud May 29, 2024
8709115
imgproc: fix contour approximation, added test
mshabunin May 29, 2024
79af357
Merge pull request #25668 from vrabaud:legacy
asmorkalov May 30, 2024
2624929
Merge pull request #25672 from mshabunin:fix-approx
asmorkalov May 30, 2024
3e3ee10
Merge pull request #25658 from asmorkalov:as/variadic_tuple
asmorkalov May 30, 2024
7e9ef4d
Merge pull request #25625 from fengyuentau:core/deploy_fix_lapack_ilp64
fengyuentau May 30, 2024
9ed1d67
Fixed offset computation for ND case in MinMaxIdx HAL.
asmorkalov May 31, 2024
f4ebf7c
Merge pull request #25679 from asmorkalov:as/HAL_min_max_idx_fix
asmorkalov May 31, 2024
d7f04a9
Merge pull request #25660 from Abdurrahheem:ash/fix-slice-empty-input
Abdurrahheem May 31, 2024
dcce2b8
Merge pull request #25662 from ujjayant-kadian:uk/port-gapi-onnxrt-ba…
ujjayant-kadian May 31, 2024
472eba3
Merge pull request #25673 from AleksandrPanov:fix_charuco_board_markers
May 31, 2024
ca035e6
fix type for ilp64 api
fengyuentau May 31, 2024
0810795
Merge pull request #25682 from fengyuentau:calib3d/lapack_fix_calib3d
asmorkalov May 31, 2024
29f91a0
Merge pull request #25680 from mshabunin:fix-approx-2
mshabunin May 31, 2024
98b8825
Merge pull request #25613 from CNOCycle:tflite/ops
CNOCycle May 31, 2024
1db6a8a
Merge pull request #25665 from vrabaud:jacobian
vrabaud May 31, 2024
1bd5ca1
Merge pull request #25686 from Kumataro:fix25674
Kumataro Jun 2, 2024
a7e53aa
Merge pull request #25671 from savuor:rv/arithm_extend_tests
savuor Jun 2, 2024
71d3237
Release 4.10.0
asmorkalov Jun 2, 2024
337c183
Merge tag '4.10.0'
alalek Jun 2, 2024
3f26664
ISSUE-25700 update cv::FaceRecognizerSF class documentation
Jun 3, 2024
d8f0838
Merge pull request #25701 from keanep:I25700
asmorkalov Jun 4, 2024
2bb8b2b
Disable more G-API streaming test due to unstability.
asmorkalov Jun 4, 2024
92b588f
Merge pull request #25702 from asmorkalov:as/gapi_disable_steaming_again
asmorkalov Jun 4, 2024
9c05b27
cuda: Add missing python CUDA dependency when CUDA is a first class l…
cudawarped Jun 4, 2024
b77c74b
imgproc: fixed imread with output image argument, minor refactoring, …
mshabunin Jun 4, 2024
99f32f1
Added potential fix for Android H264 Encoding Bug
Jun 5, 2024
5dd7b5f
fix: mark floodFill mask as optional in Python typing stubs
VadimLevin Jun 6, 2024
a5d9c29
Merge pull request #25716 from alexlyulkov:al/mediandk-fix
asmorkalov Jun 6, 2024
0d1ed49
Merge pull request #25703 from mshabunin:fix-imread-arg
asmorkalov Jun 6, 2024
cbf3b11
Merge pull request #25720 from VadimLevin:dev/vlevin/floodFill-option…
asmorkalov Jun 6, 2024
cbc0851
updated testSeveralBoardsWithCustomIds to enable in 5.x
Jun 6, 2024
adcb070
Merge pull request #25307 from MaximMilashchenko:halrvv071
MaximMilashchenko Jun 6, 2024
bef5a87
Merge pull request #25722 from AleksandrPanov:update_testSeveralBoard…
asmorkalov Jun 6, 2024
ef33037
test: use cv::theRNG instead of own generator
mshabunin Jun 6, 2024
3700f9e
Merge pull request #25709 from dkurt:wrap_addLayer
dkurt Jun 7, 2024
3282954
Merge pull request #25723 from mshabunin:fix-ts-rng
asmorkalov Jun 7, 2024
cc6f85e
Merge pull request #25427 from MaximSmolskiy:make-finding-corner-neig…
MaximSmolskiy Jun 10, 2024
bdf986e
Merge pull request #25726 from chacha21:remap_relative_doc
chacha21 Jun 10, 2024
e1dba2c
Perform arithmetics in CV_32F branch of divSpectrums() with doubles t…
rlexmann Jun 10, 2024
3ea7ed9
Merge pull request #25718 from savuor:rv/hwasan_flag
savuor Jun 11, 2024
2629688
Merge pull request #25706 from cudawarped:fix_cuda_first_python_dep
asmorkalov Jun 11, 2024
8e93070
Merge pull request #25738 from rlexmann:imgproc_fix_divSpectrums
asmorkalov Jun 11, 2024
a03b813
Merge pull request #25732 from dkurt:opencv_js_tests_update
dkurt Jun 11, 2024
26ea34c
Merge branch '4.x' into '5.x'
mshabunin Jun 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions 3rdparty/ffmpeg/ffmpeg.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Binaries branch name: ffmpeg/4.x_20231225
# Binaries were created for OpenCV: 62f1a7410d5e5e03d6cee5c95549bf61d5ee98db
ocv_update(FFMPEG_BINARIES_COMMIT "fbac408a47977ee4265f39e7659d33f1dfef5216")
ocv_update(FFMPEG_FILE_HASH_BIN32 "9b755ecbbade0a5b78332e9b4ef2dd1b")
ocv_update(FFMPEG_FILE_HASH_BIN64 "cb4db51ee9a423e6168b9d08bee61efc")
# Binaries branch name: ffmpeg/4.x_20240522
# Binaries were created for OpenCV: 8393885a39dac1e650bf5d0aaff84c04ad8bcdd3
ocv_update(FFMPEG_BINARIES_COMMIT "394dca6ceb3085c979415e6385996b6570e94153")
ocv_update(FFMPEG_FILE_HASH_BIN32 "bdfbd1efb295f3e54c07d2cb7a843bf9")
ocv_update(FFMPEG_FILE_HASH_BIN64 "bfef029900f788480a363d6dc05c4f0e")
ocv_update(FFMPEG_FILE_HASH_CMAKE "8862c87496e2e8c375965e1277dee1c7")

function(download_win_ffmpeg script_var)
Expand Down
9 changes: 9 additions & 0 deletions 3rdparty/hal_rvv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cmake_minimum_required(VERSION ${MIN_VER_CMAKE} FATAL_ERROR)

set(HAL_LIB_NAME "")

set(RVV_HAL_FOUND TRUE CACHE INTERNAL "")
set(RVV_HAL_VERSION "0.0.1" CACHE INTERNAL "")
set(RVV_HAL_LIBRARIES ${HAL_LIB_NAME} CACHE INTERNAL "")
set(RVV_HAL_HEADERS "hal_rvv.hpp" CACHE INTERNAL "")
set(RVV_HAL_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}" CACHE INTERNAL "")
24 changes: 24 additions & 0 deletions 3rdparty/hal_rvv/hal_rvv.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.

#ifndef OPENCV_HAL_RVV_HPP_INCLUDED
#define OPENCV_HAL_RVV_HPP_INCLUDED

#include <riscv_vector.h>

#include "opencv2/core/hal/interface.h"

#ifndef CV_HAL_RVV_071_ENABLED
# if defined(__GNUC__) && __GNUC__ == 10 && __GNUC_MINOR__ == 4 && defined(__THEAD_VERSION__) && defined(__riscv_v) && __riscv_v == 7000
# define CV_HAL_RVV_071_ENABLED 1
# else
# define CV_HAL_RVV_071_ENABLED 0
# endif
#endif

#if CV_HAL_RVV_071_ENABLED
#include "version/hal_rvv_071.hpp"
#endif

#endif
107 changes: 107 additions & 0 deletions 3rdparty/hal_rvv/version/hal_rvv_071.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.

#ifndef OPENCV_HAL_RVV_071_HPP_INCLUDED
#define OPENCV_HAL_RVV_071_HPP_INCLUDED

#include <limits>

namespace cv { namespace cv_hal_rvv {

#undef cv_hal_cvtBGRtoBGR
#define cv_hal_cvtBGRtoBGR cv::cv_hal_rvv::cvtBGRtoBGR

static const unsigned char index_array_32 [32]
{ 2, 1, 0, 3, 6, 5, 4, 7, 10, 9, 8, 11, 14, 13, 12, 15, 18, 17, 16, 19, 22, 21, 20, 23, 26, 25, 24, 27, 30, 29, 28, 31 };

static const unsigned char index_array_24 [24]
{ 2, 1, 0, 5, 4, 3, 8, 7, 6, 11, 10, 9, 14, 13, 12, 17, 16, 15, 20, 19, 18, 23, 22, 21 };

static void vBGRtoBGR(const unsigned char* src, unsigned char * dst, const unsigned char * index, int n, int scn, int dcn, int vsize_pixels, const int vsize)
{
vuint8m2_t vec_index = vle8_v_u8m2(index, vsize);

int i = 0;

for ( ; i <= n-vsize; i += vsize_pixels, src += vsize, dst += vsize)
{
vuint8m2_t vec_src = vle8_v_u8m2(src, vsize);
vuint8m2_t vec_dst = vrgather_vv_u8m2(vec_src, vec_index, vsize);
vse8_v_u8m2(dst, vec_dst, vsize);
}

for ( ; i < n; i++, src += scn, dst += dcn )
{
unsigned char t0 = src[0], t1 = src[1], t2 = src[2];
dst[2] = t0;
dst[1] = t1;
dst[0] = t2;
if(dcn == 4)
{
unsigned char d = src[3];
dst[3] = d;
}
}
}

static void sBGRtoBGR(const unsigned char* src, unsigned char * dst, int n, int scn, int dcn, int bi)
{
for (int i = 0; i < n; i++, src += scn, dst += dcn)
{
unsigned char t0 = src[0], t1 = src[1], t2 = src[2];
dst[bi ] = t0;
dst[1] = t1;
dst[bi^2] = t2;
if(dcn == 4)
{
unsigned char d = scn == 4 ? src[3] : std::numeric_limits<unsigned char>::max();
dst[3] = d;
}
}
}

static int cvtBGRtoBGR(const unsigned char * src_data, size_t src_step, unsigned char * dst_data, size_t dst_step, int width, int height, int depth, int scn, int dcn, bool swapBlue)
{
if (depth != CV_8U)
{
return CV_HAL_ERROR_NOT_IMPLEMENTED;
}

const int blueIdx = swapBlue ? 2 : 0;
if (scn == dcn)
{
if (!swapBlue)
{
return CV_HAL_ERROR_NOT_IMPLEMENTED;
}

const int vsize_pixels = 8;

if (scn == 4)
{
for (int i = 0; i < height; i++, src_data += src_step, dst_data += dst_step)
{
vBGRtoBGR(src_data, dst_data, index_array_32, width, scn, dcn, vsize_pixels, 32);
}
}
else
{
for (int i = 0; i < height; i++, src_data += src_step, dst_data += dst_step)
{
vBGRtoBGR(src_data, dst_data, index_array_24, width, scn, dcn, vsize_pixels, 24);
}
}
}
else
{
for (int i = 0; i < height; i++, src_data += src_step, dst_data += dst_step)
sBGRtoBGR(src_data, dst_data, width, scn, dcn, blueIdx);
}

return CV_HAL_ERROR_OK;
}

}}

#endif
23 changes: 23 additions & 0 deletions 3rdparty/kleidicv/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
project(kleidicv_hal)

set(KLEIDICV_SOURCE_PATH "" CACHE PATH "Directory containing KleidiCV sources")
ocv_update(KLEIDICV_SRC_COMMIT "0.1.0")
ocv_update(KLEIDICV_SRC_HASH "9388f28cf2fbe3338197b2b57d491468")

if(KLEIDICV_SOURCE_PATH)
set(THE_ROOT "${KLEIDICV_SOURCE_PATH}")
else()
ocv_download(FILENAME "kleidicv-${KLEIDICV_SRC_COMMIT}.tar.gz"
HASH ${KLEIDICV_SRC_HASH}
URL
"${OPENCV_KLEIDICV_URL}"
"$ENV{OPENCV_KLEIDICV_URL}"
"https://gitlab.arm.com/kleidi/kleidicv/-/archive/${KLEIDICV_SRC_COMMIT}/"
DESTINATION_DIR "${OpenCV_BINARY_DIR}/3rdparty/kleidicv/"
ID KLEIDICV
STATUS res
UNPACK RELATIVE_URL)
set(THE_ROOT "${OpenCV_BINARY_DIR}/3rdparty/kleidicv/kleidicv-${KLEIDICV_SRC_COMMIT}")
endif()

include("${THE_ROOT}/adapters/opencv/CMakeLists.txt")
109 changes: 78 additions & 31 deletions 3rdparty/libjpeg-turbo/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,43 @@
project(${JPEG_LIBRARY} C)

macro(boolean_number var)
if(${var})
set(${var} 1 ${ARGN})
else()
set(${var} 0 ${ARGN})
endif()
endmacro()

ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-parameter -Wsign-compare -Wshorten-64-to-32 -Wimplicit-fallthrough)
if(APPLE)
ocv_warnings_disable(CMAKE_C_FLAGS -Wunused-variable) # NEON flags are not used on Mac
endif()

set(VERSION_MAJOR 2)
set(VERSION_MINOR 1)
set(VERSION_REVISION 3)
set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION})
set(LIBJPEG_TURBO_VERSION_NUMBER 2001003)
if(CV_GCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13)
# src/jchuff.c:1042:22: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
ocv_warnings_disable(CMAKE_C_FLAGS -Wstringop-overflow)
endif()

set(VERSION 3.0.3)
set(COPYRIGHT_YEAR "1991-2024")
string(REPLACE "." ";" VERSION_TRIPLET ${VERSION})
list(GET VERSION_TRIPLET 0 VERSION_MAJOR)
list(GET VERSION_TRIPLET 1 VERSION_MINOR)
list(GET VERSION_TRIPLET 2 VERSION_REVISION)
function(pad_number NUMBER OUTPUT_LEN)
string(LENGTH "${${NUMBER}}" INPUT_LEN)
if(INPUT_LEN LESS OUTPUT_LEN)
math(EXPR ZEROES "${OUTPUT_LEN} - ${INPUT_LEN} - 1")
set(NUM ${${NUMBER}})
foreach(C RANGE ${ZEROES})
set(NUM "0${NUM}")
endforeach()
set(${NUMBER} ${NUM} PARENT_SCOPE)
endif()
endfunction()
pad_number(VERSION_MINOR 3)
pad_number(VERSION_REVISION 3)
set(LIBJPEG_TURBO_VERSION_NUMBER ${VERSION_MAJOR}${VERSION_MINOR}${VERSION_REVISION})

string(TIMESTAMP BUILD "opencv-${OPENCV_VERSION}-libjpeg-turbo")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
Expand Down Expand Up @@ -66,8 +97,8 @@ include(CheckCSourceCompiles)
include(CheckIncludeFiles)
include(CheckTypeSize)

check_type_size("size_t" SIZEOF_SIZE_T)
check_type_size("unsigned long" SIZEOF_UNSIGNED_LONG)
check_type_size("size_t" SIZE_T)
check_type_size("unsigned long" UNSIGNED_LONG)

if(SIZEOF_SIZE_T EQUAL SIZEOF_UNSIGNED_LONG)
check_c_source_compiles("int main(int argc, char **argv) { unsigned long a = argc; return __builtin_ctzl(a); }"
Expand Down Expand Up @@ -103,33 +134,34 @@ if(WITH_ARITH_DEC)
set(D_ARITH_CODING_SUPPORTED 1)
endif()

set(JPEG_LIB_VERSION 62)
set(JPEG_LIB_VERSION 70)

# OpenCV
set(JPEG_LIB_VERSION "${VERSION}-${JPEG_LIB_VERSION}" PARENT_SCOPE)

set(THREAD_LOCAL "") # WITH_TURBOJPEG is not used

add_definitions(-DNO_GETENV -DNO_PUTENV)

if(MSVC)
add_definitions(-W3 -wd4996 -wd4018)
endif()

if(WIN32)
configure_file(jconfig.h.win.in jconfig.h)
else()
configure_file(jconfig.h.in jconfig.h)
endif()
configure_file(jconfigint.h.in jconfigint.h)

include_directories(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/src)

set(JPEG_SOURCES jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c
jcicc.c jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c
jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c jdatadst.c
jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c jdicc.c jdinput.c
jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c jdpostct.c jdsample.c
jdtrans.c jerror.c jfdctflt.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c
jidctint.c jidctred.c jquant1.c jquant2.c jutils.c jmemmgr.c jmemnobs.c)
set(JPEG16_SOURCES jcapistd.c jccolor.c jcdiffct.c jclossls.c jcmainct.c
jcprepct.c jcsample.c jdapistd.c jdcolor.c jddiffct.c jdlossls.c jdmainct.c
jdpostct.c jdsample.c jutils.c)

set(JPEG12_SOURCES ${JPEG16_SOURCES} jccoefct.c jcdctmgr.c jdcoefct.c
jddctmgr.c jdmerge.c jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c
jidctred.c jquant1.c jquant2.c)

set(JPEG_SOURCES ${JPEG12_SOURCES} jcapimin.c jchuff.c jcicc.c jcinit.c
jclhuff.c jcmarker.c jcmaster.c jcomapi.c jcparam.c jcphuff.c jctrans.c
jdapimin.c jdatadst.c jdatasrc.c jdhuff.c jdicc.c jdinput.c jdlhuff.c
jdmarker.c jdmaster.c jdphuff.c jdtrans.c jerror.c jfdctflt.c jmemmgr.c
jmemnobs.c jpeg_nbits.c)

if(WITH_ARITH_ENC OR WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jaricom.c)
Expand All @@ -143,7 +175,7 @@ if(WITH_ARITH_DEC)
set(JPEG_SOURCES ${JPEG_SOURCES} jdarith.c)
endif()

if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID STREQUAL "Clang")
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang")
# Use the maximum optimization level for release builds
foreach(var CMAKE_C_FLAGS_RELEASE CMAKE_C_FLAGS_RELWITHDEBINFO)
if(${var} MATCHES "-O2")
Expand All @@ -166,6 +198,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "SunOS")
endif()
endif()

include(CheckTypeSize)
check_type_size("size_t" SIZE_T)
check_type_size("unsigned long" UNSIGNED_LONG)

if(ENABLE_LIBJPEG_TURBO_SIMD)
add_subdirectory(src/simd)
if(NEON_INTRINSICS)
Expand All @@ -181,19 +217,28 @@ if(WITH_SIMD)
if(MSVC_IDE OR XCODE)
set_source_files_properties(${SIMD_OBJS} PROPERTIES GENERATED 1)
endif()
else()
add_library(jsimd OBJECT src/jsimd_none.c)
set_target_properties(jsimd PROPERTIES FOLDER "3rdparty")
if(NOT WIN32 AND (CMAKE_POSITION_INDEPENDENT_CODE OR ENABLE_SHARED))
set_target_properties(jsimd PROPERTIES POSITION_INDEPENDENT_CODE 1)
endif()
set(SIMD_TARGET_OBJECTS $<TARGET_OBJECTS:simd>)
endif()

configure_file(jversion.h.in jversion.h)
configure_file(jconfig.h.in jconfig.h)
configure_file(jconfigint.h.in jconfigint.h)

ocv_list_add_prefix(JPEG16_SOURCES src/)
ocv_list_add_prefix(JPEG12_SOURCES src/)
ocv_list_add_prefix(JPEG_SOURCES src/)

set(JPEG_SOURCES ${JPEG_SOURCES} ${SIMD_OBJS})

add_library(${JPEG_LIBRARY} STATIC ${OPENCV_3RDPARTY_EXCLUDE_FROM_ALL} ${JPEG_SOURCES} $<TARGET_OBJECTS:jsimd> ${SIMD_OBJS})
add_library(jpeg12-static OBJECT ${JPEG12_SOURCES})
set_property(TARGET jpeg12-static PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=12")
add_library(jpeg16-static OBJECT ${JPEG16_SOURCES})
set_property(TARGET jpeg16-static PROPERTY COMPILE_FLAGS
"-DBITS_IN_JSAMPLE=16")
add_library(${JPEG_LIBRARY} STATIC ${JPEG_SOURCES} ${SIMD_TARGET_OBJECTS}
${SIMD_OBJS} $<TARGET_OBJECTS:jpeg12-static>
$<TARGET_OBJECTS:jpeg16-static>)

set_target_properties(${JPEG_LIBRARY}
PROPERTIES OUTPUT_NAME ${JPEG_LIBRARY}
Expand All @@ -204,7 +249,9 @@ set_target_properties(${JPEG_LIBRARY}
)

if(ENABLE_SOLUTION_FOLDERS)
set_target_properties(${JPEG_LIBRARY} PROPERTIES FOLDER "3rdparty")
set_target_properties(${JPEG_LIBRARY} PROPERTIES FOLDER "3rdparty/jpeg")
set_target_properties(jpeg12-static PROPERTIES FOLDER "3rdparty/jpeg")
set_target_properties(jpeg16-static PROPERTIES FOLDER "3rdparty/jpeg")
endif()

if(NOT BUILD_SHARED_LIBS)
Expand Down
Loading