case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH10:
{
- supportsProfile = true;
D3D12_VIDEO_ENCODER_PROFILE_DESC profDesc = {};
D3D12_VIDEO_ENCODER_PROFILE_H264 profH264 =
d3d12_video_encoder_convert_profile_to_d3d12_enc_profile_h264(profile);
uint32_t constraintset3flag = false;
d3d12_video_encoder_convert_from_d3d12_level_h264(maxLvlSettingH264, maxLvlSpec, constraintset3flag);
supportsProfile = true;
- }
- if (supportsProfile) {
DXGI_FORMAT encodeFormat = d3d12_convert_pipe_video_profile_to_dxgi_format(profile);
supportsProfile = supportsProfile &&
d3d12_video_encode_max_supported_resolution(codecDesc, maxRes, spD3D12VideoDevice.Get());
- supportsProfile = supportsProfile && d3d12_video_encode_max_supported_slices(codecDesc,
- maxRes,
- encodeFormat,
- maxSlices,
- spD3D12VideoDevice.Get(),
- d3d12_codec_support);
D3D12_VIDEO_ENCODER_PROFILE_DESC profile;
profile.pH264Profile = &profH264;
profile,
level,
spD3D12VideoDevice.Get());
+ if (supportedSliceStructures == PIPE_VIDEO_CAP_SLICE_STRUCTURE_NONE)
+ maxSlices = 0;
+ else
+ supportsProfile = supportsProfile && d3d12_video_encode_max_supported_slices(codecDesc,
+ maxRes,
+ encodeFormat,
+ maxSlices,
+ spD3D12VideoDevice.Get(),
+ d3d12_codec_support);
maxReferencesPerFrame =
d3d12_video_encode_supported_references_per_frame_structures(codecDesc,
profile,
case PIPE_VIDEO_PROFILE_HEVC_MAIN:
case PIPE_VIDEO_PROFILE_HEVC_MAIN_10:
{
- supportsProfile = true;
D3D12_VIDEO_ENCODER_PROFILE_DESC profDesc = {};
D3D12_VIDEO_ENCODER_PROFILE_HEVC profHEVC =
d3d12_video_encoder_convert_profile_to_d3d12_enc_profile_hevc(profile);
spD3D12VideoDevice.Get())) {
d3d12_video_encoder_convert_from_d3d12_level_hevc(maxLvlSettingHEVC.Level, maxLvlSpec);
supportsProfile = true;
- }
-
- if (supportsProfile) {
D3D12_VIDEO_ENCODER_PROFILE_DESC d3d12_profile;
d3d12_profile.pHEVCProfile = &profHEVC;
DXGI_FORMAT encodeFormat = d3d12_convert_pipe_video_profile_to_dxgi_format(profile);
supportsProfile = supportsProfile &&
d3d12_video_encode_max_supported_resolution(codecDesc, maxRes, spD3D12VideoDevice.Get());
- supportsProfile = supportsProfile && d3d12_video_encode_max_supported_slices(codecDesc,
+
+ if (supportedSliceStructures == PIPE_VIDEO_CAP_SLICE_STRUCTURE_NONE)
+ maxSlices = 0;
+ else
+ supportsProfile = supportsProfile && d3d12_video_encode_max_supported_slices(codecDesc,
maxRes,
encodeFormat,
maxSlices,