mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-29 07:12:05 +02:00
Merge "Add fbounds-safety annotations for data
." into main
This commit is contained in:
@@ -33,8 +33,9 @@ static WEBP_INLINE int GradientPredictor(uint8_t a, uint8_t b, uint8_t c) {
|
|||||||
return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit
|
return ((g & ~0xff) == 0) ? g : (g < 0) ? 0 : 255; // clip to 8bit
|
||||||
}
|
}
|
||||||
|
|
||||||
WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, int width,
|
WEBP_FILTER_TYPE WebPEstimateBestFilter(
|
||||||
int height, int stride) {
|
const uint8_t* WEBP_COUNTED_BY((size_t)width* height) data, int width,
|
||||||
|
int height, int stride) {
|
||||||
int i, j;
|
int i, j;
|
||||||
int bins[WEBP_FILTER_LAST][SMAX];
|
int bins[WEBP_FILTER_LAST][SMAX];
|
||||||
WEBP_UNSAFE_MEMSET(bins, 0, sizeof(bins));
|
WEBP_UNSAFE_MEMSET(bins, 0, sizeof(bins));
|
||||||
|
@@ -25,8 +25,9 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Fast estimate of a potentially good filter.
|
// Fast estimate of a potentially good filter.
|
||||||
WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, int width,
|
WEBP_FILTER_TYPE WebPEstimateBestFilter(
|
||||||
int height, int stride);
|
const uint8_t* WEBP_COUNTED_BY((size_t)width* height) data, int width,
|
||||||
|
int height, int stride);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
Reference in New Issue
Block a user