libwebp interface changes for lossless encoding.

Change-Id: I703a1a18347acf78378cb23fddc6e5ca6dc6a0bb
This commit is contained in:
Vikas Arora
2012-03-28 11:07:42 +00:00
committed by James Zern
parent c04eb7be9d
commit 227110c4c3
8 changed files with 648 additions and 158 deletions

View File

@ -76,6 +76,7 @@ typedef struct {
// 0: none, 1: fast, 2: best. Default if 1.
int alpha_quality; // Between 0 (smallest size) and 100 (lossless).
// Default is 100.
int lossless; // Lossless encoding (0=lossy(default), 1=lossless).
} WebPConfig;
// Enumerate some predefined settings for WebPConfig, depending on the type
@ -189,7 +190,7 @@ struct WebPPicture {
int width, height; // dimensions (less or equal to WEBP_MAX_DIMENSION)
uint8_t *y, *u, *v; // pointers to luma/chroma planes.
int y_stride, uv_stride; // luma/chroma strides.
uint8_t *a; // pointer to the alpha plane
uint8_t* a; // pointer to the alpha plane
int a_stride; // stride of the alpha plane
// output
@ -216,6 +217,10 @@ struct WebPPicture {
WebPEncodingError error_code; // error code in case of problem.
WebPProgressHook progress_hook; // if not NULL, called while encoding.
int use_argb_input; // Flag for encoder to read argb pixels as input.
uint32_t* argb; // Pointer to argb (32 bit) plane.
int argb_stride; // This is stride in pixels units, not bytes.
};
// Internal, version-checked, entry point