Files
opencv-MIRROR/modules/imgproc/src/pyramids_avx512_vbmi.dispatch.cpp
Madan mohan Manokar 6b640b424c Merge pull request #28650 from amd:fast_pyrDown
imgproc: Optimized OpticalFlowPyrLK (PyrDownH) #28650

- Optimized Uchar PyrDown Horizontal processing intermediate storage.
- Improved horizontal processing with AVX512 vbmi ISA.
- Todo: further refinement for other archs.

### 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
- [ ] 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
2026-07-15 12:31:28 +03:00

45 lines
1.6 KiB
C++

// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
// Copyright (C) 2026, Advanced Micro Devices, Inc., all rights reserved.
#include "precomp.hpp"
#include "opencv2/core/hal/intrin.hpp"
#include "pyramids_avx512_vbmi.simd.hpp"
#include "pyramids_avx512_vbmi.simd_declarations.hpp" // defines CV_CPU_DISPATCH_MODES_ALL=AVX512_ICL,...,BASELINE
namespace cv {
// declared in pyramids.cpp
int PyrDownVecH_uchar_ushort_1_dispatch(const uchar* src, ushort* row, int width);
int PyrDownVecH_uchar_ushort_2_dispatch(const uchar* src, ushort* row, int width);
int PyrDownVecH_uchar_ushort_3_dispatch(const uchar* src, ushort* row, int width);
int PyrDownVecH_uchar_ushort_4_dispatch(const uchar* src, ushort* row, int width);
int PyrDownVecH_uchar_ushort_1_dispatch(const uchar* src, ushort* row, int width)
{
CV_CPU_DISPATCH(PyrDownVecH_uchar_ushort_1_vbmi, (src, row, width),
CV_CPU_DISPATCH_MODES_ALL);
}
int PyrDownVecH_uchar_ushort_2_dispatch(const uchar* src, ushort* row, int width)
{
CV_CPU_DISPATCH(PyrDownVecH_uchar_ushort_2_vbmi, (src, row, width),
CV_CPU_DISPATCH_MODES_ALL);
}
int PyrDownVecH_uchar_ushort_3_dispatch(const uchar* src, ushort* row, int width)
{
CV_CPU_DISPATCH(PyrDownVecH_uchar_ushort_3_vbmi, (src, row, width),
CV_CPU_DISPATCH_MODES_ALL);
}
int PyrDownVecH_uchar_ushort_4_dispatch(const uchar* src, ushort* row, int width)
{
CV_CPU_DISPATCH(PyrDownVecH_uchar_ushort_4_vbmi, (src, row, width),
CV_CPU_DISPATCH_MODES_ALL);
}
} // namespace cv