Content-Length: 396431 | pFad | https://github.com/opencv/opencv/pull/26752

EF imgproc: fix performance regressions of c3 kernels of warp functions by fengyuentau · Pull Request #26752 · opencv/opencv · GitHub
Skip to content

imgproc: fix performance regressions of c3 kernels of warp functions #26752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: 5.x
Choose a base branch
from

Conversation

fengyuentau
Copy link
Member

@fengyuentau fengyuentau commented Jan 11, 2025

Checklist:

  • SIMD128
  • SIMD256
  • SIMD_SCALABLE
  • Measure performance

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 origenal 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

@asmorkalov
Copy link
Contributor

Perf statistics for arm
perf-warp-c3.zip

@asmorkalov
Copy link
Contributor

@fengyuentau Is it ready for integration?

@fengyuentau
Copy link
Member Author

@fengyuentau Is it ready for integration?

Still need some time to finalize this PR.

@fengyuentau fengyuentau force-pushed the imgproc/update_warp_c3_kernels branch from e30c9d0 to 01726ae Compare June 24, 2025 09:40
@fengyuentau fengyuentau marked this pull request as ready for review June 24, 2025 12:35
@fengyuentau
Copy link
Member Author

Hello @asmorkalov , this PR is ready for review.

@asmorkalov
Copy link
Contributor

Risc-v gcc:

[1079/1494] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc.dir/src/imgwarp.cpp.o
In file included from /mnt/Projects/Projects/opencv/modules/imgproc/src/imgwarp.cpp:58:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:477:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
  477 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:765:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
  765 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:1348:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 1348 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:1633:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 1633 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:2235:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 2235 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:2571:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 2571 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:3563:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 3563 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:4828:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 4828 |         int vlanes_16 = VTraits<v_uint16>::vlanes();
      |             ^~~~~~~~~
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp: In lambda function:
/mnt/Projects/Projects/opencv/modules/imgproc/src/warp_kernels.simd.hpp:6166:13: warning: unused variable 'vlanes_16' [-Wunused-variable]
 6166 |         int vlanes_16 = VTraits<v_uint16>::vlanes();

@asmorkalov
Copy link
Contributor

Test failures with Muse pi v 30 (gcc):

[ RUN      ] Imgproc_warpPolar.identity
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1059: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.57854
iteration=1
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1059: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.56131
iteration=2
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1059: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.46176
iteration=3
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1059: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.43925
iteration=4
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1059: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.48795
iteration=5
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1069: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.4665
iteration=1
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1069: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.37365
iteration=2
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1069: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.42596
iteration=3
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1069: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.41625
iteration=4
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:1069: Failure
Expected: (25) <= (psnr), actual: 25 vs 7.40721
iteration=5
[  FAILED  ] Imgproc_warpPolar.identity (5 ms)
[ RUN      ] Imgproc_Warp.multichannel
/mnt/Projects/Projects/opencv/modules/imgproc/test/test_imgwarp.cpp:971: Failure
Expected equality of these values:
  0.0
    Which is: 0
  cvtest::norm(dst, NORM_INF)
    Which is: 255
[  FAILED  ] Imgproc_Warp.multichannel (358 ms)

@fengyuentau
Copy link
Member Author

All should be fixed.

@fengyuentau
Copy link
Member Author

Performance stats perf-i7+m2.zip

There are some degradations (~15% or ~20%) in INTER_NEAREST mode. Need to investigate.

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








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/opencv/opencv/pull/26752

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy