From 9e8e1b7b2a0b51521eee41fd5929327947be4e42 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Tue, 21 Jun 2016 16:04:53 +0200 Subject: [PATCH] Inline GetResidual for speed. Change-Id: Ib4228e87dc448866229c0795ca68dabe777ef31c --- src/dsp/lossless_enc.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/dsp/lossless_enc.c b/src/dsp/lossless_enc.c index 0c7bd403..256f6f5f 100644 --- a/src/dsp/lossless_enc.c +++ b/src/dsp/lossless_enc.c @@ -684,14 +684,13 @@ static uint32_t NearLossless(uint32_t value, uint32_t predict, // Returns the difference between the pixel and its prediction. In case of a // lossy encoding, updates the source image to avoid propagating the deviation // further to pixels which depend on the current pixel for their predictions. -static uint32_t GetResidual(int width, int height, - uint32_t* const upper_row, - uint32_t* const current_row, - const uint8_t* const max_diffs, - int mode, VP8LPredictorFunc pred_func, - int x, int y, - int max_quantization, - int exact, int used_subtract_green) { +static WEBP_INLINE uint32_t GetResidual(int width, int height, + uint32_t* const upper_row, + uint32_t* const current_row, + const uint8_t* const max_diffs, + int mode, VP8LPredictorFunc pred_func, + int x, int y, int max_quantization, + int exact, int used_subtract_green) { const uint32_t predict = Predict(pred_func, x, y, current_row, upper_row); uint32_t residual; if (max_quantization == 1 || mode == 0 || y == 0 || y == height - 1 ||