mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 13:29:54 +02:00
Compare commits
1 Commits
1.3.0
...
chrome-m11
Author | SHA1 | Date | |
---|---|---|---|
a450afed44 |
@ -141,11 +141,6 @@ static int EncodeAlphaInternal(const uint8_t* const data, int width, int height,
|
||||
!reduce_levels, &tmp_bw, &result->stats);
|
||||
if (ok) {
|
||||
output = VP8LBitWriterFinish(&tmp_bw);
|
||||
if (tmp_bw.error_) {
|
||||
VP8LBitWriterWipeOut(&tmp_bw);
|
||||
memset(&result->bw, 0, sizeof(result->bw));
|
||||
return 0;
|
||||
}
|
||||
output_size = VP8LBitWriterNumBytes(&tmp_bw);
|
||||
if (output_size > data_size) {
|
||||
// compressed size is larger than source! Revert to uncompressed mode.
|
||||
|
@ -1449,11 +1449,6 @@ static int WriteImage(const WebPPicture* const pic, VP8LBitWriter* const bw,
|
||||
const size_t vp8l_size = VP8L_SIGNATURE_SIZE + webpll_size;
|
||||
const size_t pad = vp8l_size & 1;
|
||||
const size_t riff_size = TAG_SIZE + CHUNK_HEADER_SIZE + vp8l_size + pad;
|
||||
*coded_size = 0;
|
||||
|
||||
if (bw->error_) {
|
||||
return WebPEncodingSetError(pic, VP8_ENC_ERROR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
||||
if (!WriteRiffHeader(pic, riff_size, vp8l_size) ||
|
||||
!pic->writer(webpll_data, webpll_size, pic)) {
|
||||
|
Reference in New Issue
Block a user