mirror of
https://github.com/webmproject/libwebp.git
synced 2025-08-29 15:22:12 +02:00
Merge "Add fbounds-safety annotations for data
." into main
This commit is contained in:
@@ -30,8 +30,8 @@ WEBP_ASSUME_UNSAFE_INDEXABLE_ABI
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// Quantize levels.
|
// Quantize levels.
|
||||||
|
|
||||||
int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels,
|
int QuantizeLevels(uint8_t* const WEBP_COUNTED_BY((size_t)width* height) data,
|
||||||
uint64_t* const sse) {
|
int width, int height, int num_levels, uint64_t* const sse) {
|
||||||
int freq[NUM_SYMBOLS] = {0};
|
int freq[NUM_SYMBOLS] = {0};
|
||||||
int q_level[NUM_SYMBOLS] = {0};
|
int q_level[NUM_SYMBOLS] = {0};
|
||||||
double inv_q_level[NUM_SYMBOLS] = {0};
|
double inv_q_level[NUM_SYMBOLS] = {0};
|
||||||
|
@@ -29,8 +29,8 @@ extern "C" {
|
|||||||
// quantized values. If not NULL, 'sse' will contain the sum of squared error.
|
// quantized values. If not NULL, 'sse' will contain the sum of squared error.
|
||||||
// Valid range for 'num_levels' is [2, 256].
|
// Valid range for 'num_levels' is [2, 256].
|
||||||
// Returns false in case of error (data is NULL, or parameters are invalid).
|
// Returns false in case of error (data is NULL, or parameters are invalid).
|
||||||
int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels,
|
int QuantizeLevels(uint8_t* const WEBP_COUNTED_BY((size_t)width* height) data,
|
||||||
uint64_t* const sse);
|
int width, int height, int num_levels, uint64_t* const sse);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
Reference in New Issue
Block a user