split the VP8 and VP8L decoding properly

* each with their own decoder instances.
* Refactor the incremental buffer-update code a lot.
* remove br_offset_ for VP8LDecoder along the way
* make VP8GetHeaders() be used only for VP8, not VP8L bitstream
* remove VP8LInitDecoder()
* rename VP8LBitReaderResize() to VP8LBitReaderSetBuffer()
(cherry picked from commit 5529a2e6d47212a721ca4ab003215f97bd88ebb4)

Change-Id: I58f0b8abe1ef31c8b0e1a6175d2d86b863793ead
This commit is contained in:
Pascal Massimino
2012-04-05 09:31:10 +00:00
committed by James Zern
parent f2623dbe58
commit 6f01b830e2
8 changed files with 222 additions and 243 deletions

View File

@ -78,7 +78,6 @@ typedef struct {
uint32_t *argb_cache_; // Scratch buffer for temporary BGRA storage.
BitReader br_;
uint32_t br_offset_;
int width_;
int height_;
@ -109,9 +108,6 @@ int VP8LGetInfo(const uint8_t* data,
// Allocates and initialize a new lossless decoder instance.
VP8LDecoder* VP8LNew(void);
// Initializes the decoder object.
void VP8LInitDecoder(VP8LDecoder* const dec);
// Decodes the image header. Returns false in case of error.
int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io);
@ -120,6 +116,7 @@ int VP8LDecodeHeader(VP8LDecoder* const dec, VP8Io* const io);
int VP8LDecodeImage(VP8LDecoder* const dec);
// Resets the decoder in its initial state, reclaiming memory.
// Preserves the dec->status_ value.
void VP8LClear(VP8LDecoder* const dec);
// Clears and deallocate a lossless decoder instance.