Update mux code to match the spec wrt animation

- Allow a duration of 0
- Rename LOOP chunk to ANIM and add the background color field to it.
- Add a disposal method field for each animation frame.
- Modify webpmux.c binary interface to allow the input of background color
  and disposal methods. Also make '-loop' and '-bgcolor' arguments optional
  with some default values.

Change-Id: I807372a61cdb8a0d3080ae3552caf2848070bf4d
This commit is contained in:
Urvang Joshi
2012-11-01 15:34:46 -07:00
parent d9c5fbefa4
commit fa30c86323
10 changed files with 287 additions and 162 deletions

View File

@ -30,7 +30,7 @@ typedef struct WebPChunk WebPChunk;
struct WebPChunk {
uint32_t tag_;
int owner_; // True if *data_ memory is owned internally.
// VP8X, Loop, and other internally created chunks
// VP8X, ANIM, and other internally created chunks
// like ANMF/FRGM are always owned.
WebPData data_;
WebPChunk* next_;
@ -53,7 +53,7 @@ struct WebPMux {
WebPChunk* iccp_;
WebPChunk* exif_;
WebPChunk* xmp_;
WebPChunk* loop_;
WebPChunk* anim_;
WebPChunk* vp8x_;
WebPChunk* unknown_;
@ -66,7 +66,7 @@ struct WebPMux {
typedef enum {
IDX_VP8X = 0,
IDX_ICCP,
IDX_LOOP,
IDX_ANIM,
IDX_ANMF,
IDX_FRGM,
IDX_ALPHA,