From a7aa7525b86cbcacef18c66af305224506fdb7de Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Fri, 3 May 2024 20:10:46 +0200 Subject: [PATCH] Fix some function declarations - fix some function declarations to match the implementation - fix some consts Change-Id: I8c89f49ec68d3dd1db7f8ee5cac73777f52d2576 --- src/enc/predictor_enc.c | 10 +++++----- src/enc/vp8l_enc.c | 4 ++-- src/enc/vp8li_enc.h | 7 ++++--- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/enc/predictor_enc.c b/src/enc/predictor_enc.c index b3d44b59d5..71c3ca3bbc 100644 --- a/src/enc/predictor_enc.c +++ b/src/enc/predictor_enc.c @@ -411,12 +411,12 @@ static int GetBestPredictorForTile(int width, int height, // If max_quantization > 1, applies near lossless processing, quantizing // residuals to multiples of quantization levels up to max_quantization // (the actual quantization level depends on smoothness near the given pixel). -static void CopyImageWithPrediction(int width, int height, - int bits, uint32_t* const modes, +static void CopyImageWithPrediction(int width, int height, int bits, + const uint32_t* const modes, uint32_t* const argb_scratch, - uint32_t* const argb, - int low_effort, int max_quantization, - int exact, int used_subtract_green) { + uint32_t* const argb, int low_effort, + int max_quantization, int exact, + int used_subtract_green) { const int tiles_per_row = VP8LSubSampleSize(width, bits); // The width of upper_row and current_row is one pixel larger than image width // to allow the top right pixel to point to the leftmost pixel of the next row diff --git a/src/enc/vp8l_enc.c b/src/enc/vp8l_enc.c index 40eafa4169..d1e4b2ae38 100644 --- a/src/enc/vp8l_enc.c +++ b/src/enc/vp8l_enc.c @@ -1064,8 +1064,8 @@ static void ApplySubtractGreen(VP8LEncoder* const enc, int width, int height, VP8LSubtractGreenFromBlueAndRed(enc->argb_, width * height); } -static int ApplyPredictFilter(const VP8LEncoder* const enc, int width, - int height, int quality, int low_effort, +static int ApplyPredictFilter(VP8LEncoder* const enc, int width, int height, + int quality, int low_effort, int used_subtract_green, VP8LBitWriter* const bw, int percent_range, int* const percent) { const int pred_bits = enc->transform_bits_; diff --git a/src/enc/vp8li_enc.h b/src/enc/vp8li_enc.h index c5b60dcb39..2f04b6db82 100644 --- a/src/enc/vp8li_enc.h +++ b/src/enc/vp8li_enc.h @@ -106,9 +106,10 @@ int VP8ApplyNearLossless(const WebPPicture* const picture, int quality, // Returns false in case of error (stored in pic->error_code). int VP8LResidualImage(int width, int height, int bits, int low_effort, uint32_t* const argb, uint32_t* const argb_scratch, - uint32_t* const image, int near_lossless, int exact, - int used_subtract_green, const WebPPicture* const pic, - int percent_range, int* const percent); + uint32_t* const image, int near_lossless_quality, + int exact, int used_subtract_green, + const WebPPicture* const pic, int percent_range, + int* const percent); int VP8LColorSpaceTransform(int width, int height, int bits, int quality, uint32_t* const argb, uint32_t* image,