Full and final fix for prediction transform

use (tile_size + 1) rows of scratch area.

Change-Id: I06d612fff1794fc045ba76275e94e7210802c332
This commit is contained in:
Urvang Joshi
2012-04-19 12:11:28 +00:00
committed by James Zern
parent afd2102f43
commit 0993a611cd
3 changed files with 34 additions and 33 deletions

View File

@ -1039,7 +1039,7 @@ static WebPEncodingError AllocateTransformBuffer(VP8LEncoder* const enc,
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 = tile_size * tile_size;
const size_t argb_scratch_size = (tile_size + 1) * width;
const size_t transform_data_size =
VP8LSubSampleSize(height, enc->transform_bits_) *
VP8LSubSampleSize(width, enc->transform_bits_);

View File

@ -38,7 +38,7 @@ typedef struct {
WebPPicture* pic_; // input picture.
uint32_t* argb_; // Transformed argb image data.
uint32_t* argb_scratch_; // Scratch memory for one argb tile
uint32_t* argb_scratch_; // Scratch memory for argb rows
// (used for prediction).
uint32_t* transform_data_; // Scratch memory for transform data.
int current_width_; // Corresponds to packed image width.