Skip to content

Commit 71eb5d0

Browse files
committed
Move allow_unsafe to the whole arch module.
1 parent 774806a commit 71eb5d0

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/arch/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#![allow(unsafe_code)]
2+
13
mod ssse3;
24

35
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]

src/arch/ssse3.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use std::arch::x86_64::*;
55

66
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
77
#[target_feature(enable = "ssse3")]
8-
#[allow(unsafe_code)]
98
unsafe fn idct8(data: &mut [__m128i; 8]) {
109
// The fixed-point constants here are obtained by taking the fractional part of the constants
1110
// from the non-SIMD implementation and scaling them up by 1<<15. This is because
@@ -83,7 +82,6 @@ unsafe fn idct8(data: &mut [__m128i; 8]) {
8382

8483
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
8584
#[target_feature(enable = "ssse3")]
86-
#[allow(unsafe_code)]
8785
unsafe fn transpose8(data: &mut [__m128i; 8]) {
8886
let d01l = _mm_unpacklo_epi16(data[0], data[1]);
8987
let d23l = _mm_unpacklo_epi16(data[2], data[3]);
@@ -113,7 +111,6 @@ unsafe fn transpose8(data: &mut [__m128i; 8]) {
113111

114112
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
115113
#[target_feature(enable = "ssse3")]
116-
#[allow(unsafe_code)]
117114
pub unsafe fn dequantize_and_idct_block_8x8(
118115
coefficients: &[i16],
119116
quantization_table: &[u16; 64],
@@ -178,7 +175,6 @@ pub unsafe fn dequantize_and_idct_block_8x8(
178175

179176
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
180177
#[target_feature(enable = "ssse3")]
181-
#[allow(unsafe_code)]
182178
pub unsafe fn color_convert_line_ycbcr(y: &[u8], cb: &[u8], cr: &[u8], output: &mut [u8]) -> usize {
183179
assert!(output.len() % 3 == 0);
184180
let num = output.len() / 3;

0 commit comments

Comments
 (0)