mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-14 21:09:55 +02:00
remove all unused layer code
Change-Id: I220590162b24c70f404fe3087f19dd3e6cac3608
This commit is contained in:
@ -363,28 +363,6 @@ int VP8GetHeaders(VP8Decoder* const dec, VP8Io* const io) {
|
||||
|
||||
VP8ParseProba(br, dec);
|
||||
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
// Extensions
|
||||
if (dec->pic_hdr_.colorspace_) {
|
||||
const size_t kTrailerSize = 8;
|
||||
const uint8_t kTrailerMarker = 0x01;
|
||||
const uint8_t* ext_buf = buf - kTrailerSize;
|
||||
size_t size;
|
||||
|
||||
if (frm_hdr->partition_length_ < kTrailerSize ||
|
||||
ext_buf[kTrailerSize - 1] != kTrailerMarker) {
|
||||
return VP8SetError(dec, VP8_STATUS_BITSTREAM_ERROR,
|
||||
"RIFF: Inconsistent extra information.");
|
||||
}
|
||||
|
||||
// Layer
|
||||
size = (ext_buf[0] << 0) | (ext_buf[1] << 8) | (ext_buf[2] << 16);
|
||||
dec->layer_data_size_ = size;
|
||||
dec->layer_data_ = NULL; // will be set later
|
||||
dec->layer_colorspace_ = ext_buf[3];
|
||||
}
|
||||
#endif
|
||||
|
||||
// sanitized state
|
||||
dec->ready_ = 1;
|
||||
return 1;
|
||||
@ -629,15 +607,6 @@ static int ParseFrame(VP8Decoder* const dec, VP8Io* io) {
|
||||
if (!WebPWorkerSync(&dec->worker_)) return 0;
|
||||
}
|
||||
|
||||
// Finish
|
||||
#ifdef WEBP_EXPERIMENTAL_FEATURES
|
||||
if (dec->layer_data_size_ > 0) {
|
||||
if (!VP8DecodeLayer(dec)) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user