webp_quality: detect lossless format and features

lossless bitstream are returned as quality 101

Change-Id: I8b28287169b710ecf8d4d694abbf0cedc6447908
This commit is contained in:
Pascal Massimino
2016-07-22 00:02:17 -07:00
parent ebee57f4d1
commit eb98d8d87c
3 changed files with 13 additions and 3 deletions

View File

@ -46,7 +46,9 @@ WEBP_EXTERN(int) WebPImportRGB4444(const uint8_t* rgb4444, WebPPicture* pic);
// Parse a bitstream, search for VP8 (lossy) header and report a
// rough estimation of the quality factor used for compressing the bitstream.
// Any error (invalid bitstream, lossless compression, incomplete header, etc.)
// If the bitstream is in lossless format, the special value '101' is returned.
// Otherwise (lossy bitstream), the returned value is in the range [0..100].
// Any error (invalid bitstream, animated WebP, incomplete header, etc.)
// will return a value of -1.
WEBP_EXTERN(int) VP8EstimateQuality(const uint8_t* const data, size_t size);