| 38 | using namespace parser::reader; |
| 39 | |
| 40 | void general_timing_hrd_parameters::parse(SubByteReaderLogging &reader) |
| 41 | { |
| 42 | SubByteReaderLoggingSubLevel subLevel(reader, "general_timing_hrd_parameters"); |
| 43 | |
| 44 | this->num_units_in_tick = reader.readBits("num_units_in_tick", 32, Options().withCheckGreater(0)); |
| 45 | this->time_scale = reader.readBits("time_scale", 32, Options().withCheckGreater(0)); |
| 46 | this->general_nal_hrd_params_present_flag = |
| 47 | reader.readFlag("general_nal_hrd_params_present_flag"); |
| 48 | this->general_vcl_hrd_params_present_flag = |
| 49 | reader.readFlag("general_vcl_hrd_params_present_flag"); |
| 50 | if (this->general_nal_hrd_params_present_flag || this->general_vcl_hrd_params_present_flag) |
| 51 | { |
| 52 | this->general_same_pic_timing_in_all_ols_flag = |
| 53 | reader.readFlag("general_same_pic_timing_in_all_ols_flag"); |
| 54 | this->general_du_hrd_params_present_flag = |
| 55 | reader.readFlag("general_du_hrd_params_present_flag"); |
| 56 | if (this->general_du_hrd_params_present_flag) |
| 57 | { |
| 58 | this->tick_divisor_minus2 = reader.readBits("tick_divisor_minus2", 8); |
| 59 | } |
| 60 | this->bit_rate_scale = reader.readBits("bit_rate_scale", 4); |
| 61 | this->cpb_size_scale = reader.readBits("cpb_size_scale", 4); |
| 62 | if (this->general_du_hrd_params_present_flag) |
| 63 | { |
| 64 | this->cpb_size_du_scale = reader.readBits("cpb_size_du_scale", 4); |
| 65 | } |
| 66 | this->hrd_cpb_cnt_minus1 = |
| 67 | reader.readUEV("hrd_cpb_cnt_minus1", Options().withCheckRange({0, 31})); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | } // namespace parser::vvc |