Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions hal/ipp/src/warp_ipp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ int ipp_hal_warpPerspective(int src_type, const uchar *src_data, size_t src_step
::ipp::IwiImage iwDst(IwiSize{dst_width, dst_height}, ippiGetDataType(src_type), CV_MAT_CN(src_type), IwiBorderSize(), dst_data, IwSize(dst_step));
::ipp::IwiBorderType ippBorder(ippiGetBorderType(borderType), {borderValue, 4});
IwTransDirection iwTransDirection = iwTransInverse; //fixed for IPP
// This is the workaround for the ICV issue
// TODO: remove the workaround when the issue is gone
const IppiRect localRectInfinite = {IPP_MIN_32S / 2, IPP_MIN_32S / 2, IPP_MAX_32S, IPP_MAX_32S};
if ((int)ippBorder == -1)
{
return CV_HAL_ERROR_NOT_IMPLEMENTED;
Expand All @@ -296,7 +299,7 @@ int ipp_hal_warpPerspective(int src_type, const uchar *src_data, size_t src_step
// The function is exception safe and sets the 'ok' flag to false if any exception occurs during processing.
// The 'ok' flag is checked before and after parallel processing to determine
// if the operation was successful or if it should fall back to a non-IPP implementation.
auto IPPWarpPerspectiveInvokerLambda = [&iwSrc, &iwDst, dst_width, ippInter, &coeffs, ippBorder, iwTransDirection, &ok](const cv::Range& range)
auto IPPWarpPerspectiveInvokerLambda = [&iwSrc, &iwDst, dst_width, ippInter, &coeffs, ippBorder, iwTransDirection, localRectInfinite, &ok](const cv::Range& range)
{
//CV_INSTRUMENT_REGION_IPP();
if (!ok.load(std::memory_order_relaxed))
Expand All @@ -307,7 +310,7 @@ int ipp_hal_warpPerspective(int src_type, const uchar *src_data, size_t src_step
try
{
::ipp::IwiTile tile = ::ipp::IwiRoi(0, range.start, dst_width, range.end - range.start);
CV_INSTRUMENT_FUN_IPP(::ipp::iwiWarpPerspective, iwSrc, iwDst, ippRectInfinite, coeffs, iwTransDirection, ippInter, ::ipp::IwiWarpPerspectiveParams(), ippBorder, tile);
CV_INSTRUMENT_FUN_IPP(::ipp::iwiWarpPerspective, iwSrc, iwDst, localRectInfinite, coeffs, iwTransDirection, ippInter, ::ipp::IwiWarpPerspectiveParams(), ippBorder, tile);
}
catch (const ::ipp::IwException &)
{
Expand All @@ -327,7 +330,7 @@ int ipp_hal_warpPerspective(int src_type, const uchar *src_data, size_t src_step
}
else
{
CV_INSTRUMENT_FUN_IPP(::ipp::iwiWarpPerspective, iwSrc, iwDst, ippRectInfinite, coeffs, iwTransDirection, ippInter, ::ipp::IwiWarpPerspectiveParams(), ippBorder);
CV_INSTRUMENT_FUN_IPP(::ipp::iwiWarpPerspective, iwSrc, iwDst, localRectInfinite, coeffs, iwTransDirection, ippInter, ::ipp::IwiWarpPerspectiveParams(), ippBorder);
}

if (!ok)
Expand Down