make width/height coding match the spec

* width/height in VP8X chunk is 24bit now
* Added some more constants #defines

Change-Id: I2f8ca7f965a247bccd341dd079ed2abf549c39d7
This commit is contained in:
Pascal Massimino
2012-06-28 00:20:28 -07:00
parent 637a314f97
commit e012dfd90f
7 changed files with 59 additions and 30 deletions

View File

@ -64,9 +64,17 @@ typedef enum {
#define RIFF_HEADER_SIZE 12 // Size of the RIFF header ("RIFFnnnnWEBP").
#define FRAME_CHUNK_SIZE 20 // Size of a FRM chunk.
#define LOOP_CHUNK_SIZE 4 // Size of a LOOP chunk.
#define TILE_CHUNK_SIZE 8 // Size of a LOOP chunk.
#define VP8X_CHUNK_SIZE 12 // Size of a VP8X chunk.
#define TILE_CHUNK_SIZE 8 // Size of a TILE chunk.
#define VP8X_CHUNK_SIZE 10 // Size of a VP8X chunk.
#define TILING_FLAG_BIT 0x01 // Set if tiles are possibly used.
#define ANIMATION_FLAG_BIT 0x02 // Set if some animation is expected
#define ICC_FLAG_BIT 0x04 // Whether ICC is present or not.
#define METADATA_FLAG_BIT 0x08 // Set if some META chunk is possibly present.
#define ALPHA_FLAG_BIT 0x10 // Should be same as the ALPHA_FLAG in mux.h
#define ROTATION_FLAG_BITS 0xe0 // all 3 bits for rotation + symmetry
#define MAX_CANVAS_SIZE (1 << 24) // 24 bit max for VP8X width/height.
// Maximum chunk payload is such that adding the header and padding won't
// overflow a uint32_t.