Index: third_party/libwebp/enc/picture_rescale.c |
diff --git a/third_party/libwebp/enc/picture_rescale.c b/third_party/libwebp/enc/picture_rescale.c |
index de52848ced6936360a51864479bdf5bc717ea292..9e45551383be8d53ec87e9ddcfde15738d092be6 100644 |
--- a/third_party/libwebp/enc/picture_rescale.c |
+++ b/third_party/libwebp/enc/picture_rescale.c |
@@ -175,17 +175,13 @@ static void RescalePlane(const uint8_t* src, |
int src_width, int src_height, int src_stride, |
uint8_t* dst, |
int dst_width, int dst_height, int dst_stride, |
- int32_t* const work, |
+ rescaler_t* const work, |
int num_channels) { |
WebPRescaler rescaler; |
int y = 0; |
WebPRescalerInit(&rescaler, src_width, src_height, |
dst, dst_width, dst_height, dst_stride, |
- num_channels, |
- src_width, dst_width, |
- src_height, dst_height, |
- work); |
- memset(work, 0, 2 * dst_width * num_channels * sizeof(*work)); |
+ num_channels, work); |
while (y < src_height) { |
y += WebPRescalerImport(&rescaler, src_height - y, |
src + y * src_stride, src_stride); |
@@ -209,7 +205,7 @@ static void AlphaMultiplyY(WebPPicture* const pic, int inverse) { |
int WebPPictureRescale(WebPPicture* pic, int width, int height) { |
WebPPicture tmp; |
int prev_width, prev_height; |
- int32_t* work; |
+ rescaler_t* work; |
if (pic == NULL) return 0; |
prev_width = pic->width; |
@@ -231,7 +227,7 @@ int WebPPictureRescale(WebPPicture* pic, int width, int height) { |
if (!WebPPictureAlloc(&tmp)) return 0; |
if (!pic->use_argb) { |
- work = (int32_t*)WebPSafeMalloc(2ULL * width, sizeof(*work)); |
+ work = (rescaler_t*)WebPSafeMalloc(2ULL * width, sizeof(*work)); |
if (work == NULL) { |
WebPPictureFree(&tmp); |
return 0; |
@@ -259,7 +255,7 @@ int WebPPictureRescale(WebPPicture* pic, int width, int height) { |
tmp.v, |
HALVE(width), HALVE(height), tmp.uv_stride, work, 1); |
} else { |
- work = (int32_t*)WebPSafeMalloc(2ULL * width * 4, sizeof(*work)); |
+ work = (rescaler_t*)WebPSafeMalloc(2ULL * width * 4, sizeof(*work)); |
if (work == NULL) { |
WebPPictureFree(&tmp); |
return 0; |