@@ -266,13 +266,14 @@ CUDA_TEST_P(DisplayResolution, Reader)
266266CUDA_TEST_P (Video, Reader)
267267{
268268 cv::cuda::setDevice (GET_PARAM (0 ).deviceID ());
269+ const std::string relativeFilePath = GET_PARAM (1 );
269270
270271 // CUDA demuxer has to fall back to ffmpeg to process "cv/video/768x576.avi"
271- if (GET_PARAM ( 1 ) == " cv/video/768x576.avi" && !videoio_registry::hasBackend (CAP_FFMPEG))
272+ if (relativeFilePath == " cv/video/768x576.avi" && !videoio_registry::hasBackend (CAP_FFMPEG))
272273 throw SkipTestException (" FFmpeg backend not found" );
273274
274- #ifdef _WIN32 // handle old FFmpeg backend
275- if (GET_PARAM ( 1 ) == " /cv/tracking/faceocc2/data/faceocc2.webm " )
275+ #ifdef _WIN32 // handle old FFmpeg backend - remove when windows shared library is updated
276+ if (relativeFilePath == " highgui/video/sample_322x242_15frames.yuv420p.mpeg2video.mp4 " || relativeFilePath == " highgui/video/sample_322x242_15frames.yuv420p.mjpeg.mp4 " )
276277 throw SkipTestException (" Feature not yet supported by Windows FFmpeg shared library!" );
277278#endif
278279
@@ -283,7 +284,7 @@ CUDA_TEST_P(Video, Reader)
283284 {cudacodec::ColorFormat::NV_NV12,1 }
284285 };
285286
286- std::string inputFile = std::string (cvtest::TS::ptr ()->get_data_path ()) + " ../" + GET_PARAM ( 1 ) ;
287+ std::string inputFile = std::string (cvtest::TS::ptr ()->get_data_path ()) + " ../" + relativeFilePath ;
287288 cv::Ptr<cv::cudacodec::VideoReader> reader = cv::cudacodec::createVideoReader (inputFile);
288289 ASSERT_FALSE (reader->set (cudacodec::ColorFormat::RGB));
289290 cv::cudacodec::FormatInfo fmt = reader->format ();
@@ -736,7 +737,7 @@ INSTANTIATE_TEST_CASE_P(CUDA_Codec, DisplayResolution, ALL_DEVICES);
736737#define VIDEO_SRC_R " highgui/video/big_buck_bunny.mp4" , " cv/video/768x576.avi" , " cv/video/1920x1080.avi" , " highgui/video/big_buck_bunny.avi" , \
737738 " highgui/video/big_buck_bunny.h264" , " highgui/video/big_buck_bunny.h265" , " highgui/video/big_buck_bunny.mpg" , \
738739 " highgui/video/sample_322x242_15frames.yuv420p.libvpx-vp9.mp4" , " highgui/video/sample_322x242_15frames.yuv420p.libaom-av1.mp4" , \
739- " cv/tracking/faceocc2/data/faceocc2.webm"
740+ " cv/tracking/faceocc2/data/faceocc2.webm" , " highgui/video/sample_322x242_15frames.yuv420p.mpeg2video.mp4 " , " highgui/video/sample_322x242_15frames.yuv420p.mjpeg.mp4 "
740741INSTANTIATE_TEST_CASE_P (CUDA_Codec, Video, testing::Combine(
741742 ALL_DEVICES,
742743 testing::Values (VIDEO_SRC_R)));
@@ -769,9 +770,11 @@ INSTANTIATE_TEST_CASE_P(CUDA_Codec, CheckExtraData, testing::Combine(
769770 ALL_DEVICES,
770771 testing::ValuesIn (check_extra_data_params)));
771772
773+ #define VIDEO_SRC_KEY " highgui/video/big_buck_bunny.mp4" , " cv/video/768x576.avi" , " cv/video/1920x1080.avi" , " highgui/video/big_buck_bunny.avi" , \
774+ " highgui/video/big_buck_bunny.h264" , " highgui/video/big_buck_bunny.h265" , " highgui/video/big_buck_bunny.mpg"
772775INSTANTIATE_TEST_CASE_P (CUDA_Codec, CheckKeyFrame, testing::Combine(
773776 ALL_DEVICES,
774- testing::Values (VIDEO_SRC_R )));
777+ testing::Values (VIDEO_SRC_KEY )));
775778
776779INSTANTIATE_TEST_CASE_P (CUDA_Codec, CheckParams, ALL_DEVICES);
777780
0 commit comments