From d516a68e547d49385fb06d17307448fcc00f5ac6 Mon Sep 17 00:00:00 2001 From: James Zern Date: Tue, 8 Oct 2024 13:41:16 -0700 Subject: [PATCH] lossless.h: fix function declaration mismatches These appear as warnings under VS15 (16 and 17 are silent) and were missed in: a32b436b dsp/lossless*: use WEBP_RESTRICT qualifier Change-Id: Ia7cffafc166f2da93b51714363558798cda71b67 --- src/dsp/lossless.h | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/src/dsp/lossless.h b/src/dsp/lossless.h index a72e3b2a..bbc1b8d3 100644 --- a/src/dsp/lossless.h +++ b/src/dsp/lossless.h @@ -128,13 +128,16 @@ void VP8LTransformColorInverse_C(const VP8LMultipliers* const m, const uint32_t* src, int num_pixels, uint32_t* dst); -void VP8LConvertBGRAToRGB_C(const uint32_t* src, int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToRGBA_C(const uint32_t* src, int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToRGBA4444_C(const uint32_t* src, - int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToRGB565_C(const uint32_t* src, - int num_pixels, uint8_t* dst); -void VP8LConvertBGRAToBGR_C(const uint32_t* src, int num_pixels, uint8_t* dst); +void VP8LConvertBGRAToRGB_C(const uint32_t* WEBP_RESTRICT src, int num_pixels, + uint8_t* WEBP_RESTRICT dst); +void VP8LConvertBGRAToRGBA_C(const uint32_t* WEBP_RESTRICT src, int num_pixels, + uint8_t* WEBP_RESTRICT dst); +void VP8LConvertBGRAToRGBA4444_C(const uint32_t* WEBP_RESTRICT src, + int num_pixels, uint8_t* WEBP_RESTRICT dst); +void VP8LConvertBGRAToRGB565_C(const uint32_t* WEBP_RESTRICT src, + int num_pixels, uint8_t* WEBP_RESTRICT dst); +void VP8LConvertBGRAToBGR_C(const uint32_t* WEBP_RESTRICT src, int num_pixels, + uint8_t* WEBP_RESTRICT dst); void VP8LAddGreenToBlueAndRed_C(const uint32_t* src, int num_pixels, uint32_t* dst); @@ -165,8 +168,7 @@ extern VP8LCollectColorRedTransformsFunc VP8LCollectColorRedTransforms; // Expose some C-only fallback functions void VP8LTransformColor_C(const VP8LMultipliers* WEBP_RESTRICT const m, uint32_t* WEBP_RESTRICT data, int num_pixels); -void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* WEBP_RESTRICT argb_data, - int num_pixels); +void VP8LSubtractGreenFromBlueAndRed_C(uint32_t* argb_data, int num_pixels); void VP8LCollectColorRedTransforms_C(const uint32_t* WEBP_RESTRICT argb, int stride, int tile_width, int tile_height, @@ -227,8 +229,8 @@ typedef void (*VP8LGetEntropyUnrefinedFunc)( VP8LStreaks* WEBP_RESTRICT const stats); extern VP8LGetEntropyUnrefinedFunc VP8LGetEntropyUnrefined; -void VP8LBitsEntropyUnrefined(const uint32_t* const array, int n, - VP8LBitEntropy* const entropy); +void VP8LBitsEntropyUnrefined(const uint32_t* WEBP_RESTRICT const array, int n, + VP8LBitEntropy* WEBP_RESTRICT const entropy); typedef void (*VP8LAddVectorFunc)(const uint32_t* WEBP_RESTRICT a, const uint32_t* WEBP_RESTRICT b,