AV1 support

This commit is contained in:
Patrick Nicolas
2024-08-31 22:07:56 +02:00
parent 8b611ee609
commit 7a42691269
11 changed files with 24 additions and 125 deletions
+7
View File
@@ -128,6 +128,8 @@ static auto encode_guid(video_codec codec)
return NV_ENC_CODEC_H264_GUID;
case h265:
return NV_ENC_CODEC_HEVC_GUID;
case av1:
throw std::runtime_error("AV1 not implemented on nvenc");
}
throw std::out_of_range("Invalid codec " + std::to_string(codec));
}
@@ -170,6 +172,9 @@ VideoEncoderNvenc::VideoEncoderNvenc(wivrn_vk_bundle & vk, encoder_settings & se
case video_codec::h265:
printf("%d HEVC presets\n", count);
break;
case video_codec::av1:
break;
}
for (GUID & i: presets)
@@ -216,6 +221,8 @@ VideoEncoderNvenc::VideoEncoderNvenc(wivrn_vk_bundle & vk, encoder_settings & se
params.encodeCodecConfig.hevcConfig.idrPeriod = NVENC_INFINITE_GOPLENGTH;
params.encodeCodecConfig.hevcConfig.hevcVUIParameters.videoFullRangeFlag = 1;
break;
case video_codec::av1:
break;
}
settings.range = VK_SAMPLER_YCBCR_RANGE_ITU_FULL;
settings.color_model = VK_SAMPLER_YCBCR_MODEL_CONVERSION_YCBCR_709;