mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Merge pull request #25554 from savuor:rv/hal_lut
Merge pull request #25554 from savuor:rv/hal_lut HAL for LUT added #25554 ### 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:
parent
faa259ab34
commit
5bd64e09a3
@ -214,6 +214,32 @@ inline int hal_ni_not8u(const uchar *src_data, size_t src_step, uchar *dst_data,
|
||||
#define cv_hal_not8u hal_ni_not8u
|
||||
//! @endcond
|
||||
|
||||
/**
|
||||
Lookup table replacement
|
||||
Table consists of 256 elements of a size from 1 to 8 bytes having 1 channel or src_channels
|
||||
For 8s input type 128 is added to LUT index
|
||||
Destination should have the same element type and number of channels as lookup table elements
|
||||
@param src_data Source image data
|
||||
@param src_step Source image step
|
||||
@param src_type Sorce image type
|
||||
@param lut_data Pointer to lookup table
|
||||
@param lut_channel_size Size of each channel in bytes
|
||||
@param lut_channels Number of channels in lookup table
|
||||
@param dst_data Destination data
|
||||
@param dst_step Destination step
|
||||
@param width Width of images
|
||||
@param height Height of images
|
||||
@sa LUT
|
||||
*/
|
||||
//! @addtogroup core_hal_interface_lut Lookup table
|
||||
//! @{
|
||||
inline int hal_ni_lut(const uchar *src_data, size_t src_step, size_t src_type, const uchar* lut_data, size_t lut_channel_size, size_t lut_channels, uchar *dst_data, size_t dst_step, int width, int height) { return CV_HAL_ERROR_NOT_IMPLEMENTED; }
|
||||
//! @}
|
||||
|
||||
//! @cond IGNORED
|
||||
#define cv_hal_lut hal_ni_lut
|
||||
//! @endcond
|
||||
|
||||
/**
|
||||
Hamming norm of a vector
|
||||
@param a pointer to vector data
|
||||
|
@ -377,6 +377,9 @@ void cv::LUT( InputArray _src, InputArray _lut, OutputArray _dst )
|
||||
CV_OVX_RUN(!ovx::skipSmallImages<VX_KERNEL_TABLE_LOOKUP>(src.cols, src.rows),
|
||||
openvx_LUT(src, dst, lut))
|
||||
|
||||
CALL_HAL(LUT, cv_hal_lut, src.data, src.step, src.type(), lut.data,
|
||||
lut.elemSize1(), lutcn, dst.data, dst.step, src.rows, src.cols);
|
||||
|
||||
#if !IPP_DISABLE_PERF_LUT
|
||||
CV_IPP_RUN(_src.dims() <= 2, ipp_lut(src, lut, dst));
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user