refactored gpu::LUT function:
* converted it to Algorithm, because implementation uses inner buffers and requires preprocessing step * new implementation splits preprocessing and transform, what is more effecient * old API still can be used for source compatibility (marked as deprecated)
This commit is contained in:
@@ -224,10 +224,12 @@ PERF_TEST_P(Sz_Type, LutOneChannel,
|
||||
|
||||
if (PERF_RUN_GPU())
|
||||
{
|
||||
cv::Ptr<cv::gpu::LookUpTable> lutAlg = cv::gpu::createLookUpTable(lut);
|
||||
|
||||
const cv::gpu::GpuMat d_src(src);
|
||||
cv::gpu::GpuMat dst;
|
||||
|
||||
TEST_CYCLE() cv::gpu::LUT(d_src, lut, dst);
|
||||
TEST_CYCLE() lutAlg->transform(d_src, dst);
|
||||
|
||||
GPU_SANITY_CHECK(dst);
|
||||
}
|
||||
@@ -259,10 +261,12 @@ PERF_TEST_P(Sz_Type, LutMultiChannel,
|
||||
|
||||
if (PERF_RUN_GPU())
|
||||
{
|
||||
cv::Ptr<cv::gpu::LookUpTable> lutAlg = cv::gpu::createLookUpTable(lut);
|
||||
|
||||
const cv::gpu::GpuMat d_src(src);
|
||||
cv::gpu::GpuMat dst;
|
||||
|
||||
TEST_CYCLE() cv::gpu::LUT(d_src, lut, dst);
|
||||
TEST_CYCLE() lutAlg->transform(d_src, dst);
|
||||
|
||||
GPU_SANITY_CHECK(dst);
|
||||
}
|
||||
|
Reference in New Issue
Block a user