| 347 | } |
| 348 | |
| 349 | static int ReadImageInfo(VP8LBitReader* const br, int* const width, int* const height, |
| 350 | int* const has_alpha) { |
| 351 | if (VP8LReadBits(br, 8) != VP8L_MAGIC_BYTE) return 0; |
| 352 | *width = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; |
| 353 | *height = VP8LReadBits(br, VP8L_IMAGE_SIZE_BITS) + 1; |
| 354 | *has_alpha = VP8LReadBits(br, 1); |
| 355 | if (VP8LReadBits(br, VP8L_VERSION_BITS) != 0) return 0; |
| 356 | return !br->eos_; |
| 357 | } |
| 358 | |
| 359 | int VP8LGetInfo(const uint8_t* data, size_t data_size, int* const width, int* const height, |
| 360 | int* const has_alpha) { |
no test coverage detected