| 191 | } |
| 192 | |
| 193 | std::tuple<bool, unsigned> parse_4_bit_pixel_code_string(SubByteReaderLogging &reader) |
| 194 | { |
| 195 | SubByteReaderLoggingSubLevel s(reader, "4-bit/pixel_code_string()"); |
| 196 | |
| 197 | bool end = false; |
| 198 | auto bitsRead = 0u; |
| 199 | |
| 200 | auto next_bits = reader.readBits("next_bits", 4); |
| 201 | bitsRead += 4; |
| 202 | if (next_bits == 0) |
| 203 | { |
| 204 | auto switch_1 = reader.readFlag("switch_1"); |
| 205 | bitsRead++; |
| 206 | if (!switch_1) |
| 207 | { |
| 208 | reader.readBits("next_bits", 3); |
| 209 | bitsRead += 3; |
| 210 | if (next_bits == 0) |
| 211 | end = true; |
| 212 | } |
| 213 | else |
| 214 | { |
| 215 | auto switch_2 = reader.readFlag("switch_2"); |
| 216 | bitsRead++; |
| 217 | if (!switch_2) |
| 218 | { |
| 219 | reader.readBits("run_length_4_7", 2); |
| 220 | reader.readBits("four_bit_pixel_code", 4); |
| 221 | bitsRead += 6; |
| 222 | } |
| 223 | else |
| 224 | { |
| 225 | auto switch_3 = reader.readBits("switch_3", 2); |
| 226 | bitsRead += 2; |
| 227 | if (switch_3 == 2) |
| 228 | { |
| 229 | reader.readBits("run_length_9_24", 4); |
| 230 | reader.readBits("four_bit_pixel_code", 4); |
| 231 | bitsRead += 8; |
| 232 | } |
| 233 | if (switch_3 == 3) |
| 234 | { |
| 235 | reader.readBits("run_length_25_280", 8); |
| 236 | reader.readBits("four_bit_pixel_code", 4); |
| 237 | bitsRead += 12; |
| 238 | } |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | return {end, bitsRead}; |
| 244 | } |
| 245 | |
| 246 | std::tuple<bool, unsigned> parse_8_bit_pixel_code_string(SubByteReaderLogging &reader) |
| 247 | { |
no test coverage detected