Add error reporting from encoding failures.

picture->error_code can be looked up for finer error diagnose.
Added readable error messages to cwebp too.

Should close bug #75 (http://code.google.com/p/webp/issues/detail?id=75)

Change-Id: I8889d06642d90702f698cd5c27441a058ddb3636
This commit is contained in:
Pascal Massimino
2011-06-02 06:55:03 -07:00
parent 6c9405dbfb
commit ca7a2fd66d
5 changed files with 74 additions and 19 deletions

View File

@ -417,6 +417,9 @@ int VP8GetCostUV(VP8EncIterator* const it, const VP8ModeScore* const rd);
int VP8EncLoop(VP8Encoder* const enc);
int VP8StatLoop(VP8Encoder* const enc);
// in webpenc.c
// Assign an error code to a picture. Return false for convenience.
int WebPEncodingSetError(WebPPicture* const pic, WebPEncodingError error);
// in analysis.c
// Compute susceptibility based on DCT-coeff histograms:
// the higher, the "easier" the macroblock is to compress.