Merge "mark VP8{,L}{GetInfo,CheckSignature} as WEBP_EXTERN"

This commit is contained in:
James Zern 2012-06-29 10:31:26 -07:00 committed by Gerrit Code Review
commit 4c3975792b
4 changed files with 24 additions and 21 deletions

View File

@ -94,7 +94,7 @@ int VP8CheckSignature(const uint8_t* const data, size_t data_size) {
} }
int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size, int VP8GetInfo(const uint8_t* data, size_t data_size, size_t chunk_size,
int* width, int* height) { int* const width, int* const height) {
if (data == NULL || data_size < VP8_FRAME_HEADER_SIZE) { if (data == NULL || data_size < VP8_FRAME_HEADER_SIZE) {
return 0; // not enough data return 0; // not enough data
} }

View File

@ -290,17 +290,6 @@ struct VP8Decoder {
int VP8SetError(VP8Decoder* const dec, int VP8SetError(VP8Decoder* const dec,
VP8StatusCode error, const char* const msg); VP8StatusCode error, const char* const msg);
// Returns true if the next 3 bytes in data contain the VP8 signature.
int VP8CheckSignature(const uint8_t* const data, size_t data_size);
// Validates the VP8 data-header and retrieves basic header information viz
// width and height. Returns 0 in case of formatting error. *width/*height
// can be passed NULL.
int VP8GetInfo(const uint8_t* data,
size_t data_size, // data available so far
size_t chunk_size, // total data size expect in the chunk
int *width, int *height);
// in tree.c // in tree.c
void VP8ResetProba(VP8Proba* const proba); void VP8ResetProba(VP8Proba* const proba);
void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec); void VP8ParseProba(VP8BitReader* const br, VP8Decoder* const dec);

View File

@ -87,15 +87,6 @@ typedef struct {
// in vp8l.c // in vp8l.c
// Returns true if the next byte(s) in data is a VP8L signature.
int VP8LCheckSignature(const uint8_t* const data, size_t size);
// Validates the VP8L data-header and retrieves basic header information viz
// width, height and alpha. Returns 0 in case of formatting error.
// width/height/has_alpha can be passed NULL.
int VP8LGetInfo(const uint8_t* data, size_t data_size, // data available so far
int* const width, int* const height, int* const has_alpha);
// Decodes a raw image stream (without header) and store the alpha data // Decodes a raw image stream (without header) and store the alpha data
// into *output, which must be of size width x height. Returns false in case // into *output, which must be of size width x height. Returns false in case
// of error. // of error.

View File

@ -151,6 +151,29 @@ WEBP_EXTERN(void) VP8Clear(VP8Decoder* const dec);
WEBP_EXTERN(void) VP8Delete(VP8Decoder* const dec); WEBP_EXTERN(void) VP8Delete(VP8Decoder* const dec);
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// Miscellaneous VP8/VP8L bitstream probing functions.
// Returns true if the next 3 bytes in data contain the VP8 signature.
WEBP_EXTERN(int) VP8CheckSignature(const uint8_t* const data, size_t data_size);
// Validates the VP8 data-header and retrieves basic header information viz
// width and height. Returns 0 in case of formatting error. *width/*height
// can be passed NULL.
WEBP_EXTERN(int) VP8GetInfo(
const uint8_t* data,
size_t data_size, // data available so far
size_t chunk_size, // total data size expected in the chunk
int* const width, int* const height);
// Returns true if the next byte(s) in data is a VP8L signature.
WEBP_EXTERN(int) VP8LCheckSignature(const uint8_t* const data, size_t size);
// Validates the VP8L data-header and retrieves basic header information viz
// width, height and alpha. Returns 0 in case of formatting error.
// width/height/has_alpha can be passed NULL.
WEBP_EXTERN(int) VP8LGetInfo(
const uint8_t* data, size_t data_size, // data available so far
int* const width, int* const height, int* const has_alpha);
#if defined(__cplusplus) || defined(c_plusplus) #if defined(__cplusplus) || defined(c_plusplus)
} // extern "C" } // extern "C"