]> granicus.if.org Git - libvpx/commitdiff
Move abs() to where it is effective
authorJohann <johannkoenig@google.com>
Tue, 8 Jul 2014 20:57:49 +0000 (13:57 -0700)
committerJohann <johannkoenig@google.com>
Tue, 8 Jul 2014 21:06:33 +0000 (14:06 -0700)
vp8/encoder/x86/denoising_sse2.c:35:10: error: taking the absolute value
of unsigned type 'unsigned int' has no effect [-Werror,-Wabsolute-value]

Change-Id: I749ba8e6f55dbd9b822bfd4260a8397554f5e524

vp8/encoder/x86/denoising_sse2.c

index b84795ceb498667b3aaf1f69275cf6669725a499..3a4cf7ee792f3dffac8a23250e957b9da6d12855 100644 (file)
@@ -30,9 +30,9 @@ static INLINE unsigned int abs_sum_diff_16x1(__m128i acc_diff) {
                                           _mm_srli_si128(hg_fe_dc_ba, 8));
   const __m128i hgfedcba = _mm_add_epi32(hgfe_dcba,
                                          _mm_srli_si128(hgfe_dcba, 4));
-  unsigned int sum_diff = _mm_cvtsi128_si32(hgfedcba);
+  unsigned int sum_diff = abs(_mm_cvtsi128_si32(hgfedcba));
 
-  return abs(sum_diff);
+  return sum_diff;
 }
 
 int vp8_denoiser_filter_sse2(unsigned char *mc_running_avg_y,