Skip to content

Commit

Permalink
Fix AVX2 16-bit output
Browse files Browse the repository at this point in the history
  • Loading branch information
sekrit-twc committed Jan 28, 2022
1 parent 76e0aa1 commit 22acabc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion timecube/x86/lut_avx2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ void float_to_word(const float *src, uint16_t *dst, unsigned depth, float scale,

x = _mm256_packus_epi32(x, y);
x = _mm256_permute4x64_epi64(x, _MM_SHUFFLE(3, 1, 2, 0));
x = _mm256_max_epu16(x, _mm256_set1_epi16((1U << depth) - 1));
x = _mm256_min_epu16(x, _mm256_set1_epi16((1U << depth) - 1));

_mm256_store_si256((__m256i *)(dst + i), x);
}
Expand Down

0 comments on commit 22acabc

Please sign in to comment.