Skip to content

converted split() & merge() to wide univ intrinsics - #12044

Merged
vpisarev merged 3 commits into
opencv:3.4from
vpisarev:wide_split_merge_2
Jul 24, 2018
Merged

vpisarev merged 3 commits into
opencv:3.4from
vpisarev:wide_split_merge_2

Conversation

@vpisarev

@vpisarev vpisarev commented Jul 24, 2018 •

Copy link
Copy Markdown
Contributor

Also, fixed AVX2 implementation of v_load_deinterleave() and v_store_interleave() intrinsics, improved performance of SSE implementations of those intrinsics.

  • Performance results SSE4_2
  • Performance results AVX
force_builders=Custom
docker_image:Custom=powerpc64le

@vpisarev

Copy link
Copy Markdown
Contributor Author

perf data:

merge():

Geometric mean (ms)

                 Name of Test                   merge  merge  merge    merge      merge   
                                                ssse3   sse4   avx      sse4       avx    
                                                                         vs         vs    
                                                                       merge      merge   
                                                                       ssse3      ssse3   
                                                                     (x-factor) (x-factor)
Merge::OCL_MergeFixture::(640x480, CV_8U, 2)    0.739  0.751  0.755     0.98       0.98   
Merge::OCL_MergeFixture::(640x480, CV_8U, 3)    0.921  0.814  0.746     1.13       1.23   
Merge::OCL_MergeFixture::(640x480, CV_32F, 2)   0.768  0.662  0.607     1.16       1.27   
Merge::OCL_MergeFixture::(640x480, CV_32F, 3)   0.870  0.834  0.784     1.04       1.11   
Merge::OCL_MergeFixture::(1280x720, CV_8U, 2)   1.297  1.302  1.217     1.00       1.07   
Merge::OCL_MergeFixture::(1280x720, CV_8U, 3)   1.643  1.650  1.450     1.00       1.13   
Merge::OCL_MergeFixture::(1280x720, CV_32F, 2)  1.479  1.533  1.447     0.97       1.02   
Merge::OCL_MergeFixture::(1280x720, CV_32F, 3)  1.941  1.910  1.922     1.02       1.01   
Merge::OCL_MergeFixture::(1920x1080, CV_8U, 2)  2.568  2.347  2.344     1.09       1.10   
Merge::OCL_MergeFixture::(1920x1080, CV_8U, 3)  3.151  2.928  2.854     1.08       1.10   
Merge::OCL_MergeFixture::(1920x1080, CV_32F, 2) 2.682  2.545  2.590     1.05       1.04   
Merge::OCL_MergeFixture::(1920x1080, CV_32F, 3) 3.545  3.575  3.541     0.99       1.00   
Merge::OCL_MergeFixture::(3840x2160, CV_8U, 2)  7.734  7.642  7.650     1.01       1.01   
Merge::OCL_MergeFixture::(3840x2160, CV_8U, 3)  9.946  10.022 9.848     0.99       1.01   
Merge::OCL_MergeFixture::(3840x2160, CV_32F, 2) 8.664  8.786  8.608     0.99       1.01   
Merge::OCL_MergeFixture::(3840x2160, CV_32F, 3) 12.627 12.642 12.558    1.00       1.01

split():

Geometric mean (ms)

                 Name of Test                   split split split   split      split   
                                                ssse3 sse4   avx     sse4       avx    
                                                                      vs         vs    
                                                                    split      split   
                                                                    ssse3      ssse3   
                                                                  (x-factor) (x-factor)
Split::OCL_SplitFixture::(640x480, CV_8U, 2)    0.710 0.744 0.640    0.95       1.11   
Split::OCL_SplitFixture::(640x480, CV_8U, 3)    0.800 0.745 0.691    1.07       1.16   
Split::OCL_SplitFixture::(640x480, CV_32F, 2)   0.593 0.627 0.615    0.95       0.97   
Split::OCL_SplitFixture::(640x480, CV_32F, 3)   0.659 0.664 0.615    0.99       1.07   
Split::OCL_SplitFixture::(1280x720, CV_8U, 2)   1.227 1.237 1.127    0.99       1.09   
Split::OCL_SplitFixture::(1280x720, CV_8U, 3)   1.518 1.532 1.403    0.99       1.08   
Split::OCL_SplitFixture::(1280x720, CV_32F, 2)  1.323 1.337 1.164    0.99       1.14   
Split::OCL_SplitFixture::(1280x720, CV_32F, 3)  1.603 1.570 1.423    1.02       1.13   
Split::OCL_SplitFixture::(1920x1080, CV_8U, 2)  2.291 2.276 2.185    1.01       1.05   
Split::OCL_SplitFixture::(1920x1080, CV_8U, 3)  2.654 2.658 2.660    1.00       1.00   
Split::OCL_SplitFixture::(1920x1080, CV_32F, 2) 2.253 2.215 2.213    1.02       1.02   
Split::OCL_SplitFixture::(1920x1080, CV_32F, 3) 2.659 2.701 2.864    0.98       0.93   
Split::OCL_SplitFixture::(3840x2160, CV_8U, 2)  7.240 7.341 7.295    0.99       0.99   
Split::OCL_SplitFixture::(3840x2160, CV_8U, 3)  9.331 9.302 9.316    1.00       1.00   
Split::OCL_SplitFixture::(3840x2160, CV_32F, 2) 7.285 7.310 7.272    1.00       1.00   
Split::OCL_SplitFixture::(3840x2160, CV_32F, 3) 9.255 9.417 9.083    0.98       1.02

@vpisarev vpisarev self-assigned this Jul 24, 2018
@vpisarev

Copy link
Copy Markdown
Contributor Author

👍

@vpisarev
vpisarev merged commit 9c70408 into opencv:3.4 Jul 24, 2018
@alalek alalek mentioned this pull request Jul 24, 2018
AhiyaHiya pushed a commit to AhiyaHiya/opencv that referenced this pull request Aug 1, 2018
…master

* master: (1187 commits)
  converted split() & merge() to wide univ intrinsics (opencv#12044)
  More issues found by static analysis
  objdetect(qr): update test code
  dnn: update tests for OpenVINO models
  ts: add findDataDirectory() function
  Do not copy cv_cpu_helper.h to parent if OpenCV is a submodule
  Add a sample which tests OpenVINO models
  Fixed several issues found by static analysis tools
  Merge pull request opencv#12032 from Paul92:mser-sample-improvments
  use struct member width_set/height_set to replace static width/height.
  dnn(ocl): don't use getUMat() for long live objects
  fix build error on Visual Studio 2013   * replace binary literal prefix to hexadecimal literal prefix
  dnn, IE backend: updated to match new interface
  videoio: add routines to query information about backends API
  Run entire SSDs from TensorFlow using Intel's Inference Engine
  uint8 inputs for deep learning networks
  ts: fix PERF_TEST() macro to allow test_case name reusing
  core(test): remove verbose messages
  Enable debug assertions for static analysis builds
  AVI container: verbose error messages
  ...
@vpisarev
vpisarev deleted the wide_split_merge_2 branch September 12, 2018 12:23
SavyaSanchi-Sharma pushed a commit to SavyaSanchi-Sharma/opencv that referenced this pull request Jul 30, 2026
* fixed/updated v_load_deinterleave and v_store_interleave intrinsics; modified split() and merge() functions to use those intrinsics

* fixed a few compile errors and bug in v_load_deinterleave(ptr, v_uint32x4& a, v_uint32x4& b)

* fixed few more compile errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants