1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-19 14:31:59 +00:00

Update libwebp to 1.0.1

This commit is contained in:
volzhs
2018-12-10 22:33:51 +09:00
parent bf59b73250
commit d4133ac844
65 changed files with 585 additions and 874 deletions

View File

@@ -187,4 +187,4 @@ static WEBP_INLINE int VP8GetBitAlt(VP8BitReader* const br, int prob) {
} // extern "C"
#endif
#endif // WEBP_UTILS_BIT_READER_INL_UTILS_H_
#endif // WEBP_UTILS_BIT_READER_INL_UTILS_H_

View File

@@ -182,4 +182,4 @@ static WEBP_INLINE void VP8LFillBitWindow(VP8LBitReader* const br) {
} // extern "C"
#endif
#endif /* WEBP_UTILS_BIT_READER_UTILS_H_ */
#endif // WEBP_UTILS_BIT_READER_UTILS_H_

View File

@@ -151,4 +151,4 @@ static WEBP_INLINE void VP8LPutBits(VP8LBitWriter* const bw,
} // extern "C"
#endif
#endif /* WEBP_UTILS_BIT_WRITER_UTILS_H_ */
#endif // WEBP_UTILS_BIT_WRITER_UTILS_H_

View File

@@ -29,4 +29,4 @@ WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data,
} // extern "C"
#endif
#endif /* WEBP_UTILS_FILTERS_UTILS_H_ */
#endif // WEBP_UTILS_FILTERS_UTILS_H_

View File

@@ -261,9 +261,15 @@ static void CleanupParams(SmoothParams* const p) {
int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride,
int strength) {
const int radius = 4 * strength / 100;
int radius = 4 * strength / 100;
if (strength < 0 || strength > 100) return 0;
if (data == NULL || width <= 0 || height <= 0) return 0; // bad params
// limit the filter size to not exceed the image dimensions
if (2 * radius + 1 > width) radius = (width - 1) >> 1;
if (2 * radius + 1 > height) radius = (height - 1) >> 1;
if (radius > 0) {
SmoothParams p;
memset(&p, 0, sizeof(p));

View File

@@ -32,4 +32,4 @@ int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride,
} // extern "C"
#endif
#endif /* WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_ */
#endif // WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_

View File

@@ -33,4 +33,4 @@ int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels,
} // extern "C"
#endif
#endif /* WEBP_UTILS_QUANT_LEVELS_UTILS_H_ */
#endif // WEBP_UTILS_QUANT_LEVELS_UTILS_H_

View File

@@ -60,4 +60,4 @@ static WEBP_INLINE int VP8RandomBits(VP8Random* const rg, int num_bits) {
} // extern "C"
#endif
#endif /* WEBP_UTILS_RANDOM_UTILS_H_ */
#endif // WEBP_UTILS_RANDOM_UTILS_H_

View File

@@ -98,4 +98,4 @@ int WebPRescalerHasPendingOutput(const WebPRescaler* const rescaler) {
} // extern "C"
#endif
#endif /* WEBP_UTILS_RESCALER_UTILS_H_ */
#endif // WEBP_UTILS_RESCALER_UTILS_H_

View File

@@ -87,4 +87,4 @@ WEBP_EXTERN const WebPWorkerInterface* WebPGetWorkerInterface(void);
} // extern "C"
#endif
#endif /* WEBP_UTILS_THREAD_UTILS_H_ */
#endif // WEBP_UTILS_THREAD_UTILS_H_

View File

@@ -175,4 +175,4 @@ WEBP_EXTERN int WebPGetColorPalette(const struct WebPPicture* const pic,
} // extern "C"
#endif
#endif /* WEBP_UTILS_UTILS_H_ */
#endif // WEBP_UTILS_UTILS_H_