restore encode API compatibility

protect WebPConfigLosslessPreset/WebPMemoryWriterClear w/a
WEBP_ENCODER_ABI_VERSION check

Change-Id: If4debc15fee172a3f18079bc2bd29eb8447bc14b
This commit is contained in:
James Zern
2014-07-22 20:24:59 -07:00
parent 793368e8c6
commit c2fc52e4ec
7 changed files with 61 additions and 19 deletions

View File

@ -138,6 +138,7 @@ int WebPValidateConfig(const WebPConfig* config) {
//------------------------------------------------------------------------------
#if WEBP_ENCODER_ABI_VERSION > 0x0202
#define MAX_LEVEL 9
// Mapping between -z level and -m / -q parameter settings.
@ -156,5 +157,6 @@ int WebPConfigLosslessPreset(WebPConfig* config, int level) {
config->quality = kLosslessPresets[level].quality_;
return 1;
}
#endif
//------------------------------------------------------------------------------

View File

@ -571,6 +571,10 @@ int WebPPictureAllocYUVA(WebPPicture* const picture, int width, int height);
//------------------------------------------------------------------------------
#if WEBP_ENCODER_ABI_VERSION <= 0x0202
void WebPMemoryWriterClear(WebPMemoryWriter* writer);
#endif
#ifdef __cplusplus
} // extern "C"
#endif