mirror of
https://github.com/opencv/opencv.git
synced 2025-06-25 05:32:14 +08:00
Merge pull request #27097 from amane-ame:blur_hal_rvv
Add RISC-V HAL implementation for cv::blur series #27097 This patch implements `cv_hal_gaussianBlurBinomial`, `cv_hal_medianBlur`, `cv_hal_boxFilter` and `cv_hal_bilateralFilter` using native intrinsics, optimizing the performance of `cv::GaussianBlur/cv::medianBlur/cv::boxFilter/cv::bilateralFilter` for `3x3/5x5` kernels. Tested on MUSE-PI (Spacemit X60) for both gcc 14.2 and clang 20.0. ``` $ ./opencv_test_imgproc --gtest_filter="*Filter*:*Blur*" $ ./opencv_perf_imgproc --gtest_filter="*gauss*:*box*:*Bilateral*:*median*" --perf_min_samples=2000 --perf_force_samples=2000 ``` View the full perf table here: [hal_rvv_blur.pdf](https://github.com/user-attachments/files/19335582/hal_rvv_blur.pdf) ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [ ] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
parent
50072f8d4f
commit
ec5f7bb9f1
1827
3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp
vendored
1827
3rdparty/hal_rvv/hal_rvv_1p0/filter.hpp
vendored
File diff suppressed because it is too large
Load Diff
7
3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
vendored
7
3rdparty/hal_rvv/hal_rvv_1p0/types.hpp
vendored
@ -209,6 +209,13 @@ static inline VecType vmul(VecType vs2, VecType vs1, size_t vl) {
|
||||
return __riscv_v##IS_F##mul(vs2, vs1, vl); \
|
||||
} \
|
||||
\
|
||||
static inline VecType vslide1down(VecType vs2, ElemType vs1, size_t vl) { \
|
||||
return __riscv_v##IS_F##slide1down(vs2, vs1, vl); \
|
||||
} \
|
||||
static inline VecType vslide1up(VecType vs2, ElemType vs1, size_t vl) { \
|
||||
return __riscv_v##IS_F##slide1up(vs2, vs1, vl); \
|
||||
} \
|
||||
\
|
||||
static inline VecType vmin(VecType vs2, VecType vs1, size_t vl) { \
|
||||
return __riscv_v##IS_F##min##IS_U(vs2, vs1, vl); \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user