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

Method parse

YUViewLib/src/parser/AV1/sequence_header_obu.cpp:45–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43using namespace reader;
44
45void sequence_header_obu::parse(reader::SubByteReaderLogging &reader)
46{
47 SubByteReaderLoggingSubLevel subLevel(reader, "sequence_header_obu()");
48
49 this->seq_profile = reader.readBits(
50 "seq_profile",
51 3,
52 Options().withMeaningVector(
53 {"Main Profile: Bit depth 8 or 10 bit, Monochrome support, Subsampling YUV 4:2:0",
54 "High Profile: Bit depth 8 or 10 bit, No Monochrome support, Subsampling YUV 4:2:0 or "
55 "4:4:4",
56 "Professional Profile: Bit depth 8, 10 or 12 bit, Monochrome support, Subsampling YUV "
57 "4:2:0, 4:2:2 or 4:4:4",
58 "Reserved"}));
59 this->still_picture = reader.readFlag("still_picture");
60 this->reduced_still_picture_header = reader.readFlag("reduced_still_picture_header");
61
62 if (this->reduced_still_picture_header)
63 {
64 this->timing_info_present_flag = false;
65 this->decoder_model_info_present_flag = false;
66 this->initial_display_delay_present_flag = false;
67 this->operating_points_cnt_minus_1 = 0;
68 this->operating_point_idc.push_back(0);
69 this->seq_level_idx.push_back(reader.readBits("seq_level_idx[0]", 5));
70 this->seq_tier.push_back(false);
71 this->decoder_model_present_for_this_op.push_back(false);
72 this->initial_display_delay_present_for_this_op.push_back(false);
73 }
74 else
75 {
76 this->timing_info_present_flag = reader.readFlag("timing_info_present_flag");
77 if (this->timing_info_present_flag)
78 {
79 this->timing_info.parse(reader);
80 this->decoder_model_info_present_flag = reader.readFlag("decoder_model_info_present_flag");
81 if (this->decoder_model_info_present_flag)
82 this->decoder_model_info.parse(reader);
83 }
84 else
85 {
86 this->decoder_model_info_present_flag = false;
87 }
88 this->initial_display_delay_present_flag =
89 reader.readFlag("initial_display_delay_present_flag");
90 this->operating_points_cnt_minus_1 = reader.readBits("operating_points_cnt_minus_1", 5);
91 for (unsigned int i = 0; i <= operating_points_cnt_minus_1; i++)
92 {
93 this->operating_point_idc.push_back(
94 reader.readBits(formatArray("operating_point_idc", i), 12));
95 this->seq_level_idx.push_back(reader.readBits(formatArray("seq_level_idx", i), 5));
96 if (seq_level_idx[i] > 7)
97 {
98 this->seq_tier.push_back(reader.readFlag(formatArray("seq_tier", i)));
99 }
100 else
101 {
102 this->seq_tier.push_back(false);

Callers

nothing calls this directly

Calls 9

OptionsClass · 0.85
formatArrayFunction · 0.85
readFlagMethod · 0.80
logCalculatedValueMethod · 0.80
getCodeMethod · 0.80
logArbitraryMethod · 0.80
readUEVMethod · 0.80
to_stringFunction · 0.50
readBitsMethod · 0.45

Tested by

no test coverage detected