Switch remaining Neon variance functions to shifts
Saves 5 instructions on 8x8 and 16x16 and 8 instructions on 32x32, when compiled with 4.9. Change-Id: Id3da613a36a9d27d8c5169c59ba45d247c920c6c
This commit is contained in:
parent
bd3dbc588c
commit
588f74f8a6
@ -91,7 +91,7 @@ unsigned int vp9_variance8x8_neon(const uint8_t *a, int a_stride,
|
||||
unsigned int *sse) {
|
||||
int sum;
|
||||
variance_neon_w8(a, a_stride, b, b_stride, kWidth8, kHeight8, sse, &sum);
|
||||
return *sse - (((int64_t)sum * sum) / (kWidth8 * kHeight8));
|
||||
return *sse - (((int64_t)sum * sum) >> 6); // >> 6 = / 8 * 8
|
||||
}
|
||||
|
||||
void vp9_get16x16var_neon(const uint8_t *src_ptr, int source_stride,
|
||||
@ -106,7 +106,7 @@ unsigned int vp9_variance16x16_neon(const uint8_t *a, int a_stride,
|
||||
unsigned int *sse) {
|
||||
int sum;
|
||||
variance_neon_w8(a, a_stride, b, b_stride, kWidth16, kHeight16, sse, &sum);
|
||||
return *sse - (((int64_t)sum * sum) / (kWidth16 * kHeight16));
|
||||
return *sse - (((int64_t)sum * sum) >> 8); // >> 8 = / 16 * 16
|
||||
}
|
||||
|
||||
static void var_filter_block2d_bil_w8(const uint8_t *src_ptr,
|
||||
@ -208,7 +208,7 @@ unsigned int vp9_variance32x32_neon(const uint8_t *a, int a_stride,
|
||||
unsigned int *sse) {
|
||||
int sum;
|
||||
variance_neon_w8(a, a_stride, b, b_stride, kWidth32, kHeight32, sse, &sum);
|
||||
return *sse - (((int64_t)sum * sum) / (kWidth32 * kHeight32));
|
||||
return *sse - (((int64_t)sum * sum) >> 10); // >> 10 = / 32 * 32
|
||||
}
|
||||
|
||||
unsigned int vp9_variance32x64_neon(const uint8_t *a, int a_stride,
|
||||
|
Loading…
x
Reference in New Issue
Block a user