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

Method parse

YUViewLib/src/parser/Mpeg2/picture_header.cpp:56–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54using namespace parser::reader;
55
56void picture_header::parse(SubByteReaderLogging &reader)
57{
58 SubByteReaderLoggingSubLevel subLevel(reader, "picture_header");
59
60 this->temporal_reference = reader.readBits("temporal_reference", 10);
61 this->picture_coding_type = reader.readBits(
62 "picture_coding_type", 3, Options().withMeaningMap(picture_coding_type_meaning));
63 this->vbv_delay = reader.readBits("vbv_delay", 16);
64 if (this->picture_coding_type == 2 || this->picture_coding_type == 3)
65 {
66 this->full_pel_forward_vector = reader.readFlag("full_pel_forward_vector");
67 this->forward_f_code = reader.readBits("forward_f_code", 3);
68 }
69 if (this->picture_coding_type == 3)
70 {
71 this->full_pel_backward_vector = reader.readFlag("full_pel_backward_vector");
72 this->backward_f_code = reader.readBits("backward_f_code", 3);
73 }
74
75 bool abort = false;
76 while (reader.canReadBits(9))
77 {
78 if (!reader.readFlag("extra_bit_picture"))
79 abort = false;
80
81 if (!abort)
82 this->extra_information_picture_list.push_back(
83 reader.readBits("extra_information_picture", 8));
84 }
85}
86
87std::string picture_header::getPictureTypeString() const
88{

Callers

nothing calls this directly

Calls 4

OptionsClass · 0.85
readFlagMethod · 0.80
canReadBitsMethod · 0.80
readBitsMethod · 0.45

Tested by

no test coverage detected