@@ -1060,7 +1060,7 @@ CUDA_TEST_P(H264ToH265, Transcode)
1060
1060
INSTANTIATE_TEST_CASE_P (CUDA_Codec, H264ToH265, ALL_DEVICES);
1061
1061
1062
1062
CV_ENUM (YuvColorFormats, cudacodec::ColorFormat::NV_YUV444, cudacodec::ColorFormat::NV_YUV420_10BIT, cudacodec::ColorFormat::NV_YUV444_10BIT)
1063
- PARAM_TEST_CASE(YUVFormats, cv::cuda::DeviceInfo, YuvColorFormats)
1063
+ PARAM_TEST_CASE(YUVFormats, cv::cuda::DeviceInfo, YuvColorFormats, bool )
1064
1064
{
1065
1065
};
1066
1066
@@ -1069,6 +1069,7 @@ CUDA_TEST_P(YUVFormats, Transcode)
1069
1069
cv::cuda::setDevice (GET_PARAM (0 ).deviceID ());
1070
1070
const std::string inputFile = std::string (cvtest::TS::ptr ()->get_data_path ()) + " ../highgui/video/big_buck_bunny.h265" ;
1071
1071
const cv::cudacodec::ColorFormat writerColorFormat = static_cast <cudacodec::ColorFormat>(static_cast <int >(GET_PARAM (1 )));
1072
+ const bool fullRange = GET_PARAM (2 );
1072
1073
constexpr double fps = 25 ;
1073
1074
const cudacodec::Codec codec = cudacodec::Codec::HEVC;
1074
1075
const std::string ext = " .mp4" ;
@@ -1082,6 +1083,7 @@ CUDA_TEST_P(YUVFormats, Transcode)
1082
1083
cv::cudacodec::EncoderParams params;
1083
1084
params.tuningInfo = cv::cudacodec::EncodeTuningInfo::ENC_TUNING_INFO_LOSSLESS;
1084
1085
params.rateControlMode = cv::cudacodec::EncodeParamsRcMode::ENC_PARAMS_RC_CONSTQP;
1086
+ params.videoFullRangeFlag = fullRange;
1085
1087
for (int i = 0 ; i < nFrames; ++i) {
1086
1088
ASSERT_TRUE (cap.read (frame));
1087
1089
ASSERT_FALSE (frame.empty ());
@@ -1095,7 +1097,7 @@ CUDA_TEST_P(YUVFormats, Transcode)
1095
1097
yuvFormat = cudacodec::SurfaceFormat::SF_P016;
1096
1098
bitDepth = cudacodec::BitDepth::SIXTEEN;
1097
1099
}
1098
- generateTestImages (frame, yuv, bgr, yuvFormat, cudacodec::ColorFormat::BGR, bitDepth, false );
1100
+ generateTestImages (frame, yuv, bgr, yuvFormat, cudacodec::ColorFormat::BGR, bitDepth, false , fullRange );
1099
1101
bgrGs.push_back (bgr.clone ());
1100
1102
if (writer.empty ())
1101
1103
writer = cv::cudacodec::createVideoWriter (outputFile, frame.size (), codec, fps, writerColorFormat, params);
@@ -1119,7 +1121,7 @@ CUDA_TEST_P(YUVFormats, Transcode)
1119
1121
ASSERT_EQ (0 , remove (outputFile.c_str ()));
1120
1122
}
1121
1123
1122
- INSTANTIATE_TEST_CASE_P (CUDA_Codec, YUVFormats, testing::Combine(ALL_DEVICES, YuvColorFormats::all()));
1124
+ INSTANTIATE_TEST_CASE_P (CUDA_Codec, YUVFormats, testing::Combine(ALL_DEVICES, YuvColorFormats::all(), testing::Bool() ));
1123
1125
#endif
1124
1126
1125
1127
#if defined(HAVE_NVCUVENC)
0 commit comments