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:
Vladislav Vinogradov
2013-04-26 12:39:02 +04:00
parent 0c50d0821f
commit 539f367d0b
4 changed files with 234 additions and 80 deletions

View File

@@ -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);
}