MCPcopy Create free account
hub / github.com/IENT/YUView / parse

Method parse

YUViewLib/src/parser/HEVC/hrd_parameters.cpp:42–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40using namespace reader;
41
42void hrd_parameters::parse(SubByteReaderLogging &reader,
43 bool commonInfPresentFlag,
44 unsigned maxNumSubLayersMinus1)
45{
46 SubByteReaderLoggingSubLevel subLevel(reader, "hrd_parameters()");
47
48 if (commonInfPresentFlag)
49 {
50 this->nal_hrd_parameters_present_flag = reader.readFlag("nal_hrd_parameters_present_flag");
51 this->vcl_hrd_parameters_present_flag = reader.readFlag("vcl_hrd_parameters_present_flag");
52
53 if (nal_hrd_parameters_present_flag || vcl_hrd_parameters_present_flag)
54 {
55 this->sub_pic_hrd_params_present_flag = reader.readFlag(
56 "sub_pic_hrd_params_present_flag",
57 Options().withMeaning("Can the HRD operate at access unit or sub-picture level (true) or "
58 "only at access unit level (false)"));
59 if (sub_pic_hrd_params_present_flag)
60 {
61 this->tick_divisor_minus2 = reader.readBits(
62 "tick_divisor_minus2",
63 8,
64 Options().withMeaning("Specifies the clock sub-tick. A clock sub-tick is the minimum "
65 "interval of time that can be represented in the coded data when "
66 "sub_pic_hrd_params_present_flag is equal to 1"));
67 this->du_cpb_removal_delay_increment_length_minus1 = reader.readBits(
68 "du_cpb_removal_delay_increment_length_minus1",
69 5,
70 Options().withMeaning("Specifies the length, in bits, of some coded symbols"));
71 this->sub_pic_cpb_params_in_pic_timing_sei_flag =
72 reader.readFlag("sub_pic_cpb_params_in_pic_timing_sei_flag");
73 this->dpb_output_delay_du_length_minus1 =
74 reader.readBits("dpb_output_delay_du_length_minus1", 5);
75 }
76 this->bit_rate_scale = reader.readBits(
77 "bit_rate_scale",
78 4,
79 Options().withMeaning("(together with bit_rate_value_minus1[i]) specifies the maximum "
80 "input bit rate of the i-th CPB."));
81 this->cpb_size_scale = reader.readBits(
82 "cpb_size_scale",
83 4,
84 Options().withMeaning("(together with cpb_size_value_minus1[i]) specifies the CPB size "
85 "of the i-th CPB when the CPB operates at the access unit level."));
86 if (sub_pic_hrd_params_present_flag)
87 this->cpb_size_du_scale = reader.readBits(
88 "cpb_size_du_scale",
89 4,
90 Options().withMeaning(
91 "(together with cpb_size_du_value_minus1[ i ]) specifies the CPB size of the i-th "
92 "CPB when the CPB operates at sub-picture level."));
93 this->initial_cpb_removal_delay_length_minus1 = reader.readBits(
94 "initial_cpb_removal_delay_length_minus1",
95 5,
96 Options().withMeaning("Specifies the length, in bits, of some coded symbols"));
97 this->au_cpb_removal_delay_length_minus1 = reader.readBits(
98 "au_cpb_removal_delay_length_minus1",
99 5,

Callers

nothing calls this directly

Calls 6

OptionsClass · 0.85
formatArrayFunction · 0.85
readFlagMethod · 0.80
logCalculatedValueMethod · 0.80
readUEVMethod · 0.80
readBitsMethod · 0.45

Tested by

no test coverage detected