25 #define EXTENDED_SAR 255
33 if ((
unsigned)rpl->
ref_pic_num >
sps->sps_max_dec_pic_buffering_minus1)
41 strp_entry_sign_flag =
get_bits(gb, 1);
43 rpl->
ref_pics[0] *= 1 - (strp_entry_sign_flag << 1);
50 strp_entry_sign_flag =
get_bits(gb, 1);
66 for (
int SchedSelIdx = 0; SchedSelIdx <= hrd->
cpb_cnt_minus1; SchedSelIdx++) {
155 unsigned sps_seq_parameter_set_id;
167 sps->sps_seq_parameter_set_id = sps_seq_parameter_set_id;
183 if (
sps->chroma_format_idc > 3) {
195 if (
sps->sps_btt_flag) {
204 if (
sps->sps_suco_flag) {
210 if (
sps->sps_admvp_flag) {
219 if (
sps->sps_eipd_flag) {
221 if (
sps->sps_ibc_flag)
226 if (
sps->sps_cm_init_flag)
230 if (
sps->sps_iqt_flag)
241 if (
sps->sps_pocs_flag) {
243 if (
sps->log2_max_pic_order_cnt_lsb_minus4 > 12
U) {
249 if (!
sps->sps_pocs_flag || !
sps->sps_rpl_flag) {
251 if (
sps->log2_sub_gop_length > 5
U) {
255 if (
sps->log2_sub_gop_length == 0)
259 if (!
sps->sps_rpl_flag)
263 if ((
unsigned)
sps->sps_max_dec_pic_buffering_minus1 > 16 - 1) {
276 for (
int i = 0;
i <
sps->num_ref_pic_list_in_sps[0]; ++
i) {
282 if (!
sps->rpl1_same_as_rpl0_flag) {
288 for (
int i = 0;
i <
sps->num_ref_pic_list_in_sps[1]; ++
i) {
298 if (
sps->picture_cropping_flag) {
305 if (
sps->chroma_format_idc != 0) {
306 sps->chroma_qp_table_struct.chroma_qp_table_present_flag =
get_bits1(gb);
308 if (
sps->chroma_qp_table_struct.chroma_qp_table_present_flag) {
309 sps->chroma_qp_table_struct.same_qp_table_for_chroma =
get_bits1(gb);
310 sps->chroma_qp_table_struct.global_offset_flag =
get_bits1(gb);
311 for (
int i = 0;
i < (
sps->chroma_qp_table_struct.same_qp_table_for_chroma ? 1 : 2);
i++) {
312 sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[
i] =
get_ue_golomb(gb);
317 for (
int j = 0; j <=
sps->chroma_qp_table_struct.num_points_in_qp_table_minus1[
i]; j++) {
318 sps->chroma_qp_table_struct.delta_qp_in_val_minus1[
i][j] =
get_bits(gb, 6);
326 if (
sps->vui_parameters_present_flag) {
337 ps->
sps[sps_seq_parameter_set_id] =
sps;
355 unsigned pps_pic_parameter_set_id;
366 pps->pps_pic_parameter_set_id = pps_pic_parameter_set_id;
380 if (!
pps->single_tile_in_pic_flag) {
390 if (!
pps->uniform_tile_spacing_flag) {
391 for (
int i = 0;
i <
pps->num_tile_columns_minus1;
i++)
394 for (
int i = 0;
i <
pps->num_tile_rows_minus1;
i++)
397 pps->loop_filter_across_tiles_enabled_flag =
get_bits1(gb);
402 if (
pps->tile_id_len_minus1 > 15
U) {
408 if (
pps->explicit_tile_id_flag) {
409 for (
int i = 0;
i <=
pps->num_tile_rows_minus1;
i++) {
410 for (
int j = 0; j <=
pps->num_tile_columns_minus1; j++)
415 pps->pic_dra_enabled_flag = 0;
418 if (
pps->pic_dra_enabled_flag)
425 if (
pps->cu_qp_delta_enabled_flag)
429 ps->
pps[pps_pic_parameter_set_id] =
pps;