Skip to content

Commit

Permalink
Bugfix.
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Zientkiewicz <mzient@gmail.com>
  • Loading branch information
mzient committed Mar 18, 2022
1 parent a818c56 commit 907fd20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dali/kernels/signal/resampling.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ struct Resampler {
int i = i_ref;
float32x4_t x4 = vaddq_f32(vdupq_n_f32(i - in_pos), _0123);

for (; i + 3 <= i1; i += 4) {
for (; i + 3 < i1; i += 4) {
float32x4_t w4 = window(x4);
f4 = vfmaq_f32(f4, vld1q_f32(in + i), w4);
x4 = vaddq_f32(x4, vdupq_n_f32(4));
Expand All @@ -171,7 +171,7 @@ struct Resampler {
__m128 f4 = _mm_setzero_ps();
int i = i_ref;
__m128 x4 = _mm_setr_ps(i - in_pos, i+1 - in_pos, i+2 - in_pos, i+3 - in_pos);
for (; i + 3 <= i1; i += 4) {
for (; i + 3 < i1; i += 4) {
__m128 w4 = window(x4);

f4 = _mm_add_ps(f4, _mm_mul_ps(_mm_loadu_ps(in + i), w4));
Expand Down

0 comments on commit 907fd20

Please sign in to comment.