mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 06:49:53 +02:00
enc: disable pic->stats/extra_info w/WEBP_DISABLE_STATS
Change-Id: I4ca3fa45710bd6bbe131b2ae047b1e268241657c
This commit is contained in:
@ -289,11 +289,17 @@ static int GeneratePartition0(VP8Encoder* const enc) {
|
||||
|
||||
pos3 = VP8BitWriterPos(bw);
|
||||
|
||||
#if !defined(WEBP_DISABLE_STATS)
|
||||
if (enc->pic_->stats) {
|
||||
enc->pic_->stats->header_bytes[0] = (int)((pos2 - pos1 + 7) >> 3);
|
||||
enc->pic_->stats->header_bytes[1] = (int)((pos3 - pos2 + 7) >> 3);
|
||||
enc->pic_->stats->alpha_data_size = (int)enc->alpha_data_size_;
|
||||
}
|
||||
#else
|
||||
(void)pos1;
|
||||
(void)pos2;
|
||||
(void)pos3;
|
||||
#endif
|
||||
if (bw->error_) {
|
||||
return WebPEncodingSetError(enc->pic_, VP8_ENC_ERROR_OUT_OF_MEMORY);
|
||||
}
|
||||
|
Reference in New Issue
Block a user