summaryrefslogtreecommitdiffstats
path: root/media/libwebp/utils/rescaler_utils.c
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-07-18 08:24:24 +0200
commitfc61780b35af913801d72086456f493f63197da6 (patch)
treef85891288a7bd988da9f0f15ae64e5c63f00d493 /media/libwebp/utils/rescaler_utils.c
parent69f7f9e5f1475891ce11cc4f431692f965b0cd30 (diff)
parent50d3e596bbe89c95615f96eb71f6bc5be737a1db (diff)
downloadUXP-2018.07.18.tar
UXP-2018.07.18.tar.gz
UXP-2018.07.18.tar.lz
UXP-2018.07.18.tar.xz
UXP-2018.07.18.zip
Merge commit '50d3e596bbe89c95615f96eb71f6bc5be737a1db' into Basilisk-releasev2018.07.18
# Conflicts: # browser/app/profile/firefox.js # browser/components/preferences/jar.mn
Diffstat (limited to 'media/libwebp/utils/rescaler_utils.c')
-rw-r--r--media/libwebp/utils/rescaler_utils.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/media/libwebp/utils/rescaler_utils.c b/media/libwebp/utils/rescaler_utils.c
index 0d1f80da2..6e384f507 100644
--- a/media/libwebp/utils/rescaler_utils.c
+++ b/media/libwebp/utils/rescaler_utils.c
@@ -15,7 +15,7 @@
#include <stdlib.h>
#include <string.h>
#include "../dsp/dsp.h"
-#include "./rescaler_utils.h"
+#include "../utils/rescaler_utils.h"
//------------------------------------------------------------------------------
@@ -85,11 +85,13 @@ int WebPRescalerGetScaledDimensions(int src_width, int src_height,
// if width is unspecified, scale original proportionally to height ratio.
if (width == 0) {
- width = (src_width * height + src_height / 2) / src_height;
+ width =
+ (int)(((uint64_t)src_width * height + src_height / 2) / src_height);
}
// if height is unspecified, scale original proportionally to width ratio.
if (height == 0) {
- height = (src_height * width + src_width / 2) / src_width;
+ height =
+ (int)(((uint64_t)src_height * width + src_width / 2) / src_width);
}
// Check if the overall dimensions still make sense.
if (width <= 0 || height <= 0) {