mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-25 05:08:21 +01:00
cosmetics after '76036f5 Refactor decoder library'
reference 'VP8X' consistently / spelling sort header size defines alphabetically on their logical boundaries drop useless cast const updates Change-Id: I9409814c5b89773ae8910dc74887f91435e6ac82
This commit is contained in:
parent
76036f547e
commit
563e52d62e
@ -232,7 +232,7 @@ static void RestoreContext(const MBContext* context, VP8Decoder* const dec,
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
static VP8StatusCode IDecError(WebPIDecoder* idec, VP8StatusCode error) {
|
||||
static VP8StatusCode IDecError(WebPIDecoder* const idec, VP8StatusCode error) {
|
||||
if (idec->state_ == STATE_VP8_DATA) {
|
||||
VP8Io* const io = &idec->io_;
|
||||
if (io->teardown) {
|
||||
@ -243,7 +243,7 @@ static VP8StatusCode IDecError(WebPIDecoder* idec, VP8StatusCode error) {
|
||||
return error;
|
||||
}
|
||||
|
||||
static void ChangeState(WebPIDecoder* idec, DecState new_state,
|
||||
static void ChangeState(WebPIDecoder* const idec, DecState new_state,
|
||||
uint32_t consumed_bytes) {
|
||||
idec->state_ = new_state;
|
||||
idec->mem_.start_ += consumed_bytes;
|
||||
@ -272,7 +272,7 @@ static VP8StatusCode DecodeWebPHeaders(WebPIDecoder* const idec) {
|
||||
|
||||
static VP8StatusCode DecodeVP8FrameHeader(WebPIDecoder* const idec) {
|
||||
const uint8_t* data = idec->mem_.buf_ + idec->mem_.start_;
|
||||
uint32_t curr_size = MemDataSize(&idec->mem_);
|
||||
const uint32_t curr_size = MemDataSize(&idec->mem_);
|
||||
uint32_t bits;
|
||||
|
||||
if (curr_size < VP8_FRAME_HEADER_SIZE) {
|
||||
|
@ -265,7 +265,7 @@ int VP8GetHeaders(VP8Decoder* const dec, VP8Io* const io) {
|
||||
"null VP8Io passed to VP8GetHeaders()");
|
||||
}
|
||||
|
||||
buf = (uint8_t*)io->data;
|
||||
buf = io->data;
|
||||
buf_size = io->data_size;
|
||||
|
||||
// Process Pre-VP8 chunks.
|
||||
|
@ -19,7 +19,7 @@ extern "C" {
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// RIFF layout is:
|
||||
// 0ffset tag
|
||||
// Offset tag
|
||||
// 0...3 "RIFF" 4-byte tag
|
||||
// 4...7 size of image data (including metadata) starting at offset 8
|
||||
// 8...11 "WEBP" our form-type signature
|
||||
@ -215,7 +215,7 @@ VP8StatusCode WebPParseHeaders(const uint8_t** data, uint32_t* data_size,
|
||||
return VP8_STATUS_BITSTREAM_ERROR; // Wrong RIFF Header.
|
||||
}
|
||||
|
||||
// Skip over VP8x header.
|
||||
// Skip over VP8X header.
|
||||
status = WebPParseVP8X(&buf, &buf_size, &vp8x_skip_size, NULL, NULL, NULL);
|
||||
if (status != VP8_STATUS_OK) {
|
||||
return status; // Wrong VP8X Chunk / Insufficient data.
|
||||
@ -481,7 +481,7 @@ static VP8StatusCode GetFeatures(const uint8_t* data, uint32_t data_size,
|
||||
return status; // Wrong RIFF Header / Insufficient data.
|
||||
}
|
||||
|
||||
// Skip over VP8x.
|
||||
// Skip over VP8X.
|
||||
status = WebPParseVP8X(&data, &data_size, &vp8x_skip_size, &features->width,
|
||||
&features->height, &flags);
|
||||
if (status != VP8_STATUS_OK) {
|
||||
@ -489,7 +489,7 @@ static VP8StatusCode GetFeatures(const uint8_t* data, uint32_t data_size,
|
||||
|
||||
}
|
||||
if (vp8x_skip_size > 0) {
|
||||
return VP8_STATUS_OK; // Return features from VP8x header.
|
||||
return VP8_STATUS_OK; // Return features from VP8X header.
|
||||
}
|
||||
|
||||
// Skip over VP8 header.
|
||||
|
@ -19,7 +19,7 @@ extern "C" {
|
||||
#include "../webp/decode_vp8.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// WebPDecParams: Decoding output parameters. Transcient internal object.
|
||||
// WebPDecParams: Decoding output parameters. Transient internal object.
|
||||
|
||||
typedef struct WebPDecParams WebPDecParams;
|
||||
typedef int (*OutputFunc)(const VP8Io* const io, WebPDecParams* const p);
|
||||
@ -63,10 +63,10 @@ void WebPResetDecParams(WebPDecParams* const params);
|
||||
#define TAG_SIZE 4
|
||||
#define CHUNK_HEADER_SIZE 8
|
||||
#define RIFF_HEADER_SIZE 12
|
||||
#define VP8X_CHUNK_SIZE 12
|
||||
#define TILE_CHUNK_SIZE 8
|
||||
#define FRAME_CHUNK_SIZE 20
|
||||
#define LOOP_CHUNK_SIZE 4
|
||||
#define TILE_CHUNK_SIZE 8
|
||||
#define VP8X_CHUNK_SIZE 12
|
||||
#define VP8_FRAME_HEADER_SIZE 10 // Size of the frame header within VP8 data.
|
||||
|
||||
// Validates the RIFF container (if detected) and skips over it.
|
||||
|
Loading…
Reference in New Issue
Block a user