mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
remove unused ApplyInverseTransform()
transforms are only allowed for is_level0 Change-Id: Iec8ce8bdbe024aae6cae2688e2934ab8f445000c
This commit is contained in:
parent
93bf0faafa
commit
6f4272b090
@ -797,19 +797,6 @@ static void ClearTransform(VP8LTransform* const transform) {
|
|||||||
transform->data_ = NULL;
|
transform->data_ = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ApplyInverseTransforms(VP8LDecoder* const dec, int start_idx,
|
|
||||||
uint32_t* const decoded_data) {
|
|
||||||
int n = dec->next_transform_;
|
|
||||||
assert(start_idx >= 0);
|
|
||||||
while (n-- > start_idx) {
|
|
||||||
VP8LTransform* const transform = &dec->transforms_[n];
|
|
||||||
VP8LInverseTransform(transform, 0, transform->ysize_,
|
|
||||||
decoded_data, decoded_data);
|
|
||||||
ClearTransform(transform);
|
|
||||||
}
|
|
||||||
dec->next_transform_ = start_idx;
|
|
||||||
}
|
|
||||||
|
|
||||||
// For security reason, we need to remap the color map to span
|
// For security reason, we need to remap the color map to span
|
||||||
// the total possible bundled values, and not just the num_colors.
|
// the total possible bundled values, and not just the num_colors.
|
||||||
static int ExpandColorMap(int num_colors, VP8LTransform* const transform) {
|
static int ExpandColorMap(int num_colors, VP8LTransform* const transform) {
|
||||||
@ -964,7 +951,6 @@ static int DecodeImageStream(int xsize, int ysize,
|
|||||||
VP8LBitReader* const br = &dec->br_;
|
VP8LBitReader* const br = &dec->br_;
|
||||||
VP8LMetadata* const hdr = &dec->hdr_;
|
VP8LMetadata* const hdr = &dec->hdr_;
|
||||||
uint32_t* data = NULL;
|
uint32_t* data = NULL;
|
||||||
const int transform_start_idx = dec->next_transform_;
|
|
||||||
int color_cache_bits = 0;
|
int color_cache_bits = 0;
|
||||||
|
|
||||||
// Read the transforms (may recurse).
|
// Read the transforms (may recurse).
|
||||||
@ -1024,9 +1010,6 @@ static int DecodeImageStream(int xsize, int ysize,
|
|||||||
ok = DecodeImageData(dec, data, transform_xsize, transform_ysize, NULL);
|
ok = DecodeImageData(dec, data, transform_xsize, transform_ysize, NULL);
|
||||||
ok = ok && !br->error_;
|
ok = ok && !br->error_;
|
||||||
|
|
||||||
// Apply transforms on the decoded data.
|
|
||||||
if (ok) ApplyInverseTransforms(dec, transform_start_idx, data);
|
|
||||||
|
|
||||||
End:
|
End:
|
||||||
|
|
||||||
if (!ok) {
|
if (!ok) {
|
||||||
|
Loading…
Reference in New Issue
Block a user