| 54 | using namespace parser::reader; |
| 55 | |
| 56 | void 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 | |
| 87 | std::string picture_header::getPictureTypeString() const |
| 88 | { |
nothing calls this directly
no test coverage detected