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

Method parse

YUViewLib/src/parser/HEVC/profile_tier_level.cpp:41–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39using namespace reader;
40
41void profile_tier_level::parse(SubByteReaderLogging &reader,
42 bool profilePresentFlag,
43 unsigned maxNumSubLayersMinus1)
44{
45 SubByteReaderLoggingSubLevel subLevel(reader, "profile_tier_level()");
46
47 // Profile tier level
48 if (profilePresentFlag)
49 {
50 this->general_profile_space = reader.readBits("general_profile_space", 2);
51 this->general_tier_flag = reader.readFlag("general_tier_flag");
52 this->general_profile_idc = reader.readBits("general_profile_idc", 5);
53
54 for (unsigned j = 0; j < 32; j++)
55 this->general_profile_compatibility_flag[j] =
56 reader.readFlag(formatArray("general_profile_compatibility_flag", j));
57 this->general_progressive_source_flag = reader.readFlag("general_progressive_source_flag");
58 this->general_interlaced_source_flag = reader.readFlag("general_interlaced_source_flag");
59 this->general_non_packed_constraint_flag =
60 reader.readFlag("general_non_packed_constraint_flag");
61 this->general_frame_only_constraint_flag =
62 reader.readFlag("general_frame_only_constraint_flag");
63
64 if (this->general_profile_idc == 4 || this->general_profile_compatibility_flag[4] ||
65 this->general_profile_idc == 5 || this->general_profile_compatibility_flag[5] ||
66 this->general_profile_idc == 6 || this->general_profile_compatibility_flag[6] ||
67 this->general_profile_idc == 7 || this->general_profile_compatibility_flag[7])
68 {
69 this->general_max_12bit_constraint_flag =
70 reader.readFlag("general_max_12bit_constraint_flag");
71 this->general_max_10bit_constraint_flag =
72 reader.readFlag("general_max_10bit_constraint_flag");
73 this->general_max_8bit_constraint_flag = reader.readFlag("general_max_8bit_constraint_flag");
74 this->general_max_422chroma_constraint_flag =
75 reader.readFlag("general_max_422chroma_constraint_flag");
76 this->general_max_420chroma_constraint_flag =
77 reader.readFlag("general_max_420chroma_constraint_flag");
78 this->general_max_monochrome_constraint_flag =
79 reader.readFlag("general_max_monochrome_constraint_flag");
80 this->general_intra_constraint_flag = reader.readFlag("general_intra_constraint_flag");
81 this->general_one_picture_only_constraint_flag =
82 reader.readFlag("general_one_picture_only_constraint_flag");
83 this->general_lower_bit_rate_constraint_flag =
84 reader.readFlag("general_lower_bit_rate_constraint_flag");
85
86 reader.readBits("general_reserved_zero_bits", 34, Options().withCheckEqualTo(0));
87 }
88 else
89 reader.readBits("general_reserved_zero_bits", 43, Options().withCheckEqualTo(0));
90
91 if ((this->general_profile_idc >= 1 && this->general_profile_idc <= 5) ||
92 this->general_profile_compatibility_flag[1] ||
93 this->general_profile_compatibility_flag[2] ||
94 this->general_profile_compatibility_flag[3] ||
95 this->general_profile_compatibility_flag[4] || this->general_profile_compatibility_flag[5])
96 this->general_inbld_flag = reader.readFlag("general_inbld_flag");
97 else
98 reader.readFlag("general_reserved_zero_bit", Options().withCheckEqualTo(0));

Callers

nothing calls this directly

Calls 5

formatArrayFunction · 0.85
OptionsClass · 0.85
readFlagMethod · 0.80
to_stringFunction · 0.70
readBitsMethod · 0.45

Tested by

no test coverage detected