Add support for raw lossless bitstream in decoder.

Previously, it used to assume any raw bitstream is a VP8 one.

Also,
- Factor out VP8CheckSignature() & VP8LCheckSignature().
- Use a local var for *data_ptr in ParseVP8Header() for
readability.

Change-Id: I0fa8aa177dad7865e00c8898f7e7ce76a9db19d5
This commit is contained in:
Urvang Joshi
2012-05-31 11:16:32 +05:30
parent 7cbee29afa
commit 9ef3228301
5 changed files with 37 additions and 16 deletions

View File

@ -290,6 +290,9 @@ struct VP8Decoder {
int VP8SetError(VP8Decoder* const dec,
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.