From d1b78b9804ef22b315507910b8d61c946063a776 Mon Sep 17 00:00:00 2001 From: Christian Feldmann Date: Thu, 22 Feb 2024 11:01:10 +0100 Subject: [PATCH] VPS extensions finished --- .../HEVC/Extensions/video_signal_info.cpp | 51 ++++++++ .../HEVC/Extensions/video_signal_info.h | 55 ++++++++ .../parser/HEVC/Extensions/vps_extension.cpp | 18 ++- .../parser/HEVC/Extensions/vps_extension.h | 3 +- .../src/parser/HEVC/Extensions/vps_vui.cpp | 118 +++++++++++++++++- .../src/parser/HEVC/Extensions/vps_vui.h | 50 +++++++- .../Extensions/vps_vui_bsp_hrd_params.cpp | 99 +++++++++++++++ .../HEVC/Extensions/vps_vui_bsp_hrd_params.h | 68 ++++++++++ .../parser/HEVC/video_parameter_set_rbsp.cpp | 3 +- 9 files changed, 459 insertions(+), 6 deletions(-) create mode 100644 YUViewLib/src/parser/HEVC/Extensions/video_signal_info.cpp create mode 100644 YUViewLib/src/parser/HEVC/Extensions/video_signal_info.h create mode 100644 YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.cpp create mode 100644 YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.h diff --git a/YUViewLib/src/parser/HEVC/Extensions/video_signal_info.cpp b/YUViewLib/src/parser/HEVC/Extensions/video_signal_info.cpp new file mode 100644 index 000000000..814e657f9 --- /dev/null +++ b/YUViewLib/src/parser/HEVC/Extensions/video_signal_info.cpp @@ -0,0 +1,51 @@ +/* This file is part of YUView - The YUV player with advanced analytics toolset + * + * Copyright (C) 2015 Institut f�r Nachrichtentechnik, RWTH Aachen University, GERMANY + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of portions of this program with the + * OpenSSL library under certain conditions as described in each + * individual source file, and distribute linked combinations including + * the two. + * + * You must obey the GNU General Public License in all respects for all + * of the code used other than OpenSSL. If you modify file(s) with this + * exception, you may extend this exception to your version of the + * file(s), but you are not obligated to do so. If you do not wish to do + * so, delete this exception statement from your version. If you delete + * this exception statement from all source files in the program, then + * also delete it here. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "video_signal_info.h" + +namespace parser::hevc +{ + +using namespace reader; + +void video_signal_info::parse(SubByteReaderLogging &reader) +{ + SubByteReaderLoggingSubLevel subLevel(reader, "video_signal_info()"); + + this->video_vps_format = reader.readBits("video_vps_format", 3); + this->video_full_range_vps_flag = reader.readFlag("video_full_range_vps_flag"); + this->colour_primaries_vps = reader.readBits("colour_primaries_vps", 8); + this->transfer_characteristics_vps = reader.readBits("transfer_characteristics_vps", 8); + this->matrix_coeffs_vps = reader.readBits("matrix_coeffs_vps", 8); +} + +} // namespace parser::hevc diff --git a/YUViewLib/src/parser/HEVC/Extensions/video_signal_info.h b/YUViewLib/src/parser/HEVC/Extensions/video_signal_info.h new file mode 100644 index 000000000..52dd4fd11 --- /dev/null +++ b/YUViewLib/src/parser/HEVC/Extensions/video_signal_info.h @@ -0,0 +1,55 @@ +/* This file is part of YUView - The YUV player with advanced analytics toolset + * + * Copyright (C) 2015 Institut f�r Nachrichtentechnik, RWTH Aachen University, GERMANY + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of portions of this program with the + * OpenSSL library under certain conditions as described in each + * individual source file, and distribute linked combinations including + * the two. + * + * You must obey the GNU General Public License in all respects for all + * of the code used other than OpenSSL. If you modify file(s) with this + * exception, you may extend this exception to your version of the + * file(s), but you are not obligated to do so. If you do not wish to do + * so, delete this exception statement from your version. If you delete + * this exception statement from all source files in the program, then + * also delete it here. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "parser/common/SubByteReaderLogging.h" + +namespace parser::hevc +{ + +// F.7.3.2.2.4 Sequence parameter set multilayer extension syntax +class video_signal_info +{ +public: + video_signal_info() {} + + void parse(reader::SubByteReaderLogging &reader); + + unsigned video_vps_format{}; + bool video_full_range_vps_flag{}; + unsigned colour_primaries_vps{}; + unsigned transfer_characteristics_vps{}; + unsigned matrix_coeffs_vps{}; +}; + +} // namespace parser::hevc diff --git a/YUViewLib/src/parser/HEVC/Extensions/vps_extension.cpp b/YUViewLib/src/parser/HEVC/Extensions/vps_extension.cpp index f526054f3..b4b63b67a 100644 --- a/YUViewLib/src/parser/HEVC/Extensions/vps_extension.cpp +++ b/YUViewLib/src/parser/HEVC/Extensions/vps_extension.cpp @@ -43,7 +43,8 @@ void vps_extension::parse(SubByteReaderLogging &reader, const unsigned vps_max_layers_minus1, const bool vps_base_layer_internal_flag, const unsigned vps_max_sub_layers_minus1, - const unsigned vps_num_layer_sets_minus1) + const unsigned vps_num_layer_sets_minus1, + const unsigned vps_num_hrd_parameters) { SubByteReaderLoggingSubLevel subLevel(reader, "vps_extension()"); @@ -270,7 +271,20 @@ void vps_extension::parse(SubByteReaderLogging &reader, { while (!reader.byte_aligned()) reader.readFlag("vps_vui_alignment_bit_equal_to_one", Options().withCheckEqualTo(0)); - vpsVui.parse(reader, this->vps_vui_present_flag); + vpsVui.parse(reader, + this->vps_vui_present_flag, + vps_base_layer_internal_flag, + this->NumLayerSets, + this->MaxSubLayersInLayerSetMinus1, + this->MaxLayersMinus1, + this->NumDirectRefLayers, + this->layer_id_in_nuh, + this->LayerIdxInVps, + this->IdDirectRefLayer, + vps_num_hrd_parameters, + this->NumOutputLayerSets, + this->NumLayersInIdList, + this->OlsIdxToLsIdx); } } diff --git a/YUViewLib/src/parser/HEVC/Extensions/vps_extension.h b/YUViewLib/src/parser/HEVC/Extensions/vps_extension.h index b798591fb..97c727321 100644 --- a/YUViewLib/src/parser/HEVC/Extensions/vps_extension.h +++ b/YUViewLib/src/parser/HEVC/Extensions/vps_extension.h @@ -51,7 +51,8 @@ class vps_extension const unsigned vps_max_layers_minus1, const bool vps_base_layer_internal_flag, const unsigned vps_max_sub_layers_minus1, - const unsigned vps_num_layer_sets_minus1); + const unsigned vps_num_layer_sets_minus1, + const unsigned vps_num_hrd_parameters); profile_tier_level profileTierLevel; bool splitting_flag{}; diff --git a/YUViewLib/src/parser/HEVC/Extensions/vps_vui.cpp b/YUViewLib/src/parser/HEVC/Extensions/vps_vui.cpp index d98fcf358..6a67db17b 100644 --- a/YUViewLib/src/parser/HEVC/Extensions/vps_vui.cpp +++ b/YUViewLib/src/parser/HEVC/Extensions/vps_vui.cpp @@ -32,12 +32,27 @@ #include "vps_vui.h" +#include + namespace parser::hevc { using namespace reader; -void vps_vui::parse(SubByteReaderLogging &reader, const bool vps_vui_present_flag) +void vps_vui::parse(SubByteReaderLogging & reader, + const bool vps_vui_present_flag, + const bool vps_base_layer_internal_flag, + const unsigned NumLayerSets, + const vector & MaxSubLayersInLayerSetMinus1, + const unsigned MaxLayersMinus1, + const umap_1d &NumDirectRefLayers, + const vector & layer_id_in_nuh, + const umap_1d &LayerIdxInVps, + const umap_2d &IdDirectRefLayer, + const unsigned vps_num_hrd_parameters, + const unsigned NumOutputLayerSets, + const umap_1d &NumLayersInIdList, + const umap_1d &OlsIdxToLsIdx) { SubByteReaderLoggingSubLevel subLevel(reader, "vps_vui()"); @@ -53,7 +68,108 @@ void vps_vui::parse(SubByteReaderLogging &reader, const bool vps_vui_present_fla if (this->bit_rate_present_vps_flag || this->pic_rate_present_vps_flag) { + for (unsigned i = vps_base_layer_internal_flag ? 0 : 1; i < NumLayerSets; i++) + { + for (unsigned j = 0; j <= MaxSubLayersInLayerSetMinus1[i]; j++) + { + if (this->bit_rate_present_vps_flag) + this->bit_rate_present_flag[i][j] = + reader.readFlag(formatArray("all_layers_idr_aligned_flag", i, j)); + if (this->pic_rate_present_vps_flag) + this->pic_rate_present_flag[i][j] = + reader.readFlag(formatArray("pic_rate_present_flag", i, j)); + if (this->bit_rate_present_flag[i][j]) + { + this->avg_bit_rate[i][j] = reader.readBits(formatArray("avg_bit_rate", i, j), 16); + this->max_bit_rate[i][j] = reader.readBits(formatArray("max_bit_rate", i, j), 16); + } + if (this->pic_rate_present_flag[i][j]) + { + this->constant_pic_rate_idc[i][j] = + reader.readBits(formatArray("constant_pic_rate_idc", i, j), 2); + this->avg_pic_rate[i][j] = reader.readBits(formatArray("avg_pic_rate", i, j), 16); + } + } + } + } + + this->video_signal_info_idx_present_flag = reader.readFlag("video_signal_info_idx_present_flag"); + if (this->video_signal_info_idx_present_flag) + this->vps_num_video_signal_info_minus1 = reader.readBits("vps_num_video_signal_info_minus1", 4); + + for (unsigned i = 0; i <= this->vps_num_video_signal_info_minus1; i++) + { + video_signal_info videoSignalInfo; + videoSignalInfo.parse(reader); + this->videoSignalInfoList.push_back(videoSignalInfo); + } + + if (this->video_signal_info_idx_present_flag && this->vps_num_video_signal_info_minus1 > 0) + for (unsigned i = vps_base_layer_internal_flag ? 0 : 1; i <= MaxLayersMinus1; i++) + this->vps_video_signal_info_idx[i] = reader.readBits("vps_video_signal_info_idx", 4); + + this->tiles_not_in_use_flag = reader.readFlag("tiles_not_in_use_flag"); + + if (!this->tiles_not_in_use_flag) + { + for (unsigned i = vps_base_layer_internal_flag ? 0 : 1; i <= MaxLayersMinus1; i++) + { + this->tiles_in_use_flag[i] = reader.readFlag("tiles_in_use_flag"); + if (this->tiles_in_use_flag[i]) + this->loop_filter_not_across_tiles_flag[i] = reader.readFlag("tiles_in_use_flag"); + } + for (unsigned i = vps_base_layer_internal_flag ? 1 : 2; i <= MaxLayersMinus1; i++) + for (unsigned j = 0; j < NumDirectRefLayers.at(layer_id_in_nuh[i]); j++) + { + const auto layerIdx = LayerIdxInVps.at(IdDirectRefLayer.at(layer_id_in_nuh[i]).at(j)); + if (tiles_in_use_flag[i] && tiles_in_use_flag[layerIdx]) + this->tile_boundaries_aligned_flag[i][j] = + reader.readFlag(formatArray("tile_boundaries_aligned_flag", i, j)); + } + } + + this->wpp_not_in_use_flag = reader.readFlag("wpp_not_in_use_flag"); + if (!this->wpp_not_in_use_flag) + for (unsigned i = vps_base_layer_internal_flag ? 0 : 1; i <= MaxLayersMinus1; i++) + this->wpp_in_use_flag[i] = reader.readFlag(formatArray("wpp_in_use_flag", i)); + + this->single_layer_for_non_irap_flag = reader.readFlag("single_layer_for_non_irap_flag"); + this->higher_layer_irap_skip_flag = reader.readFlag("higher_layer_irap_skip_flag"); + this->ilp_restricted_ref_layers_flag = reader.readFlag("ilp_restricted_ref_layers_flag"); + if (this->ilp_restricted_ref_layers_flag) + { + for (unsigned i = 1; i <= MaxLayersMinus1; i++) + for (unsigned j = 0; j < NumDirectRefLayers.at(layer_id_in_nuh[i]); j++) + { + if (vps_base_layer_internal_flag || IdDirectRefLayer.at(layer_id_in_nuh[i]).at(j) > 0) + { + this->min_spatial_segment_offset_plus1[i][j] = + reader.readUEV(formatArray("min_spatial_segment_offset_plus1", i, j)); + if (this->min_spatial_segment_offset_plus1[i][j] > 0) + { + this->ctu_based_offset_enabled_flag[i][j] = + reader.readFlag(formatArray("ctu_based_offset_enabled_flag", i, j)); + if (this->ctu_based_offset_enabled_flag[i][j]) + this->min_horizontal_ctu_offset_plus1[i][j] = + reader.readUEV(formatArray("min_horizontal_ctu_offset_plus1", i, j)); + } + } + } } + + this->vps_vui_bsp_hrd_present_flag = reader.readFlag("vps_vui_bsp_hrd_present_flag"); + if (this->vps_vui_bsp_hrd_present_flag) + vpsVuiBspHrdParams.parse(reader, + vps_num_hrd_parameters, + NumOutputLayerSets, + NumLayersInIdList, + OlsIdxToLsIdx, + MaxSubLayersInLayerSetMinus1); + + for (unsigned i = 1; i <= MaxLayersMinus1; i++) + if (NumDirectRefLayers.at(layer_id_in_nuh[i]) == 0) + this->base_layer_parameter_set_compatibility_flag[i] = + reader.readFlag(formatArray("base_layer_parameter_set_compatibility_flag", i)); } } // namespace parser::hevc diff --git a/YUViewLib/src/parser/HEVC/Extensions/vps_vui.h b/YUViewLib/src/parser/HEVC/Extensions/vps_vui.h index e53301c4a..2ae94a6bf 100644 --- a/YUViewLib/src/parser/HEVC/Extensions/vps_vui.h +++ b/YUViewLib/src/parser/HEVC/Extensions/vps_vui.h @@ -33,6 +33,8 @@ #pragma once #include "parser/common/SubByteReaderLogging.h" +#include "video_signal_info.h" +#include "vps_vui_bsp_hrd_params.h" namespace parser::hevc { @@ -43,13 +45,59 @@ class vps_vui public: vps_vui() {} - void parse(reader::SubByteReaderLogging &reader, const bool vps_vui_present_flag); + void parse(reader::SubByteReaderLogging &reader, + const bool vps_vui_present_flag, + const bool vps_base_layer_internal_flag, + const unsigned NumLayerSets, + const vector & MaxSubLayersInLayerSetMinus1, + const unsigned MaxLayersMinus1, + const umap_1d & NumDirectRefLayers, + const vector & layer_id_in_nuh, + const umap_1d & LayerIdxInVps, + const umap_2d & IdDirectRefLayer, + const unsigned vps_num_hrd_parameters, + const unsigned NumOutputLayerSets, + const umap_1d & NumLayersInIdList, + const umap_1d & OlsIdxToLsIdx); bool cross_layer_pic_type_aligned_flag{}; bool cross_layer_irap_aligned_flag{}; bool all_layers_idr_aligned_flag{}; bool bit_rate_present_vps_flag{}; bool pic_rate_present_vps_flag{}; + + umap_2d bit_rate_present_flag; + umap_2d pic_rate_present_flag; + umap_2d avg_bit_rate; + umap_2d max_bit_rate; + umap_2d constant_pic_rate_idc; + umap_2d avg_pic_rate; + + bool video_signal_info_idx_present_flag{}; + unsigned vps_num_video_signal_info_minus1{}; + vector videoSignalInfoList; + + umap_1d vps_video_signal_info_idx; + + bool tiles_not_in_use_flag{}; + umap_1d tiles_in_use_flag; + umap_1d loop_filter_not_across_tiles_flag; + umap_2d tile_boundaries_aligned_flag; + + bool wpp_not_in_use_flag{}; + umap_1d wpp_in_use_flag; + + bool single_layer_for_non_irap_flag{}; + bool higher_layer_irap_skip_flag{}; + bool ilp_restricted_ref_layers_flag{}; + umap_2d min_spatial_segment_offset_plus1; + umap_2d ctu_based_offset_enabled_flag; + umap_2d min_horizontal_ctu_offset_plus1; + + bool vps_vui_bsp_hrd_present_flag{}; + vps_vui_bsp_hrd_params vpsVuiBspHrdParams{}; + + umap_1d base_layer_parameter_set_compatibility_flag; }; } // namespace parser::hevc diff --git a/YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.cpp b/YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.cpp new file mode 100644 index 000000000..5c9efe227 --- /dev/null +++ b/YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.cpp @@ -0,0 +1,99 @@ +/* This file is part of YUView - The YUV player with advanced analytics toolset + * + * Copyright (C) 2015 Institut f�r Nachrichtentechnik, RWTH Aachen University, GERMANY + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of portions of this program with the + * OpenSSL library under certain conditions as described in each + * individual source file, and distribute linked combinations including + * the two. + * + * You must obey the GNU General Public License in all respects for all + * of the code used other than OpenSSL. If you modify file(s) with this + * exception, you may extend this exception to your version of the + * file(s), but you are not obligated to do so. If you do not wish to do + * so, delete this exception statement from your version. If you delete + * this exception statement from all source files in the program, then + * also delete it here. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "vps_vui_bsp_hrd_params.h" + +#include + +namespace parser::hevc +{ + +using namespace reader; + +void vps_vui_bsp_hrd_params::parse(SubByteReaderLogging & reader, + const unsigned vps_num_hrd_parameters, + const unsigned NumOutputLayerSets, + const umap_1d &NumLayersInIdList, + const umap_1d &OlsIdxToLsIdx, + const vector & MaxSubLayersInLayerSetMinus1) +{ + SubByteReaderLoggingSubLevel subLevel(reader, "vps_vui_bsp_hrd_params()"); + + this->vps_num_add_hrd_params = reader.readUEV("vps_num_add_hrd_params"); + for (unsigned i = vps_num_hrd_parameters; + i < vps_num_hrd_parameters + this->vps_num_add_hrd_params; + i++) + { + if (i > 0) + this->cprms_add_present_flag[i] = reader.readFlag(formatArray("cprms_add_present_flag", i)); + this->num_sub_layer_hrd_minus1[i] = reader.readUEV(formatArray("cprms_add_present_flag", i)); + hrdParameters[i].parse( + reader, this->cprms_add_present_flag[i], this->num_sub_layer_hrd_minus1[i]); + } + + if (vps_num_hrd_parameters + this->vps_num_add_hrd_params > 0) + for (unsigned h = 1; h < NumOutputLayerSets; h++) + { + this->num_signalled_partitioning_schemes[h] = + reader.readUEV(formatArray("cprms_add_present_flag", h)); + for (unsigned j = 1; j < num_signalled_partitioning_schemes[h] + 1; j++) + { + this->num_partitions_in_scheme_minus1[h][j] = + reader.readUEV(formatArray("num_partitions_in_scheme_minus1", h, j)); + for (unsigned k = 0; k <= this->num_partitions_in_scheme_minus1[h][j]; k++) + for (unsigned r = 0; r < NumLayersInIdList.at(OlsIdxToLsIdx.at(h)); r++) + layer_included_in_partition_flag[h][j][k][r] = + reader.readFlag(formatArray("layer_included_in_partition_flag", h, j, k, r)); + } + for (unsigned i = 0; i < this->num_signalled_partitioning_schemes[h] + 1; i++) + for (unsigned t = 0; t <= MaxSubLayersInLayerSetMinus1[OlsIdxToLsIdx.at(h)]; t++) + { + this->num_bsp_schedules_minus1[h][i][t] = + reader.readUEV(formatArray("num_bsp_schedules_minus1", h, i, t)); + for (unsigned j = 0; j <= this->num_bsp_schedules_minus1[h][i][t]; j++) + for (unsigned k = 0; k <= this->num_partitions_in_scheme_minus1[h][i]; k++) + { + if (vps_num_hrd_parameters + this->vps_num_add_hrd_params > 1) + { + const auto nrBits = + std::ceil(std::log2(vps_num_hrd_parameters + this->vps_num_add_hrd_params)); + this->bsp_hrd_idx[h][i][t][j][k] = + reader.readBits(formatArray("bsp_sched_idx", h, i, t, j, k), nrBits); + } + this->bsp_sched_idx[h][i][t][j][k] = + reader.readUEV(formatArray("bsp_sched_idx", h, i, t, j, k)); + } + } + } +} + +} // namespace parser::hevc diff --git a/YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.h b/YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.h new file mode 100644 index 000000000..364f729f9 --- /dev/null +++ b/YUViewLib/src/parser/HEVC/Extensions/vps_vui_bsp_hrd_params.h @@ -0,0 +1,68 @@ +/* This file is part of YUView - The YUV player with advanced analytics toolset + * + * Copyright (C) 2015 Institut f�r Nachrichtentechnik, RWTH Aachen University, GERMANY + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * In addition, as a special exception, the copyright holders give + * permission to link the code of portions of this program with the + * OpenSSL library under certain conditions as described in each + * individual source file, and distribute linked combinations including + * the two. + * + * You must obey the GNU General Public License in all respects for all + * of the code used other than OpenSSL. If you modify file(s) with this + * exception, you may extend this exception to your version of the + * file(s), but you are not obligated to do so. If you do not wish to do + * so, delete this exception statement from your version. If you delete + * this exception statement from all source files in the program, then + * also delete it here. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#pragma once + +#include "parser/common/SubByteReaderLogging.h" + +#include "../hrd_parameters.h" + +namespace parser::hevc +{ + +// F.7.3.2.2.4 Sequence parameter set multilayer extension syntax +class vps_vui_bsp_hrd_params +{ +public: + vps_vui_bsp_hrd_params() {} + + void parse(reader::SubByteReaderLogging &reader, + const unsigned vps_num_hrd_parameters, + const unsigned NumOutputLayerSets, + const umap_1d & NumLayersInIdList, + const umap_1d & OlsIdxToLsIdx, + const vector & MaxSubLayersInLayerSetMinus1); + + unsigned vps_num_add_hrd_params{}; + umap_1d cprms_add_present_flag; + umap_1d num_sub_layer_hrd_minus1; + + umap_1d hrdParameters; + umap_1d num_signalled_partitioning_schemes; + umap_2d num_partitions_in_scheme_minus1; + umap_4d layer_included_in_partition_flag; + umap_3d num_bsp_schedules_minus1; + umap_5d bsp_hrd_idx; + umap_5d bsp_sched_idx; +}; + +} // namespace parser::hevc diff --git a/YUViewLib/src/parser/HEVC/video_parameter_set_rbsp.cpp b/YUViewLib/src/parser/HEVC/video_parameter_set_rbsp.cpp index 3462cbed8..e175cc7d1 100644 --- a/YUViewLib/src/parser/HEVC/video_parameter_set_rbsp.cpp +++ b/YUViewLib/src/parser/HEVC/video_parameter_set_rbsp.cpp @@ -117,7 +117,8 @@ void video_parameter_set_rbsp::parse(SubByteReaderLogging &reader) this->vps_max_layers_minus1, this->vps_base_layer_internal_flag, this->vps_max_sub_layers_minus1, - this->vps_num_layer_sets_minus1); + this->vps_num_layer_sets_minus1, + this->vps_num_hrd_parameters); this->vps_extension2_flag = reader.readFlag("vps_extension2_flag"); if (this->vps_extension2_flag)