mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 23:09:52 +02:00
remove all unused layer code
Change-Id: I220590162b24c70f404fe3087f19dd3e6cac3608
This commit is contained in:
@ -9,7 +9,6 @@ libwebpdecode_la_SOURCES += decode_vp8.h
|
||||
libwebpdecode_la_SOURCES += frame.c
|
||||
libwebpdecode_la_SOURCES += idec.c
|
||||
libwebpdecode_la_SOURCES += io.c
|
||||
libwebpdecode_la_SOURCES += layer.c
|
||||
libwebpdecode_la_SOURCES += quant.c
|
||||
libwebpdecode_la_SOURCES += tree.c
|
||||
libwebpdecode_la_SOURCES += vp8.c
|
||||
|
@ -1,30 +0,0 @@
|
||||
// Copyright 2011 Google Inc. All Rights Reserved.
|
||||
//
|
||||
// Use of this source code is governed by a BSD-style license
|
||||
// that can be found in the COPYING file in the root of the source
|
||||
// tree. An additional intellectual property rights grant can be found
|
||||
// in the file PATENTS. All contributing project authors may
|
||||
// be found in the AUTHORS file in the root of the source tree.
|
||||
// -----------------------------------------------------------------------------
|
||||
//
|
||||
// Enhancement layer (for YUV444/422)
|
||||
//
|
||||
// Author: Skal (pascal.massimino@gmail.com)
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "./vp8i.h"
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
int VP8DecodeLayer(VP8Decoder* const dec) {
|
||||
assert(dec);
|
||||
assert(dec->layer_data_size_ > 0);
|
||||
(void)dec;
|
||||
|
||||
// TODO: handle enhancement layer here.
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -297,11 +297,6 @@ struct VP8Decoder {
|
||||
size_t alpha_data_size_;
|
||||
int is_alpha_decoded_; // true if alpha_data_ is decoded in alpha_plane_
|
||||
uint8_t* alpha_plane_; // output. Persistent, contains the whole data.
|
||||
|
||||
// extensions
|
||||
int layer_colorspace_;
|
||||
const uint8_t* layer_data_; // compressed layer data (if present)
|
||||
size_t layer_data_size_;
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
@ -349,9 +344,6 @@ int VP8DecodeMB(VP8Decoder* const dec, VP8BitReader* const token_br);
|
||||
const uint8_t* VP8DecompressAlphaRows(VP8Decoder* const dec,
|
||||
int row, int num_rows);
|
||||
|
||||
// in layer.c
|
||||
int VP8DecodeLayer(VP8Decoder* const dec);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
Reference in New Issue
Block a user