mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-28 14:52:28 +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
|
||||
}
|
||||
|
||||
WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, int width,
|
||||
int height, int stride) {
|
||||
WEBP_FILTER_TYPE WebPEstimateBestFilter(
|
||||
const uint8_t* WEBP_COUNTED_BY((size_t)width* height) data, int width,
|
||||
int height, int stride) {
|
||||
int i, j;
|
||||
int bins[WEBP_FILTER_LAST][SMAX];
|
||||
WEBP_UNSAFE_MEMSET(bins, 0, sizeof(bins));
|
||||
|
@@ -25,8 +25,9 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
// Fast estimate of a potentially good filter.
|
||||
WEBP_FILTER_TYPE WebPEstimateBestFilter(const uint8_t* data, int width,
|
||||
int height, int stride);
|
||||
WEBP_FILTER_TYPE WebPEstimateBestFilter(
|
||||
const uint8_t* WEBP_COUNTED_BY((size_t)width* height) data, int width,
|
||||
int height, int stride);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
Reference in New Issue
Block a user