Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
idct: Use get_mut instead of get_uncheked_mut when getting slice …
Browse files Browse the repository at this point in the history
…to write to converted values.
  • Loading branch information
etemesi254 committed Jul 1, 2022
1 parent ce89af2 commit 1375b30
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/idct/avx2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,8 @@ unsafe fn dequantize_and_idct_int_avx2(
// store
_mm_storeu_si128(
out_vector
.get_unchecked_mut($pos..$pos + 8)
.get_mut($pos..$pos + 8)
.unwrap()
.as_mut_ptr()
.cast(),
$value,
Expand Down Expand Up @@ -364,7 +365,8 @@ unsafe fn dequantize_and_idct_int_avx2(
// store first vector
_mm_storeu_si128(
($out)
.get_unchecked_mut($index..$index + 8)
.get_mut($index..$index + 8)
.unwrap()
.as_mut_ptr()
.cast(),
_mm256_extractf128_si256::<0>(c),
Expand All @@ -373,7 +375,8 @@ unsafe fn dequantize_and_idct_int_avx2(
// second vector
_mm_storeu_si128(
($out)
.get_unchecked_mut($index..$index + 8)
.get_mut($index..$index + 8)
.unwrap()
.as_mut_ptr()
.cast(),
_mm256_extractf128_si256::<1>(c),
Expand Down

0 comments on commit 1375b30

Please sign in to comment.