Skip to content

hal/imgproc: add hal for calcHist and implement in hal/riscv-rvv#27332

Merged
asmorkalov merged 2 commits intoopencv:4.xfrom
fengyuentau:4x/hal/riscv_rvv/calcHist
May 21, 2025
Merged

hal/imgproc: add hal for calcHist and implement in hal/riscv-rvv#27332
asmorkalov merged 2 commits intoopencv:4.xfrom
fengyuentau:4x/hal/riscv_rvv/calcHist

Conversation

@fengyuentau
Copy link
Copy Markdown
Member

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • 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

@fengyuentau
Copy link
Copy Markdown
Member Author

Performance numbers:

  • K1 base vs. patch

GCC

               Name of Test                 base-gcc patch-gcc patch-gcc 
                                                                   vs    
                                                                base-gcc 
                                                               (x-factor)
calcHist1d::Size_Source::(2048x1536, 8UC1)   10.301   10.283      1.00   
calcHist1d::Size_Source::(2048x1536, 16UC1)  85.365   27.098      3.15   
calcHist1d::Size_Source::(2048x1536, 32FC1)  89.674   26.296      3.41   
calcHist1d::Size_Source::(2592x1944, 8UC1)   16.469   16.458      1.00   
calcHist1d::Size_Source::(2592x1944, 16UC1) 136.727   43.451      3.15   
calcHist1d::Size_Source::(2592x1944, 32FC1) 143.641   42.020      3.42 

Clang

               Name of Test                 base-clang patch-clang patch-clang
                                                                       vs     
                                                                   base-clang 
                                                                   (x-factor) 
calcHist1d::Size_Source::(2048x1536, 8UC1)    14.683     14.731       1.00    
calcHist1d::Size_Source::(2048x1536, 16UC1)   93.299     24.766       3.77    
calcHist1d::Size_Source::(2048x1536, 32FC1)   97.666     24.055       4.06    
calcHist1d::Size_Source::(2592x1944, 8UC1)    23.483     23.554       1.00    
calcHist1d::Size_Source::(2592x1944, 16UC1)  149.431     39.502       3.78    
calcHist1d::Size_Source::(2592x1944, 32FC1)  156.469     38.562       4.06
  • K1 vs. RK3568
               Name of Test                   rk   patch-gcc patch-clang patch-gcc  patch-clang
                                                                             vs         vs     
                                                                             rk         rk     
                                                                         (x-factor) (x-factor) 
calcHist1d::Size_Source::(2048x1536, 8UC1)  7.793   10.322     14.695       0.75       0.53    
calcHist1d::Size_Source::(2048x1536, 16UC1) 53.658  27.125     24.734       1.98       2.17    
calcHist1d::Size_Source::(2048x1536, 32FC1) 53.998  26.311     24.013       2.05       2.25    
calcHist1d::Size_Source::(2592x1944, 8UC1)  12.512  16.451     23.506       0.76       0.53    
calcHist1d::Size_Source::(2592x1944, 16UC1) 86.154  43.486     39.513       1.98       2.18    
calcHist1d::Size_Source::(2592x1944, 32FC1) 86.718  42.062     38.569       2.06       2.25 

@asmorkalov asmorkalov self-assigned this May 20, 2025
@asmorkalov asmorkalov merged commit 9b08167 into opencv:4.x May 21, 2025
23 of 28 checks passed
@fengyuentau fengyuentau deleted the 4x/hal/riscv_rvv/calcHist branch May 21, 2025 05:01
@asmorkalov asmorkalov mentioned this pull request May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants