diff options
author | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-08 09:06:25 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@theqtcompany.com> | 2015-12-08 20:43:30 +0000 |
commit | fa4ed3621c9e50441b98e6c52c9bbe3ad9438248 (patch) | |
tree | 33a5739b577def87b5ec563f3dd7a9f0132431ad /src/3rdparty/libwebp/src/enc/picture_rescale.c | |
parent | 531c30ea66d2b8fe517c89bed149a938e16332ec (diff) |
libwebp: update to 0.4.4
This commit imports libwebp 0.4.4, including AUTHORS, COPYING, ChangeLog,
NEWS, PATENTS, README and src directories. In src, only includes header
and source files.
The patches required to build it in Qt will follow in separate
commit(s).
Change-Id: Ib12593f56553e5358548c224d1855273f3fd2318
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Reviewed-by: aavit <eirik.aavitsland@theqtcompany.com>
Diffstat (limited to 'src/3rdparty/libwebp/src/enc/picture_rescale.c')
-rw-r--r-- | src/3rdparty/libwebp/src/enc/picture_rescale.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/3rdparty/libwebp/src/enc/picture_rescale.c b/src/3rdparty/libwebp/src/enc/picture_rescale.c index de52848..9e45551 100644 --- a/src/3rdparty/libwebp/src/enc/picture_rescale.c +++ b/src/3rdparty/libwebp/src/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; |