mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
Fix prediction transform in lossless encoder.
(Keep one tile as a scratch buffer). Change-Id: If112ada29bfd0bdc81b82e849a566b30dd331d2f
This commit is contained in:
@ -1036,8 +1036,9 @@ static void DeleteVP8LEncoder(VP8LEncoder* enc) {
|
||||
static WebPEncodingError AllocateTransformBuffer(VP8LEncoder* const enc,
|
||||
int height, int width) {
|
||||
WebPEncodingError err = VP8_ENC_OK;
|
||||
const size_t tile_size = 1 << enc->transform_bits_;
|
||||
const size_t image_size = height * width;
|
||||
const size_t argb_scratch_size = 2 * width;
|
||||
const size_t argb_scratch_size = tile_size * tile_size;
|
||||
const size_t transform_data_size =
|
||||
VP8LSubSampleSize(height, enc->transform_bits_) *
|
||||
VP8LSubSampleSize(width, enc->transform_bits_);
|
||||
|
@ -38,7 +38,7 @@ typedef struct {
|
||||
WebPPicture* pic_; // input picture.
|
||||
|
||||
uint32_t* argb_; // Transformed argb image data.
|
||||
uint32_t* argb_scratch_; // Scratch memory for current and top row.
|
||||
uint32_t* argb_scratch_; // Scratch memory for one argb tile
|
||||
// (used for prediction).
|
||||
uint32_t* transform_data_; // Scratch memory for transform data.
|
||||
int current_width_; // Corresponds to packed image width.
|
||||
|
Reference in New Issue
Block a user