fix bug due to overzealous check in WebPPictureYUVAToARGB()

This tests prevented views to be converted to ARGB

https://code.google.com/p/webp/issues/detail?id=178

Change-Id: I5ba66da2791e6f1d2bfd8c55b5fffe6955263374
This commit is contained in:
skal 2013-12-02 15:23:12 +01:00
parent cc55790e37
commit 6f104034a1
2 changed files with 2 additions and 3 deletions

View File

@ -888,8 +888,7 @@ int WebPPictureImportBGRX(WebPPicture* picture,
int WebPPictureYUVAToARGB(WebPPicture* picture) { int WebPPictureYUVAToARGB(WebPPicture* picture) {
if (picture == NULL) return 0; if (picture == NULL) return 0;
if (picture->memory_ == NULL || picture->y == NULL || if (picture->y == NULL || picture->u == NULL || picture->v == NULL) {
picture->u == NULL || picture->v == NULL) {
return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER); return WebPEncodingSetError(picture, VP8_ENC_ERROR_NULL_PARAMETER);
} }
if ((picture->colorspace & WEBP_CSP_ALPHA_BIT) && picture->a == NULL) { if ((picture->colorspace & WEBP_CSP_ALPHA_BIT) && picture->a == NULL) {

View File

@ -20,7 +20,7 @@
extern "C" { extern "C" {
#endif #endif
#define WEBP_ENCODER_ABI_VERSION 0x0201 // MAJOR(8b) + MINOR(8b) #define WEBP_ENCODER_ABI_VERSION 0x0202 // MAJOR(8b) + MINOR(8b)
// Note: forward declaring enumerations is not allowed in (strict) C and C++, // Note: forward declaring enumerations is not allowed in (strict) C and C++,
// the types are left here for reference. // the types are left here for reference.