24 #define EXTENDED_SAR 255
29 uint32_t delta_poc_st, strp_entry_sign_flag = 0;
32 if ((
unsigned)rpl->
ref_pic_num >
sps->sps_max_dec_pic_buffering_minus1)
40 strp_entry_sign_flag =
get_bits(gb, 1);
42 rpl->
ref_pics[0] *= 1 - (strp_entry_sign_flag << 1);
48 if (delta_poc_st != 0)
49 strp_entry_sign_flag =
get_bits(gb, 1);
50 rpl->
ref_pics[
i] = rpl->
ref_pics[
i - 1] + delta_poc_st * (1 - (strp_entry_sign_flag << 1));
65 for (
int SchedSelIdx = 0; SchedSelIdx <= hrd->
cpb_cnt_minus1; SchedSelIdx++) {
154 unsigned sps_seq_parameter_set_id;
166 sps->sps_seq_parameter_set_id = sps_seq_parameter_set_id;
182 if (
sps->chroma_format_idc > 3) {
194 if (
sps->sps_btt_flag) {
203 if (
sps->sps_suco_flag) {
209 if (
sps->sps_admvp_flag) {
218 if (
sps->sps_eipd_flag) {
220 if (
sps->sps_ibc_flag)
225 if (
sps->sps_cm_init_flag)
229 if (
sps->sps_iqt_flag)
240 if (
sps->sps_pocs_flag) {
242 if (
sps->log2_max_pic_order_cnt_lsb_minus4 > 12
U) {
248 if (!
sps->sps_pocs_flag || !
sps->sps_rpl_flag) {
250 if (
sps->log2_sub_gop_length > 5
U) {
254 if (
sps->log2_sub_gop_length == 0)
258 if (!
sps->sps_rpl_flag)
262 if ((
unsigned)
sps->sps_max_dec_pic_buffering_minus1 > 16 - 1) {
275 for (
int i = 0;
i <
sps->num_ref_pic_list_in_sps[0]; ++
i) {
281 if (!
sps->rpl1_same_as_rpl0_flag) {
287 for (
int i = 0;
i <
sps->num_ref_pic_list_in_sps[1]; ++
i) {
297 if (
sps->picture_cropping_flag) {
304 if (
sps->chroma_format_idc != 0) {
305 sps->chroma_qp_table_struct.chroma_qp_table_present_flag =
get_bits1(gb);
307 if (
sps->chroma_qp_table_struct.chroma_qp_table_present_flag) {
308 sps->chroma_qp_table_struct.same_qp_table_for_chroma =
get_bits1(gb);
309 sps->chroma_qp_table_struct.global_offset_flag =
get_bits1(gb);
310 for (
int i = 0;
i < (
sps->chroma_qp_table_struct.same_qp_table_for_chroma ? 1 : 2);
i++) {
311 sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[
i] =
get_ue_golomb(gb);
316 for (
int j = 0; j <=
sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[
i]; j++) {
317 sps->chroma_qp_table_struct.delta_qp_in_val_minus1[
i][j] =
get_bits(gb, 6);
325 if (
sps->vui_parameters_present_flag) {
336 ps->
sps[sps_seq_parameter_set_id] =
sps;
354 unsigned pps_pic_parameter_set_id;
365 pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id;
379 if (!
pps->single_tile_in_pic_flag) {
389 if (!
pps->uniform_tile_spacing_flag) {
390 for (
int i = 0;
i <
pps->num_tile_columns_minus1;
i++)
393 for (
int i = 0;
i <
pps->num_tile_rows_minus1;
i++)
396 pps->loop_filter_across_tiles_enabled_flag =
get_bits1(gb);
401 if (
pps->tile_id_len_minus1 > 15
U) {
407 if (
pps->explicit_tile_id_flag) {
408 for (
int i = 0;
i <=
pps->num_tile_rows_minus1;
i++) {
409 for (
int j = 0; j <=
pps->num_tile_columns_minus1; j++)
414 pps->pic_dra_enabled_flag = 0;
417 if (
pps->pic_dra_enabled_flag)
424 if (
pps->cu_qp_delta_enabled_flag)
428 ps->
pps[pps_pic_parameter_set_id] =
pps;