Support for "Do not blend" in mux and demux libraries

Change-Id: I9566a8e2d059fe1ebd9ca99c7e13311bf3f8f281
This commit is contained in:
Urvang Joshi
2013-08-09 14:09:31 -07:00
parent f486aaa9f8
commit 6284854bd5
7 changed files with 39 additions and 9 deletions

View File

@ -140,8 +140,9 @@ struct WebPIterator {
WebPData fragment; // The frame or fragment given by 'frame_num' and
// 'fragment_num'.
int has_alpha; // True if the frame or fragment contains transparency.
WebPMuxAnimBlend blend_method; // Blend operation for the frame.
uint32_t pad[3]; // padding for later use.
uint32_t pad[2]; // padding for later use.
void* private_; // for internal use only.
};

View File

@ -199,7 +199,8 @@ struct WebPMuxFrameInfo {
WebPChunkId id; // frame type: should be one of WEBP_CHUNK_ANMF,
// WEBP_CHUNK_FRGM or WEBP_CHUNK_IMAGE
WebPMuxAnimDispose dispose_method; // Disposal method for the frame.
uint32_t pad[2]; // padding for later use
WebPMuxAnimBlend blend_method; // Blend operation for the frame.
uint32_t pad[1]; // padding for later use
};
// Sets the (non-animated and non-fragmented) image in the mux object.

View File

@ -26,6 +26,7 @@ extern "C" {
// the types are left here for reference.
// typedef enum WebPFeatureFlags WebPFeatureFlags;
// typedef enum WebPMuxAnimDispose WebPMuxAnimDispose;
// typedef enum WebPMuxAnimBlend WebPMuxAnimBlend;
typedef struct WebPData WebPData;
// VP8X Feature Flags.
@ -45,6 +46,13 @@ typedef enum WebPMuxAnimDispose {
WEBP_MUX_DISPOSE_BACKGROUND // Dispose to background color.
} WebPMuxAnimDispose;
// Blend operation (animation only). Indicates how transparent pixels of the
// current frame are blended with those of the previous canvas.
typedef enum WebPMuxAnimBlend {
WEBP_MUX_BLEND, // Blend.
WEBP_MUX_NO_BLEND // Do not blend.
} WebPMuxAnimBlend;
// Data type used to describe 'raw' data, e.g., chunk data
// (ICC profile, metadata) and WebP compressed image data.
struct WebPData {