67 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NONE,
68 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8,
69 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_32x32,
70 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4,
71 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32,
76 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NONE,
77 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8,
78 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_32x32,
79 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4,
80 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32,
85 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NONE,
86 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8,
87 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_32x32,
88 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4,
89 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32,
94 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NONE,
95 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8,
96 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_64x64,
97 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4,
98 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32,
103 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_NONE,
104 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8,
105 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_64x64,
106 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4,
107 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32,
114 { 30, D3D12_VIDEO_ENCODER_LEVELS_HEVC_1 },
115 { 60, D3D12_VIDEO_ENCODER_LEVELS_HEVC_2 },
116 { 63, D3D12_VIDEO_ENCODER_LEVELS_HEVC_21 },
117 { 90, D3D12_VIDEO_ENCODER_LEVELS_HEVC_3 },
118 { 93, D3D12_VIDEO_ENCODER_LEVELS_HEVC_31 },
119 { 120, D3D12_VIDEO_ENCODER_LEVELS_HEVC_4 },
120 { 123, D3D12_VIDEO_ENCODER_LEVELS_HEVC_41 },
121 { 150, D3D12_VIDEO_ENCODER_LEVELS_HEVC_5 },
122 { 153, D3D12_VIDEO_ENCODER_LEVELS_HEVC_51 },
123 { 156, D3D12_VIDEO_ENCODER_LEVELS_HEVC_52 },
124 { 180, D3D12_VIDEO_ENCODER_LEVELS_HEVC_6 },
125 { 183, D3D12_VIDEO_ENCODER_LEVELS_HEVC_61 },
126 { 186, D3D12_VIDEO_ENCODER_LEVELS_HEVC_62 },
129 static const D3D12_VIDEO_ENCODER_PROFILE_HEVC
profile_main = D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN;
130 static const D3D12_VIDEO_ENCODER_PROFILE_HEVC
profile_main10 = D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN10;
132 #define D3D_PROFILE_DESC(name) \
133 { sizeof(D3D12_VIDEO_ENCODER_PROFILE_HEVC), { .pHEVCProfile = (D3D12_VIDEO_ENCODER_PROFILE_HEVC *)&profile_ ## name } }
143 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_8x8:
return 8;
144 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_16x16:
return 16;
145 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_32x32:
return 32;
146 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_CUSIZE_64x64:
return 64;
155 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_4x4:
return 4;
156 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_8x8:
return 8;
157 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_16x16:
return 16;
158 case D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_TUSIZE_32x32:
return 32;
165 char *
data,
size_t *data_len,
179 "%zu < %zu.\n", *data_len,
201 "type = %d.\n",
header->nal_unit_type);
209 char *
data,
size_t *data_len)
245 D3D12_VIDEO_ENCODER_PROFILE_HEVC
profile = D3D12_VIDEO_ENCODER_PROFILE_HEVC_MAIN;
246 D3D12_VIDEO_ENCODER_LEVEL_TIER_CONSTRAINTS_HEVC
level = { 0 };
248 uint8_t min_cu_size, max_cu_size, min_tu_size, max_tu_size;
253 D3D12_FEATURE_DATA_VIDEO_ENCODER_SUPPORT support = {
255 .Codec = D3D12_VIDEO_ENCODER_CODEC_HEVC,
256 .InputFormat = hwctx->
format,
257 .RateControl =
ctx->rc,
258 .IntraRefresh = D3D12_VIDEO_ENCODER_INTRA_REFRESH_MODE_NONE,
259 .SubregionFrameEncoding = D3D12_VIDEO_ENCODER_FRAME_SUBREGION_LAYOUT_MODE_FULL_FRAME,
260 .ResolutionsListCount = 1,
261 .pResolutionList = &
ctx->resolution,
262 .CodecGopSequence =
ctx->gop,
264 .CodecConfiguration =
ctx->codec_conf,
265 .SuggestedProfile.DataSize =
sizeof(D3D12_VIDEO_ENCODER_PROFILE_HEVC),
266 .SuggestedProfile.pHEVCProfile = &
profile,
267 .SuggestedLevel.DataSize =
sizeof(D3D12_VIDEO_ENCODER_LEVEL_TIER_CONSTRAINTS_HEVC),
268 .SuggestedLevel.pHEVCLevelSetting = &
level,
269 .pResolutionDependentSupport = &
ctx->res_limits,
272 hr = ID3D12VideoDevice3_CheckFeatureSupport(
ctx->video_device3, D3D12_FEATURE_VIDEO_ENCODER_SUPPORT,
273 &support,
sizeof(support));
280 if (!(support.SupportFlags & D3D12_VIDEO_ENCODER_SUPPORT_FLAG_GENERAL_SUPPORT_OK)) {
282 support.ValidationFlags);
286 if (support.SupportFlags & D3D12_VIDEO_ENCODER_SUPPORT_FLAG_RECONSTRUCTED_FRAMES_REQUIRE_TEXTURE_ARRAYS) {
287 av_log(avctx,
AV_LOG_ERROR,
"D3D12 video encode on this device requires texture array support, "
288 "but it's not implemented.\n");
292 memset(
vps, 0,
sizeof(*
vps));
293 memset(
sps, 0,
sizeof(*
sps));
294 memset(
pps, 0,
sizeof(*
pps));
298 if (
desc->nb_components == 1) {
301 if (
desc->log2_chroma_w == 1 &&
desc->log2_chroma_h == 1) {
303 }
else if (
desc->log2_chroma_w == 1 &&
desc->log2_chroma_h == 0) {
305 }
else if (
desc->log2_chroma_w == 0 &&
desc->log2_chroma_h == 0) {
309 "%s is not supported.\n",
desc->name);
325 .nuh_temporal_id_plus1 = 1,
328 vps->vps_video_parameter_set_id = 0;
330 vps->vps_base_layer_internal_flag = 1;
331 vps->vps_base_layer_available_flag = 1;
332 vps->vps_max_layers_minus1 = 0;
333 vps->vps_max_sub_layers_minus1 = 0;
334 vps->vps_temporal_id_nesting_flag = 1;
368 1, 1, 1, (base_ctx->
b_per_p > 0) + 1);
374 "any normal level; using level 8.5.\n");
382 vps->vps_sub_layer_ordering_info_present_flag = 0;
383 vps->vps_max_dec_pic_buffering_minus1[0] = base_ctx->
max_b_depth + 1;
385 vps->vps_max_latency_increase_plus1[0] = 0;
387 vps->vps_max_layer_id = 0;
388 vps->vps_num_layer_sets_minus1 = 0;
389 vps->layer_id_included_flag[0][0] = 1;
391 vps->vps_timing_info_present_flag = 1;
395 vps->vps_poc_proportional_to_timing_flag = 1;
396 vps->vps_num_ticks_poc_diff_one_minus1 = 0;
400 vps->vps_poc_proportional_to_timing_flag = 0;
402 vps->vps_num_hrd_parameters = 0;
409 .nuh_temporal_id_plus1 = 1,
412 sps->sps_video_parameter_set_id =
vps->vps_video_parameter_set_id;
414 sps->sps_max_sub_layers_minus1 =
vps->vps_max_sub_layers_minus1;
415 sps->sps_temporal_id_nesting_flag =
vps->vps_temporal_id_nesting_flag;
417 sps->profile_tier_level =
vps->profile_tier_level;
419 sps->sps_seq_parameter_set_id = 0;
421 sps->chroma_format_idc = chroma_format;
422 sps->separate_colour_plane_flag = 0;
424 av_assert0(
ctx->res_limits.SubregionBlockPixelsSize % min_cu_size == 0);
427 ctx->res_limits.SubregionBlockPixelsSize);
429 ctx->res_limits.SubregionBlockPixelsSize);
431 if (avctx->
width !=
sps->pic_width_in_luma_samples ||
432 avctx->
height !=
sps->pic_height_in_luma_samples) {
433 sps->conformance_window_flag = 1;
434 sps->conf_win_left_offset = 0;
435 sps->conf_win_right_offset =
436 (
sps->pic_width_in_luma_samples - avctx->
width) >>
desc->log2_chroma_w;
437 sps->conf_win_top_offset = 0;
438 sps->conf_win_bottom_offset =
439 (
sps->pic_height_in_luma_samples - avctx->
height) >>
desc->log2_chroma_h;
441 sps->conformance_window_flag = 0;
447 sps->log2_max_pic_order_cnt_lsb_minus4 =
ctx->gop.pHEVCGroupOfPictures->log2_max_pic_order_cnt_lsb_minus4;
449 sps->sps_sub_layer_ordering_info_present_flag =
450 vps->vps_sub_layer_ordering_info_present_flag;
451 for (
i = 0;
i <=
sps->sps_max_sub_layers_minus1;
i++) {
452 sps->sps_max_dec_pic_buffering_minus1[
i] =
453 vps->vps_max_dec_pic_buffering_minus1[
i];
454 sps->sps_max_num_reorder_pics[
i] =
455 vps->vps_max_num_reorder_pics[
i];
456 sps->sps_max_latency_increase_plus1[
i] =
457 vps->vps_max_latency_increase_plus1[
i];
460 sps->log2_min_luma_coding_block_size_minus3 = (uint8_t)(
av_log2(min_cu_size) - 3);
461 sps->log2_diff_max_min_luma_coding_block_size = (uint8_t)(
av_log2(max_cu_size) -
av_log2(min_cu_size));
462 sps->log2_min_luma_transform_block_size_minus2 = (uint8_t)(
av_log2(min_tu_size) - 2);
463 sps->log2_diff_max_min_luma_transform_block_size = (uint8_t)(
av_log2(max_tu_size) -
av_log2(min_tu_size));
465 sps->max_transform_hierarchy_depth_inter =
ctx->codec_conf.pHEVCConfig->max_transform_hierarchy_depth_inter;
466 sps->max_transform_hierarchy_depth_intra =
ctx->codec_conf.pHEVCConfig->max_transform_hierarchy_depth_intra;
468 sps->amp_enabled_flag = !!(
ctx->codec_conf.pHEVCConfig->ConfigurationFlags &
469 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_USE_ASYMETRIC_MOTION_PARTITION);
470 sps->sample_adaptive_offset_enabled_flag = !!(
ctx->codec_conf.pHEVCConfig->ConfigurationFlags &
471 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_SAO_FILTER);
472 sps->sps_temporal_mvp_enabled_flag = 0;
473 sps->pcm_enabled_flag = 0;
475 sps->vui_parameters_present_flag = 1;
539 .nuh_temporal_id_plus1 = 1,
542 pps->pps_pic_parameter_set_id = 0;
543 pps->pps_seq_parameter_set_id =
sps->sps_seq_parameter_set_id;
545 pps->cabac_init_present_flag = 1;
547 pps->num_ref_idx_l0_default_active_minus1 = 0;
548 pps->num_ref_idx_l1_default_active_minus1 = 0;
550 pps->init_qp_minus26 = 0;
552 pps->transform_skip_enabled_flag = !!(
ctx->codec_conf.pHEVCConfig->ConfigurationFlags &
553 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_TRANSFORM_SKIPPING);
556 pps->cu_qp_delta_enabled_flag = 1;
558 pps->diff_cu_qp_delta_depth = 0;
560 pps->pps_slice_chroma_qp_offsets_present_flag = 1;
562 pps->tiles_enabled_flag = 0;
564 pps->pps_loop_filter_across_slices_enabled_flag = !(
ctx->codec_conf.pHEVCConfig->ConfigurationFlags &
565 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_DISABLE_LOOP_FILTER_ACROSS_SLICES);
566 pps->deblocking_filter_control_present_flag = 1;
575 uint8_t min_cu_size, max_cu_size;
578 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC *
config;
579 D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC hevc_caps;
581 D3D12_FEATURE_DATA_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT codec_caps = {
583 .Codec = D3D12_VIDEO_ENCODER_CODEC_HEVC,
584 .Profile =
ctx->profile->d3d12_profile,
585 .CodecSupportLimits.DataSize =
sizeof(D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC),
590 codec_caps.CodecSupportLimits.pHEVCSupport = &hevc_caps;
591 hr = ID3D12VideoDevice3_CheckFeatureSupport(
ctx->video_device3, D3D12_FEATURE_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT,
592 &codec_caps,
sizeof(codec_caps));
593 if (SUCCEEDED(hr) && codec_caps.IsSupported)
602 ctx->codec_conf.DataSize =
sizeof(D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC);
604 if (!
ctx->codec_conf.pHEVCConfig)
609 config->ConfigurationFlags = D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_NONE;
610 config->MinLumaCodingUnitSize = hevc_caps.MinLumaCodingUnitSize;
611 config->MaxLumaCodingUnitSize = hevc_caps.MaxLumaCodingUnitSize;
612 config->MinLumaTransformUnitSize = hevc_caps.MinLumaTransformUnitSize;
613 config->MaxLumaTransformUnitSize = hevc_caps.MaxLumaTransformUnitSize;
614 config->max_transform_hierarchy_depth_inter = hevc_caps.max_transform_hierarchy_depth_inter;
615 config->max_transform_hierarchy_depth_intra = hevc_caps.max_transform_hierarchy_depth_intra;
617 if (hevc_caps.SupportFlags & D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_ASYMETRIC_MOTION_PARTITION_SUPPORT ||
618 hevc_caps.SupportFlags & D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_ASYMETRIC_MOTION_PARTITION_REQUIRED)
619 config->ConfigurationFlags |= D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_USE_ASYMETRIC_MOTION_PARTITION;
621 if (hevc_caps.SupportFlags & D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_SAO_FILTER_SUPPORT)
622 config->ConfigurationFlags |= D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_SAO_FILTER;
624 if (hevc_caps.SupportFlags & D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_DISABLING_LOOP_FILTER_ACROSS_SLICES_SUPPORT)
625 config->ConfigurationFlags |= D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_DISABLE_LOOP_FILTER_ACROSS_SLICES;
627 if (hevc_caps.SupportFlags & D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_TRANSFORM_SKIP_SUPPORT)
628 config->ConfigurationFlags |= D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_HEVC_FLAG_ENABLE_TRANSFORM_SKIPPING;
630 if (hevc_caps.SupportFlags & D3D12_VIDEO_ENCODER_CODEC_CONFIGURATION_SUPPORT_HEVC_FLAG_P_FRAMES_IMPLEMENTED_AS_LOW_DELAY_B_FRAMES)
631 ctx->bi_not_empty = 1;
638 "min CB size %dx%d.\n", max_cu_size, max_cu_size,
639 min_cu_size, min_cu_size);
652 int fixed_qp_idr, fixed_qp_p, fixed_qp_b;
660 if (
ctx->rc.Mode == D3D12_VIDEO_ENCODER_RATE_CONTROL_MODE_CQP) {
661 D3D12_VIDEO_ENCODER_RATE_CONTROL_CQP *cqp_ctl;
667 fixed_qp_idr = fixed_qp_p;
672 fixed_qp_b = fixed_qp_p;
675 "%d / %d / %d for IDR- / P- / B-frames.\n",
676 fixed_qp_idr, fixed_qp_p, fixed_qp_b);
678 ctx->rc.ConfigParams.DataSize =
sizeof(D3D12_VIDEO_ENCODER_RATE_CONTROL_CQP);
683 cqp_ctl->ConstantQP_FullIntracodedFrame = fixed_qp_idr;
684 cqp_ctl->ConstantQP_InterPredictedFrame_PrevRefOnly = fixed_qp_p;
685 cqp_ctl->ConstantQP_InterPredictedFrame_BiDirectionalRef = fixed_qp_b;
687 ctx->rc.ConfigParams.pConfiguration_CQP = cqp_ctl;
691 ctx->gop.DataSize =
sizeof(D3D12_VIDEO_ENCODER_SEQUENCE_GOP_STRUCTURE_HEVC);
693 if (!
ctx->gop.pHEVCGroupOfPictures)
696 ctx->gop.pHEVCGroupOfPictures->GOPLength = base_ctx->
gop_size;
697 ctx->gop.pHEVCGroupOfPictures->PPicturePeriod = base_ctx->
b_per_p + 1;
700 ctx->gop.pHEVCGroupOfPictures->log2_max_pic_order_cnt_lsb_minus4 =
703 ctx->gop.pHEVCGroupOfPictures->log2_max_pic_order_cnt_lsb_minus4 =
715 ctx->level.DataSize =
sizeof(D3D12_VIDEO_ENCODER_LEVEL_TIER_CONSTRAINTS_HEVC);
717 if (!
ctx->level.pHEVCLevelSetting)
733 D3D12_VIDEO_ENCODER_TIER_HEVC_MAIN :
734 D3D12_VIDEO_ENCODER_TIER_HEVC_HIGH;
741 if (!pic->
pic_ctl.pHEVCPicData)
746 av_freep(&pic->
pic_ctl.pHEVCPicData->pReferenceFramesReconPictureDescriptors);
757 D3D12_VIDEO_ENCODER_REFERENCE_PICTURE_DESCRIPTOR_HEVC *pd =
NULL;
758 UINT *ref_list0 =
NULL, *ref_list1 =
NULL;
761 pic->
pic_ctl.DataSize =
sizeof(D3D12_VIDEO_ENCODER_PICTURE_CONTROL_CODEC_DATA_HEVC);
763 if (!pic->
pic_ctl.pHEVCPicData)
775 switch(base_pic->
type) {
777 pic->
pic_ctl.pHEVCPicData->FrameType = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_IDR_FRAME;
780 pic->
pic_ctl.pHEVCPicData->FrameType = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_I_FRAME;
783 pic->
pic_ctl.pHEVCPicData->FrameType = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_P_FRAME;
786 pic->
pic_ctl.pHEVCPicData->FrameType = D3D12_VIDEO_ENCODER_FRAME_TYPE_HEVC_B_FRAME;
792 pic->
pic_ctl.pHEVCPicData->slice_pic_parameter_set_id = 0;
804 pic->
pic_ctl.pHEVCPicData->List0ReferenceFramesCount = base_pic->
nb_refs[0];
810 href =
ref->codec_priv;
813 pd[idx].ReconstructedPictureResourceIndex = idx;
814 pd[idx].IsRefUsedByCurrentPic = TRUE;
825 pic->
pic_ctl.pHEVCPicData->List1ReferenceFramesCount = base_pic->
nb_refs[1];
831 href =
ref->codec_priv;
834 pd[idx].ReconstructedPictureResourceIndex = idx;
835 pd[idx].IsRefUsedByCurrentPic = TRUE;
841 pic->
pic_ctl.pHEVCPicData->pList0ReferenceFrames = ref_list0;
842 pic->
pic_ctl.pHEVCPicData->pList1ReferenceFrames = ref_list1;
843 pic->
pic_ctl.pHEVCPicData->ReferenceFramesReconPictureDescriptorsCount = idx;
844 pic->
pic_ctl.pHEVCPicData->pReferenceFramesReconPictureDescriptors = pd;
852 .d3d12_codec = D3D12_VIDEO_ENCODER_CODEC_HEVC,
858 .default_quality = 25,
891 "in 8-bit unsigned integer.\n", avctx->
level);
896 ctx->explicit_qp = priv->
qp;
915 #define OFFSET(x) offsetof(D3D12VAEncodeHEVCContext, x)
916 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
921 {
"qp",
"Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
924 {
"profile",
"Set profile (general_profile_idc)",
928 #define PROFILE(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, \
929 { .i64 = value }, 0, 0, FLAGS, "profile"
934 {
"tier",
"Set tier (general_tier_flag)",
936 { .i64 = 0 }, 0, 1,
FLAGS,
"tier" },
938 { .i64 = 0 }, 0, 0,
FLAGS,
"tier" },
940 { .i64 = 1 }, 0, 0,
FLAGS,
"tier" },
942 {
"level",
"Set level (general_level_idc)",
946 #define LEVEL(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, \
947 { .i64 = value }, 0, 0, FLAGS, "level"
950 {
LEVEL(
"2.1", 63) },
952 {
LEVEL(
"3.1", 93) },
954 {
LEVEL(
"4.1", 123) },
956 {
LEVEL(
"5.1", 153) },
957 {
LEVEL(
"5.2", 156) },
959 {
LEVEL(
"6.1", 183) },
960 {
LEVEL(
"6.2", 186) },
970 {
"i_qfactor",
"1" },
971 {
"i_qoffset",
"0" },
972 {
"b_qfactor",
"1" },
973 {
"b_qoffset",
"0" },
987 .
p.
name =
"hevc_d3d12va",
1006 .p.wrapper_name =
"d3d12va",