From 8d07e92b2c61ef1b0754655cec1f800900858de5 Mon Sep 17 00:00:00 2001 From: Vladislav Vinogradov Date: Thu, 4 Oct 2012 13:33:47 +0400 Subject: [PATCH] disabled NPP resize for 8uc4+Cubic (Bug #2388) --- modules/gpu/src/resize.cpp | 2 +- modules/gpu/test/test_resize.cpp | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/gpu/src/resize.cpp b/modules/gpu/src/resize.cpp index edf2fc814..3da1a8d70 100644 --- a/modules/gpu/src/resize.cpp +++ b/modules/gpu/src/resize.cpp @@ -102,7 +102,7 @@ void cv::gpu::resize(const GpuMat& src, GpuMat& dst, Size dsize, double fx, doub src.locateROI(wholeSize, ofs); bool useNpp = (src.type() == CV_8UC1 || src.type() == CV_8UC4); - useNpp = useNpp && (interpolation == INTER_NEAREST || interpolation == INTER_LINEAR || (src.type() == CV_8UC4 && interpolation != INTER_AREA)); + useNpp = useNpp && (interpolation == INTER_NEAREST || interpolation == INTER_LINEAR); if (useNpp) { diff --git a/modules/gpu/test/test_resize.cpp b/modules/gpu/test/test_resize.cpp index 73b8d9fab..8be1a5d17 100644 --- a/modules/gpu/test/test_resize.cpp +++ b/modules/gpu/test/test_resize.cpp @@ -226,10 +226,8 @@ PARAM_TEST_CASE(ResizeNPP, cv::gpu::DeviceInfo, MatType, double, Interpolation) TEST_P(ResizeNPP, Accuracy) { - if (type == CV_8UC1 && interpolation == cv::INTER_CUBIC) - return; - cv::Mat src = readImageType("stereobp/aloe-L.png", type); + ASSERT_FALSE(src.empty()); cv::gpu::GpuMat dst; cv::gpu::resize(loadMat(src), dst, cv::Size(), coeff, coeff, interpolation); @@ -244,6 +242,6 @@ INSTANTIATE_TEST_CASE_P(GPU_ImgProc, ResizeNPP, testing::Combine( ALL_DEVICES, testing::Values(MatType(CV_8UC1), MatType(CV_8UC4)), testing::Values(0.3, 0.5, 1.5, 2.0), - testing::Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR), Interpolation(cv::INTER_CUBIC)))); + testing::Values(Interpolation(cv::INTER_NEAREST), Interpolation(cv::INTER_LINEAR)))); #endif // HAVE_CUDA