@@ -281,15 +281,11 @@ CUDA_TEST_P(DisplayResolution, Reader)
281
281
CUDA_TEST_P (Video, Reader)
282
282
{
283
283
cv::cuda::setDevice (GET_PARAM (0 ).deviceID ());
284
+ const std::string relativeFilePath = GET_PARAM (1 );
284
285
285
286
// CUDA demuxer has to fall back to ffmpeg to process "cv/video/768x576.avi"
286
- if (GET_PARAM (1 ) == " cv/video/768x576.avi" && !videoio_registry::hasBackend (CAP_FFMPEG))
287
- throw SkipTestException (" FFmpeg backend not found" );
288
-
289
- #ifdef _WIN32 // handle old FFmpeg backend
290
- if (GET_PARAM (1 ) == " /cv/tracking/faceocc2/data/faceocc2.webm" )
291
- throw SkipTestException (" Feature not yet supported by Windows FFmpeg shared library!" );
292
- #endif
287
+ if (relativeFilePath == " cv/video/768x576.avi" && !videoio_registry::hasBackend (CAP_FFMPEG))
288
+ throw SkipTestException (" FFmpeg backend not found - SKIP" );
293
289
294
290
const std::vector<std::pair< cudacodec::ColorFormat, int >> formatsToChannels = {
295
291
{cudacodec::ColorFormat::GRAY,1 },
@@ -298,7 +294,7 @@ CUDA_TEST_P(Video, Reader)
298
294
{cudacodec::ColorFormat::NV_NV12,1 }
299
295
};
300
296
301
- std::string inputFile = std::string (cvtest::TS::ptr ()->get_data_path ()) + " ../" + GET_PARAM ( 1 ) ;
297
+ std::string inputFile = std::string (cvtest::TS::ptr ()->get_data_path ()) + " ../" + relativeFilePath ;
302
298
cv::Ptr<cv::cudacodec::VideoReader> reader = cv::cudacodec::createVideoReader (inputFile);
303
299
ASSERT_FALSE (reader->set (cudacodec::ColorFormat::RGB));
304
300
cv::cudacodec::FormatInfo fmt = reader->format ();
@@ -818,13 +814,20 @@ INSTANTIATE_TEST_CASE_P(CUDA_Codec, Scaling, testing::Combine(
818
814
819
815
INSTANTIATE_TEST_CASE_P (CUDA_Codec, DisplayResolution, ALL_DEVICES);
820
816
821
- #define VIDEO_SRC_R " highgui/video/big_buck_bunny.mp4" , " cv/video/768x576.avi" , " cv/video/1920x1080.avi" , " highgui/video/big_buck_bunny.avi" , \
817
+ #ifdef _WIN32 // handle old FFmpeg backend - remove when windows shared library is updated
818
+ #define VIDEO_SRC_R testing::Values (" highgui/video/big_buck_bunny.mp4" , " cv/video/768x576.avi" , " cv/video/1920x1080.avi" , " highgui/video/big_buck_bunny.avi" , \
822
819
" highgui/video/big_buck_bunny.h264" , " highgui/video/big_buck_bunny.h265" , " highgui/video/big_buck_bunny.mpg" , \
823
- " highgui/video/sample_322x242_15frames.yuv420p.libvpx-vp9.mp4" , " highgui/video/sample_322x242_15frames.yuv420p.libaom-av1.mp4" , \
824
- " cv/tracking/faceocc2/data/faceocc2.webm"
825
- INSTANTIATE_TEST_CASE_P (CUDA_Codec, Video, testing::Combine(
826
- ALL_DEVICES,
827
- testing::Values (VIDEO_SRC_R)));
820
+ " highgui/video/sample_322x242_15frames.yuv420p.libvpx-vp9.mp4" )
821
+ // , "highgui/video/sample_322x242_15frames.yuv420p.libaom-av1.mp4", \
822
+ "cv/tracking/faceocc2/data/faceocc2.webm")
823
+ #else
824
+ #define VIDEO_SRC_R testing::Values (" highgui/video/big_buck_bunny.mp4" , " cv/video/768x576.avi" , " cv/video/1920x1080.avi" , " highgui/video/big_buck_bunny.avi" , \
825
+ " highgui/video/big_buck_bunny.h264" , " highgui/video/big_buck_bunny.h265" , " highgui/video/big_buck_bunny.mpg" , \
826
+ " highgui/video/sample_322x242_15frames.yuv420p.libvpx-vp9.mp4" )
827
+ // , "highgui/video/sample_322x242_15frames.yuv420p.libaom-av1.mp4", \
828
+ "cv/tracking/faceocc2/data/faceocc2.webm", "highgui/video/sample_322x242_15frames.yuv420p.mpeg2video.mp4", "highgui/video/sample_322x242_15frames.yuv420p.mjpeg.mp4")
829
+ #endif
830
+ INSTANTIATE_TEST_CASE_P (CUDA_Codec, Video, testing::Combine(ALL_DEVICES,VIDEO_SRC_R));
828
831
829
832
const color_conversion_params_t color_conversion_params[] =
830
833
{
@@ -859,9 +862,11 @@ INSTANTIATE_TEST_CASE_P(CUDA_Codec, CheckExtraData, testing::Combine(
859
862
ALL_DEVICES,
860
863
testing::ValuesIn (check_extra_data_params)));
861
864
865
+ #define VIDEO_SRC_KEY " highgui/video/big_buck_bunny.mp4" , " cv/video/768x576.avi" , " cv/video/1920x1080.avi" , " highgui/video/big_buck_bunny.avi" , \
866
+ " highgui/video/big_buck_bunny.h264" , " highgui/video/big_buck_bunny.h265" , " highgui/video/big_buck_bunny.mpg"
862
867
INSTANTIATE_TEST_CASE_P (CUDA_Codec, CheckKeyFrame, testing::Combine(
863
868
ALL_DEVICES,
864
- testing::Values (VIDEO_SRC_R )));
869
+ testing::Values (VIDEO_SRC_KEY )));
865
870
866
871
INSTANTIATE_TEST_CASE_P (CUDA_Codec, CheckParams, ALL_DEVICES);
867
872
0 commit comments