Skip to content

Commit

Permalink
IDWT 5x3: fix bug in AVX2 implementation (#953, #957)
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Jun 29, 2017
1 parent 6239ed7 commit 8fa405e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib/openjp2/dwt.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,9 +685,9 @@ static void opj_idwt53_v_cas0_mcols_SSE2_OR_AVX2(
s1n_0 = LOADU(in_even + ((len - 1) / 2) * stride);
/* tmp_len_minus_1 = s1n - ((d1n + 1) >> 1); */
tmp_len_minus_1 = SUB(s1n_0, SAR(ADD3(d1n_0, d1n_0, two), 2));
STORE(tmp + 8 * (len - 1), tmp_len_minus_1);
STORE(tmp + PARALLEL_COLS_53 * (len - 1), tmp_len_minus_1);
/* d1n + ((s0n + tmp_len_minus_1) >> 1) */
STORE(tmp + 8 * (len - 2),
STORE(tmp + PARALLEL_COLS_53 * (len - 2),
ADD(d1n_0, SAR(ADD(s0n_0, tmp_len_minus_1), 1)));

s1n_1 = LOADU(in_even + ((len - 1) / 2) * stride + VREG_INT_COUNT);
Expand Down

0 comments on commit 8fa405e

Please sign in to comment.