From 92dbf23775b41872b514e91b11c3f2cac039d4b7 Mon Sep 17 00:00:00 2001 From: James Zern Date: Mon, 1 Jul 2019 12:17:43 -0700 Subject: [PATCH] filters_sse2,cosmetics: shorten some long lines Change-Id: Ifd8ddec50821aba175d41237df18e41b9ac6c7d4 --- src/dsp/filters_sse2.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/dsp/filters_sse2.c b/src/dsp/filters_sse2.c index 30646e40..4b3f2d02 100644 --- a/src/dsp/filters_sse2.c +++ b/src/dsp/filters_sse2.c @@ -163,8 +163,8 @@ static void GradientPredictDirect_SSE2(const uint8_t* const row, _mm_storel_epi64((__m128i*)(out + i), H); } for (; i < length; ++i) { - out[i] = (uint8_t)(row[i] - - GradientPredictor_SSE2(row[i - 1], top[i], top[i - 1])); + const int delta = GradientPredictor_SSE2(row[i - 1], top[i], top[i - 1]); + out[i] = (uint8_t)(row[i] - delta); } } @@ -297,9 +297,8 @@ static void GradientPredictInverse_SSE2(const uint8_t* const in, _mm_storel_epi64((__m128i*)&row[i], out); } for (; i < length; ++i) { - row[i] = - (uint8_t)(in[i] + - GradientPredictor_SSE2(row[i - 1], top[i], top[i - 1])); + const int delta = GradientPredictor_SSE2(row[i - 1], top[i], top[i - 1]); + row[i] = (uint8_t)(in[i] + delta); } } }