Index: third_party/libwebp/dec/vp8l.c |
diff --git a/third_party/libwebp/dec/vp8l.c b/third_party/libwebp/dec/vp8l.c |
index e2780e5b2d62834245d869a3ffb3f10ec4f965c5..2fa5f4046b3803b8ced855569cf34134f41da721 100644 |
--- a/third_party/libwebp/dec/vp8l.c |
+++ b/third_party/libwebp/dec/vp8l.c |
@@ -390,13 +390,13 @@ static int AllocateAndInitRescaler(VP8LDecoder* const dec, VP8Io* const io) { |
const int in_height = io->mb_h; |
const int out_height = io->scaled_height; |
const uint64_t work_size = 2 * num_channels * (uint64_t)out_width; |
- int32_t* work; // Rescaler work area. |
- const uint64_t scaled_data_size = num_channels * (uint64_t)out_width; |
+ rescaler_t* work; // Rescaler work area. |
+ const uint64_t scaled_data_size = (uint64_t)out_width; |
uint32_t* scaled_data; // Temporary storage for scaled BGRA data. |
const uint64_t memory_size = sizeof(*dec->rescaler) + |
work_size * sizeof(*work) + |
scaled_data_size * sizeof(*scaled_data); |
- uint8_t* memory = (uint8_t*)WebPSafeCalloc(memory_size, sizeof(*memory)); |
+ uint8_t* memory = (uint8_t*)WebPSafeMalloc(memory_size, sizeof(*memory)); |
if (memory == NULL) { |
dec->status_ = VP8_STATUS_OUT_OF_MEMORY; |
return 0; |
@@ -406,13 +406,12 @@ static int AllocateAndInitRescaler(VP8LDecoder* const dec, VP8Io* const io) { |
dec->rescaler = (WebPRescaler*)memory; |
memory += sizeof(*dec->rescaler); |
- work = (int32_t*)memory; |
+ work = (rescaler_t*)memory; |
memory += work_size * sizeof(*work); |
scaled_data = (uint32_t*)memory; |
WebPRescalerInit(dec->rescaler, in_width, in_height, (uint8_t*)scaled_data, |
- out_width, out_height, 0, num_channels, |
- in_width, out_width, in_height, out_height, work); |
+ out_width, out_height, 0, num_channels, work); |
return 1; |
} |
@@ -427,7 +426,7 @@ static int Export(WebPRescaler* const rescaler, WEBP_CSP_MODE colorspace, |
int num_lines_out = 0; |
while (WebPRescalerHasPendingOutput(rescaler)) { |
uint8_t* const dst = rgba + num_lines_out * rgba_stride; |
- WebPRescalerExportRow(rescaler, 0); |
+ WebPRescalerExportRow(rescaler); |
WebPMultARGBRow(src, dst_width, 1); |
VP8LConvertFromBGRA(src, dst_width, colorspace, dst); |
++num_lines_out; |
@@ -545,7 +544,7 @@ static int ExportYUVA(const VP8LDecoder* const dec, int y_pos) { |
const int dst_width = rescaler->dst_width; |
int num_lines_out = 0; |
while (WebPRescalerHasPendingOutput(rescaler)) { |
- WebPRescalerExportRow(rescaler, 0); |
+ WebPRescalerExportRow(rescaler); |
WebPMultARGBRow(src, dst_width, 1); |
ConvertToYUVA(src, dst_width, y_pos, dec->output_); |
++y_pos; |