Skip to content

Commit

Permalink
resize: fix off by one error in AVX-512 permute check
Browse files Browse the repository at this point in the history
  • Loading branch information
sekrit-twc committed May 28, 2024
1 parent 44cb66e commit f3d6545
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zimg/resize/x86/resize_impl_avx512_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ class ResizeImplH_Permute_U16_AVX512 : public graph::FilterBase {
left_min = std::min(left_min, filter.left[ii]);
left_max = std::max(left_max, filter.left[ii]);
}
if (left_max - left_min >= 32)
if (left_max - left_min >= 31)
return nullptr;

for (unsigned ii = i; ii < std::min(i + 16, context.filter_rows); ++ii) {
Expand Down

0 comments on commit f3d6545

Please sign in to comment.