Merge "variance_neon: sync variance*() w/c,sse2"

This commit is contained in:
James Zern 2016-09-23 02:18:49 +00:00 committed by Gerrit Code Review
commit a914ffad97

View File

@ -75,7 +75,7 @@ unsigned int vpx_variance8x8_neon(const uint8_t *a, int a_stride,
unsigned int *sse) {
int sum;
variance_neon_w8(a, a_stride, b, b_stride, 8, 8, sse, &sum);
return *sse - (((int64_t)sum * sum) >> 6); // >> 6 = / 8 * 8
return *sse - ((sum * sum) >> 6);
}
unsigned int vpx_variance16x16_neon(const uint8_t *a, int a_stride,
@ -83,7 +83,7 @@ unsigned int vpx_variance16x16_neon(const uint8_t *a, int a_stride,
unsigned int *sse) {
int sum;
variance_neon_w8(a, a_stride, b, b_stride, 16, 16, sse, &sum);
return *sse - (((int64_t)sum * sum) >> 8); // >> 8 = / 16 * 16
return *sse - (((uint32_t)((int64_t)sum * sum)) >> 8);
}
unsigned int vpx_variance32x32_neon(const uint8_t *a, int a_stride,
@ -91,7 +91,7 @@ unsigned int vpx_variance32x32_neon(const uint8_t *a, int a_stride,
unsigned int *sse) {
int sum;
variance_neon_w8(a, a_stride, b, b_stride, 32, 32, sse, &sum);
return *sse - (((int64_t)sum * sum) >> 10); // >> 10 = / 32 * 32
return *sse - (unsigned int)(((int64_t)sum * sum) >> 10);
}
unsigned int vpx_variance32x64_neon(const uint8_t *a, int a_stride,
@ -104,7 +104,7 @@ unsigned int vpx_variance32x64_neon(const uint8_t *a, int a_stride,
32, 32, &sse2, &sum2);
*sse = sse1 + sse2;
sum1 += sum2;
return *sse - (((int64_t)sum1 * sum1) >> 11); // >> 11 = / 32 * 64
return *sse - (unsigned int)(((int64_t)sum1 * sum1) >> 11);
}
unsigned int vpx_variance64x32_neon(const uint8_t *a, int a_stride,
@ -117,7 +117,7 @@ unsigned int vpx_variance64x32_neon(const uint8_t *a, int a_stride,
64, 16, &sse2, &sum2);
*sse = sse1 + sse2;
sum1 += sum2;
return *sse - (((int64_t)sum1 * sum1) >> 11); // >> 11 = / 32 * 64
return *sse - (unsigned int)(((int64_t)sum1 * sum1) >> 11);
}
unsigned int vpx_variance64x64_neon(const uint8_t *a, int a_stride,
@ -141,7 +141,7 @@ unsigned int vpx_variance64x64_neon(const uint8_t *a, int a_stride,
b_stride, 64, 16, &sse2, &sum2);
*sse = sse1 + sse2;
sum1 += sum2;
return *sse - (((int64_t)sum1 * sum1) >> 12); // >> 12 = / 64 * 64
return *sse - (unsigned int)(((int64_t)sum1 * sum1) >> 12);
}
unsigned int vpx_variance16x8_neon(const unsigned char *src_ptr,