SymmColumnSmallVec_32s16s [-1, 0, 1]

NEON speedup: 3.27x
Auto-vect speedup: 1.01x
pull/3532/head
orestis 10 years ago
parent 99e782e62c
commit 4443d6b0a1
  1. 18
      modules/imgproc/src/filter.cpp

@ -2725,7 +2725,23 @@ struct SymmColumnSmallVec_32s16s
{
if( fabs(ky[1]) == 1 && ky[1] == -ky[-1] )
{
return 0;
if( ky[1] < 0 )
std::swap(S0, S2);
for( ; i <= width - 4; i += 4 )
{
int32x4_t x0, x1;
x0 = vld1q_s32((int32_t const *)(S0 + i));
x1 = vld1q_s32((int32_t const *)(S2 + i));
int32x4_t y0, y1;
y0 = vsubq_s32(x1, x0);
y1 = vqaddq_s32(y0, d4);
int16x4_t t;
t = vqmovn_s32(y1);
vst1_s16((int16_t *)(dst + i), t);
}
}
else
{

Loading…
Cancel
Save