Skip to content

Commit

Permalink
Fix ARM build
Browse files Browse the repository at this point in the history
  • Loading branch information
stemidts authored and Thomas Davies committed Nov 9, 2017
1 parent 3930419 commit b453c6e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion common/common_frame.c
Expand Up @@ -797,7 +797,7 @@ void TEMPLATE(cdef_prepare_input)(int sizex, int sizey, int xpos, int ypos, boun
v128_store_aligned(src16 + j + i * stride16, v128_load_aligned(src_buffer + (ypos + i) * sstride + xpos + j)); v128_store_aligned(src16 + j + i * stride16, v128_load_aligned(src_buffer + (ypos + i) * sstride + xpos + j));
#else #else
if (sizex == 4) if (sizex == 4)
v64_store_aligned(src16 + 0 + i * stride16, v128_unpack_u8_s16(v64_from_32(0, u32_load_aligned(src_buffer + (ypos + i) * sstride + xpos + 0)))); v64_store_aligned(src16 + 0 + i * stride16, v128_low_v64(v128_unpack_u8_s16(v64_from_32(0, u32_load_aligned(src_buffer + (ypos + i) * sstride + xpos + 0)))));
else else
for (int j = 0; j < sizex; j += 8) for (int j = 0; j < sizex; j += 8)
v128_store_aligned(src16 + j + i * stride16, v128_unpack_u8_s16(v64_load_aligned(src_buffer + (ypos + i) * sstride + xpos + j))); v128_store_aligned(src16 + j + i * stride16, v128_unpack_u8_s16(v64_load_aligned(src_buffer + (ypos + i) * sstride + xpos + j)));
Expand Down
2 changes: 1 addition & 1 deletion common/common_kernels.c
Expand Up @@ -2525,7 +2525,7 @@ int TEMPLATE(cdef_find_dir_simd)(const SAMPLE *img, int stride, int32_t *var,
#else #else
v128 lines[8]; v128 lines[8];
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
lines[i] = v128_unpacklo_u8_s16(v64_load_unaligned(&img[i * stride])); lines[i] = v128_unpacklo_u8_s16(v128_from_v64(v64_zero(), v64_load_unaligned(&img[i * stride])));
lines[i] = lines[i] =
v128_sub_16(v128_shr_s16(lines[i], coeff_shift), v128_dup_16(128)); v128_sub_16(v128_shr_s16(lines[i], coeff_shift), v128_dup_16(128));
#endif #endif
Expand Down
18 changes: 9 additions & 9 deletions common/common_kernels_gen.c
Expand Up @@ -2525,7 +2525,7 @@ int TEMPLATE(cdef_find_dir_simd)(const SAMPLE *img, int stride, int32_t *var,
#else #else
v256 lines[8]; v256 lines[8];
for (i = 0; i < 8; i++) { for (i = 0; i < 8; i++) {
lines[i] = v256_unpacklo_u16_s32(v128_load_unaligned(&img[i * stride])); lines[i] = v256_unpacklo_u16_s32(v256_from_v128(v128_zero(), v128_load_unaligned(&img[i * stride])));
lines[i] = lines[i] =
v256_sub_32(v256_shr_s32(lines[i], coeff_shift), v256_dup_32(128)); v256_sub_32(v256_shr_s32(lines[i], coeff_shift), v256_dup_32(128));
#endif #endif
Expand Down Expand Up @@ -2623,8 +2623,8 @@ static void cdef_filter_block_4x4_8(uint8_t *dst, int dstride,
int s2o1 = cdef_directions[(dir + 6) & 7][0]; int s2o1 = cdef_directions[(dir + 6) & 7][0];
int s2o2 = cdef_directions[(dir + 6) & 7][1]; int s2o2 = cdef_directions[(dir + 6) & 7][1];


const int *pri_taps = cdef_pri_taps[pri_strength & (1 << coeff_shift)]; const int *pri_taps = cdef_pri_taps[(pri_strength >> coeff_shift) & 1];
const int *sec_taps = cdef_sec_taps[pri_strength & (1 << coeff_shift)]; const int *sec_taps = cdef_sec_taps[(pri_strength >> coeff_shift) & 1];


if (pri_strength) pri_damping -= log2i(pri_strength); if (pri_strength) pri_damping -= log2i(pri_strength);
if (sec_strength) sec_damping -= log2i(sec_strength); if (sec_strength) sec_damping -= log2i(sec_strength);
Expand Down Expand Up @@ -2816,8 +2816,8 @@ static void cdef_filter_block_8x8_8(uint8_t *dst, int dstride,
int s2o1 = cdef_directions[(dir + 6) & 7][0]; int s2o1 = cdef_directions[(dir + 6) & 7][0];
int s2o2 = cdef_directions[(dir + 6) & 7][1]; int s2o2 = cdef_directions[(dir + 6) & 7][1];


const int *pri_taps = cdef_pri_taps[pri_strength & (1 << coeff_shift)]; const int *pri_taps = cdef_pri_taps[(pri_strength >> coeff_shift) & 1];
const int *sec_taps = cdef_sec_taps[pri_strength & (1 << coeff_shift)]; const int *sec_taps = cdef_sec_taps[(pri_strength >> coeff_shift) & 1];


if (pri_strength) pri_damping -= log2i(pri_strength); if (pri_strength) pri_damping -= log2i(pri_strength);
if (sec_strength) sec_damping -= log2i(sec_strength); if (sec_strength) sec_damping -= log2i(sec_strength);
Expand Down Expand Up @@ -2985,8 +2985,8 @@ static void cdef_filter_block_4x4_16(uint32_t *dst, int dstride,
int s2o1 = cdef_directions[(dir + 6) & 7][0]; int s2o1 = cdef_directions[(dir + 6) & 7][0];
int s2o2 = cdef_directions[(dir + 6) & 7][1]; int s2o2 = cdef_directions[(dir + 6) & 7][1];


const int *pri_taps = cdef_pri_taps[pri_strength & (1 << coeff_shift)]; const int *pri_taps = cdef_pri_taps[(pri_strength >> coeff_shift) & 1];
const int *sec_taps = cdef_sec_taps[pri_strength & (1 << coeff_shift)]; const int *sec_taps = cdef_sec_taps[(pri_strength >> coeff_shift) & 1];


if (pri_strength) pri_damping -= log2i(pri_strength); if (pri_strength) pri_damping -= log2i(pri_strength);
if (sec_strength) sec_damping -= log2i(sec_strength); if (sec_strength) sec_damping -= log2i(sec_strength);
Expand Down Expand Up @@ -3130,8 +3130,8 @@ static void cdef_filter_block_8x8_16(uint32_t *dst, int dstride,
int s2o1 = cdef_directions[(dir + 6) & 7][0]; int s2o1 = cdef_directions[(dir + 6) & 7][0];
int s2o2 = cdef_directions[(dir + 6) & 7][1]; int s2o2 = cdef_directions[(dir + 6) & 7][1];


const int *pri_taps = cdef_pri_taps[pri_strength & (1 << coeff_shift)]; const int *pri_taps = cdef_pri_taps[(pri_strength >> coeff_shift) & 1];
const int *sec_taps = cdef_sec_taps[pri_strength & (1 << coeff_shift)]; const int *sec_taps = cdef_sec_taps[(pri_strength >> coeff_shift) & 1];


if (pri_strength) pri_damping -= log2i(pri_strength); if (pri_strength) pri_damping -= log2i(pri_strength);
if (sec_strength) sec_damping -= log2i(sec_strength); if (sec_strength) sec_damping -= log2i(sec_strength);
Expand Down

0 comments on commit b453c6e

Please sign in to comment.