Skip to content

Commit

Permalink
Code review fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
asmorkalov committed May 8, 2024
1 parent 5efb920 commit 6a4c934
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
9 changes: 4 additions & 5 deletions modules/core/src/hal_replacement.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,24 +221,23 @@ 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_channels Number of channels in source image
@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_lut8u(const uchar *src_data, size_t src_step, size_t src_channels, 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; }
inline int hal_ni_lut8s(const schar *src_data, size_t src_step, size_t src_channels, 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; }
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_lut8u hal_ni_lut8u
#define cv_hal_lut8s hal_ni_lut8s
#define cv_hal_lut hal_ni_lut
//! @endcond

/**
Expand Down
12 changes: 2 additions & 10 deletions modules/core/src/lut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,16 +377,8 @@ 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))

if (depth == CV_8U)
{
CALL_HAL(lut8u, cv_hal_lut8u, src.data, src.step, cn, lut.data, lut.elemSize1(), lutcn,
dst.data, dst.step, src.rows, src.cols);
}
else if (depth == CV_8S)
{
CALL_HAL(lut8s, cv_hal_lut8s, (const schar*)src.data, src.step, cn, lut.data, lut.elemSize1(), lutcn,
dst.data, dst.step, src.rows, src.cols);
}
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));
Expand Down

0 comments on commit 6a4c934

Please sign in to comment.