Merge pull request #25491 from savuor:rv/hal_norm_hamming

HAL for Hamming norm added #25491

fixes #25474

### 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
- [x] The PR is proposed to the proper branch
- [x] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Rostislav Vasilikhin
2024-04-27 13:38:44 +02:00
committed by GitHub
parent 357b9abaef
commit 12e2cc9502
2 changed files with 36 additions and 0 deletions

View File

@@ -52,6 +52,9 @@ static const uchar popCountTable4[] =
int normHamming(const uchar* a, int n, int cellSize)
{
int output;
CALL_HAL_RET(normHamming8u, cv_hal_normHamming8u, output, a, n, cellSize);
if( cellSize == 1 )
return normHamming(a, n);
const uchar* tab = 0;
@@ -98,6 +101,9 @@ int normHamming(const uchar* a, int n, int cellSize)
int normHamming(const uchar* a, const uchar* b, int n, int cellSize)
{
int output;
CALL_HAL_RET(normHammingDiff8u, cv_hal_normHammingDiff8u, output, a, b, n, cellSize);
if( cellSize == 1 )
return normHamming(a, b, n);
const uchar* tab = 0;