| 42 | using namespace reader; |
| 43 | |
| 44 | void seq_parameter_set_rbsp::parse(SubByteReaderLogging &reader) |
| 45 | { |
| 46 | SubByteReaderLoggingSubLevel subLevel(reader, "seq_parameter_set_rbsp()"); |
| 47 | |
| 48 | this->sps_video_parameter_set_id = reader.readBits("sps_video_parameter_set_id", 4); |
| 49 | this->sps_max_sub_layers_minus1 = reader.readBits("sps_max_sub_layers_minus1", 3); |
| 50 | this->sps_temporal_id_nesting_flag = reader.readFlag("sps_temporal_id_nesting_flag"); |
| 51 | |
| 52 | // parse profile tier level |
| 53 | this->profileTierLevel.parse(reader, true, sps_max_sub_layers_minus1); |
| 54 | |
| 55 | /// Back to the seq_parameter_set_rbsp |
| 56 | this->sps_seq_parameter_set_id = reader.readUEV("sps_seq_parameter_set_id"); |
| 57 | this->chroma_format_idc = reader.readUEV( |
| 58 | "chroma_format_idc", |
| 59 | Options().withMeaningVector({"moochrome", "4:2:0", "4:2:2", "4:4:4", "4:4:4"})); |
| 60 | if (this->chroma_format_idc == 3) |
| 61 | this->separate_colour_plane_flag = reader.readFlag("separate_colour_plane_flag"); |
| 62 | this->ChromaArrayType = (this->separate_colour_plane_flag) ? 0 : this->chroma_format_idc; |
| 63 | reader.logCalculatedValue("ChromaArrayType", this->ChromaArrayType); |
| 64 | |
| 65 | // Rec. ITU-T H.265 v3 (04/2015) - 6.2 - Table 6-1 |
| 66 | this->SubWidthC = (this->chroma_format_idc == 1 || this->chroma_format_idc == 2) ? 2 : 1; |
| 67 | this->SubHeightC = (this->chroma_format_idc == 1) ? 2 : 1; |
| 68 | reader.logCalculatedValue("SubWidthC", this->SubWidthC); |
| 69 | reader.logCalculatedValue("SubHeightC", this->SubHeightC); |
| 70 | |
| 71 | this->pic_width_in_luma_samples = reader.readUEV("pic_width_in_luma_samples"); |
| 72 | this->pic_height_in_luma_samples = reader.readUEV("pic_height_in_luma_samples"); |
| 73 | this->conformance_window_flag = reader.readFlag("conformance_window_flag"); |
| 74 | |
| 75 | if (this->conformance_window_flag) |
| 76 | { |
| 77 | this->conf_win_left_offset = reader.readUEV("conf_win_left_offset"); |
| 78 | this->conf_win_right_offset = reader.readUEV("conf_win_right_offset"); |
| 79 | this->conf_win_top_offset = reader.readUEV("conf_win_top_offset"); |
| 80 | this->conf_win_bottom_offset = reader.readUEV("conf_win_bottom_offset"); |
| 81 | } |
| 82 | |
| 83 | this->bit_depth_luma_minus8 = reader.readUEV("bit_depth_luma_minus8"); |
| 84 | this->bit_depth_chroma_minus8 = reader.readUEV("bit_depth_chroma_minus8"); |
| 85 | this->log2_max_pic_order_cnt_lsb_minus4 = reader.readUEV("log2_max_pic_order_cnt_lsb_minus4"); |
| 86 | |
| 87 | this->sps_sub_layer_ordering_info_present_flag = |
| 88 | reader.readFlag("sps_sub_layer_ordering_info_present_flag"); |
| 89 | for (unsigned i = |
| 90 | (this->sps_sub_layer_ordering_info_present_flag ? 0 : this->sps_max_sub_layers_minus1); |
| 91 | i <= this->sps_max_sub_layers_minus1; |
| 92 | i++) |
| 93 | { |
| 94 | this->sps_max_dec_pic_buffering_minus1.push_back( |
| 95 | reader.readUEV(formatArray("sps_max_dec_pic_buffering_minus1", i))); |
| 96 | this->sps_max_num_reorder_pics.push_back( |
| 97 | reader.readUEV(formatArray("sps_max_num_reorder_pics", i))); |
| 98 | this->sps_max_latency_increase_plus1.push_back( |
| 99 | reader.readUEV(formatArray("sps_max_latency_increase_plus1", i))); |
| 100 | } |
| 101 |
nothing calls this directly
no test coverage detected