41 memset(
vps, 0,
sizeof(*
vps));
42 memset(
sps, 0,
sizeof(*
sps));
43 memset(
pps, 0,
sizeof(*
pps));
47 if (
desc->nb_components == 1) {
50 if (
desc->log2_chroma_w == 1 &&
desc->log2_chroma_h == 1) {
52 }
else if (
desc->log2_chroma_w == 1 &&
desc->log2_chroma_h == 0) {
54 }
else if (
desc->log2_chroma_w == 0 &&
desc->log2_chroma_h == 0) {
58 "%s is not supported.\n",
desc->name);
70 .nuh_temporal_id_plus1 = 1,
73 vps->vps_video_parameter_set_id = 0;
75 vps->vps_base_layer_internal_flag = 1;
76 vps->vps_base_layer_available_flag = 1;
77 vps->vps_max_layers_minus1 = 0;
78 vps->vps_max_sub_layers_minus1 = 0;
79 vps->vps_temporal_id_nesting_flag = 1;
127 "any normal level; using level 8.5.\n");
134 vps->vps_sub_layer_ordering_info_present_flag = 0;
135 vps->vps_max_dec_pic_buffering_minus1[0] = base_ctx->
max_b_depth + 1;
137 vps->vps_max_latency_increase_plus1[0] = 0;
139 vps->vps_max_layer_id = 0;
140 vps->vps_num_layer_sets_minus1 = 0;
141 vps->layer_id_included_flag[0][0] = 1;
143 vps->vps_timing_info_present_flag = 1;
147 vps->vps_poc_proportional_to_timing_flag = 1;
148 vps->vps_num_ticks_poc_diff_one_minus1 = 0;
152 vps->vps_poc_proportional_to_timing_flag = 0;
154 vps->vps_num_hrd_parameters = 0;
162 .nuh_temporal_id_plus1 = 1,
165 sps->sps_video_parameter_set_id =
vps->vps_video_parameter_set_id;
167 sps->sps_max_sub_layers_minus1 =
vps->vps_max_sub_layers_minus1;
168 sps->sps_temporal_id_nesting_flag =
vps->vps_temporal_id_nesting_flag;
170 sps->profile_tier_level =
vps->profile_tier_level;
172 sps->sps_seq_parameter_set_id = 0;
174 sps->chroma_format_idc = chroma_format;
175 sps->separate_colour_plane_flag = 0;
182 sps->conformance_window_flag = 1;
183 sps->conf_win_left_offset = 0;
184 sps->conf_win_right_offset =
186 sps->conf_win_top_offset = 0;
187 sps->conf_win_bottom_offset =
190 sps->conformance_window_flag = 0;
196 sps->log2_max_pic_order_cnt_lsb_minus4 = 8;
198 sps->sps_sub_layer_ordering_info_present_flag =
199 vps->vps_sub_layer_ordering_info_present_flag;
200 for (
i = 0;
i <=
sps->sps_max_sub_layers_minus1;
i++) {
201 sps->sps_max_dec_pic_buffering_minus1[
i] =
202 vps->vps_max_dec_pic_buffering_minus1[
i];
203 sps->sps_max_num_reorder_pics[
i] =
204 vps->vps_max_num_reorder_pics[
i];
205 sps->sps_max_latency_increase_plus1[
i] =
206 vps->vps_max_latency_increase_plus1[
i];
213 sps->log2_min_luma_coding_block_size_minus3 = 0;
214 sps->log2_diff_max_min_luma_coding_block_size = 2;
216 sps->log2_min_luma_transform_block_size_minus2 = 0;
217 sps->log2_diff_max_min_luma_transform_block_size = 3;
219 sps->max_transform_hierarchy_depth_inter = 3;
220 sps->max_transform_hierarchy_depth_intra = 3;
222 sps->amp_enabled_flag = 1;
224 sps->sample_adaptive_offset_enabled_flag = 0;
225 sps->sps_temporal_mvp_enabled_flag = 0;
227 sps->pcm_enabled_flag = 0;
232 sps->num_short_term_ref_pic_sets = 0;
233 sps->long_term_ref_pics_present_flag = 0;
235 sps->vui_parameters_present_flag = 1;
300 .nuh_temporal_id_plus1 = 1,
303 pps->pps_pic_parameter_set_id = 0;
304 pps->pps_seq_parameter_set_id =
sps->sps_seq_parameter_set_id;
306 pps->num_ref_idx_l0_default_active_minus1 = 0;
307 pps->num_ref_idx_l1_default_active_minus1 = 0;
309 pps->init_qp_minus26 =
opts->fixed_qp_idr - 26;
311 pps->cu_qp_delta_enabled_flag =
opts->cu_qp_delta_enabled_flag;
312 pps->diff_cu_qp_delta_depth = 0;
314 if (
opts->tile_rows &&
opts->tile_cols) {
317 pps->tiles_enabled_flag = 1;
318 pps->num_tile_columns_minus1 =
opts->tile_cols - 1;
319 pps->num_tile_rows_minus1 =
opts->tile_rows - 1;
324 for (
i = 0;
i <=
pps->num_tile_columns_minus1 &&
325 uniform_spacing;
i++) {
326 if (
opts->col_width[
i] !=
327 (
i + 1) *
opts->slice_block_cols /
opts->tile_cols -
328 i *
opts->slice_block_cols /
opts->tile_cols)
331 for (
i = 0;
i <=
pps->num_tile_rows_minus1 &&
332 uniform_spacing;
i++) {
333 if (
opts->row_height[
i] !=
334 (
i + 1) *
opts->slice_block_rows /
opts->tile_rows -
335 i *
opts->slice_block_rows /
opts->tile_rows)
338 pps->uniform_spacing_flag = uniform_spacing;
340 for (
i = 0;
i <=
pps->num_tile_columns_minus1;
i++)
341 pps->column_width_minus1[
i] =
opts->col_width[
i] - 1;
342 for (
i = 0;
i <=
pps->num_tile_rows_minus1;
i++)
343 pps->row_height_minus1[
i] =
opts->row_height[
i] - 1;
345 pps->loop_filter_across_tiles_enabled_flag = 1;
348 pps->pps_loop_filter_across_slices_enabled_flag = 1;