| 40 | using namespace reader; |
| 41 | |
| 42 | void vui_parameters::parse(reader::SubByteReaderLogging &reader, |
| 43 | unsigned BitDepthC, |
| 44 | unsigned BitDepthY, |
| 45 | unsigned chroma_format_idc, |
| 46 | bool frame_mbs_only_flag) |
| 47 | { |
| 48 | SubByteReaderLoggingSubLevel subLevel(reader, "vui_parameters()"); |
| 49 | |
| 50 | this->aspect_ratio_info_present_flag = reader.readFlag("aspect_ratio_info_present_flag"); |
| 51 | if (aspect_ratio_info_present_flag) |
| 52 | { |
| 53 | this->aspect_ratio_idc = reader.readBits("aspect_ratio_idc", |
| 54 | 8, |
| 55 | Options().withMeaningVector({"1:1 (square)", |
| 56 | "12:11", |
| 57 | "10:11", |
| 58 | "16:11", |
| 59 | "40:33", |
| 60 | "24:11", |
| 61 | "20:11", |
| 62 | "32:11", |
| 63 | "80:33", |
| 64 | "18:11", |
| 65 | "15:11", |
| 66 | "64:33", |
| 67 | "160:99", |
| 68 | "4:3", |
| 69 | "3:2", |
| 70 | "2:1", |
| 71 | "Reserved"})); |
| 72 | if (aspect_ratio_idc == 255) // Extended_SAR |
| 73 | { |
| 74 | this->sar_width = reader.readBits("sar_width", 16); |
| 75 | this->sar_height = reader.readBits("sar_height", 16); |
| 76 | } |
| 77 | } |
| 78 | this->overscan_info_present_flag = reader.readFlag("overscan_info_present_flag"); |
| 79 | if (this->overscan_info_present_flag) |
| 80 | this->overscan_appropriate_flag = reader.readFlag("overscan_appropriate_flag"); |
| 81 | this->video_signal_type_present_flag = reader.readFlag("video_signal_type_present_flag"); |
| 82 | if (this->video_signal_type_present_flag) |
| 83 | { |
| 84 | this->video_format = reader.readBits( |
| 85 | "video_format", |
| 86 | 3, |
| 87 | Options().withMeaningVector( |
| 88 | {"Component", "PAL", "NTSC", "SECAM", "MAC", "Unspecified video format", "Reserved"})); |
| 89 | this->video_full_range_flag = reader.readFlag("video_full_range_flag"); |
| 90 | this->colour_description_present_flag = reader.readFlag("colour_description_present_flag"); |
| 91 | if (this->colour_description_present_flag) |
| 92 | { |
| 93 | this->colour_primaries = |
| 94 | reader.readBits("colour_primaries", |
| 95 | 8, |
| 96 | Options().withMeaningVector( |
| 97 | {"Reserved For future use by ITU-T | ISO/IEC", |
| 98 | "Rec. ITU-R BT.709-5 / BT.1361 / IEC 61966-2-1 (sRGB or sYCC)", |
| 99 | "Unspecified", |
nothing calls this directly
no test coverage detected