VP8EstimateQuality(): roughty estimate webp bitstream quality factor

This function returns a rough estimation of the quality factor used
for compressing the WebP bitstream.

Simple command line: 'webp_quality [-quiet] in.webp'
should print the estimated quality factor.

Change-Id: Ifba3e489461f5a587003ac9f08cc7556e9b24ac2
This commit is contained in:
skal
2016-07-20 12:55:05 -07:00
committed by Pascal Massimino
parent fee7b3d6ca
commit e8ab6a825a
5 changed files with 201 additions and 8 deletions

View File

@ -44,6 +44,14 @@ 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.)
// will return a value of -1.
WEBP_EXTERN(int) VP8EstimateQuality(const uint8_t* const data, size_t size);
//------------------------------------------------------------------------------
#ifdef __cplusplus
} // extern "C"
#endif