|
| 1 | +use core::ptr; |
1 | 2 | #[cfg(target_arch = "x86")] |
2 | | -use std::arch::x86::*; |
| 3 | +use core::arch::x86::*; |
3 | 4 | #[cfg(target_arch = "x86_64")] |
4 | | -use std::arch::x86_64::*; |
| 5 | +use core::arch::x86_64::*; |
5 | 6 |
|
6 | 7 | #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] |
7 | 8 | #[target_feature(enable = "ssse3")] |
@@ -139,11 +140,6 @@ pub unsafe fn dequantize_and_idct_block_8x8( |
139 | 140 | .unwrap() |
140 | 141 | ); |
141 | 142 |
|
142 | | - #[cfg(target_arch = "x86")] |
143 | | - use std::arch::x86::*; |
144 | | - #[cfg(target_arch = "x86_64")] |
145 | | - use std::arch::x86_64::*; |
146 | | - |
147 | 143 | const SHIFT: i32 = 3; |
148 | 144 |
|
149 | 145 | // Read the DCT coefficients, scale them up and dequantize them. |
@@ -183,7 +179,7 @@ pub unsafe fn dequantize_and_idct_block_8x8( |
183 | 179 | _mm_setzero_si128(), |
184 | 180 | ), |
185 | 181 | ); |
186 | | - std::ptr::copy_nonoverlapping::<u8>( |
| 182 | + ptr::copy_nonoverlapping::<u8>( |
187 | 183 | buf.as_ptr(), |
188 | 184 | output.as_mut_ptr().wrapping_add(output_linestride * i) as *mut _, |
189 | 185 | 8, |
@@ -277,7 +273,7 @@ pub unsafe fn color_convert_line_ycbcr(y: &[u8], cb: &[u8], cr: &[u8], output: & |
277 | 273 | let mut data = [0u8; 32]; |
278 | 274 | _mm_storeu_si128(data.as_mut_ptr() as *mut _, rgb_low); |
279 | 275 | _mm_storeu_si128(data.as_mut_ptr().wrapping_add(16) as *mut _, rgb_hi); |
280 | | - std::ptr::copy_nonoverlapping::<u8>( |
| 276 | + ptr::copy_nonoverlapping::<u8>( |
281 | 277 | data.as_ptr(), |
282 | 278 | output.as_mut_ptr().wrapping_add(24 * i), |
283 | 279 | 24, |
|
0 commit comments