From ebea677eb5e048be567058992b3c4cf88f8f5a22 Mon Sep 17 00:00:00 2001 From: Kyle Siefring Date: Mon, 14 Jan 2019 22:53:50 -0500 Subject: [PATCH] For hbd use scalar code for subpel (#857) --- src/mc.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mc.rs b/src/mc.rs index f492d3876c..4adbdd3b83 100644 --- a/src/mc.rs +++ b/src/mc.rs @@ -281,7 +281,7 @@ mod nasm { ) { #[cfg(all(target_arch = "x86_64", not(windows), feature = "nasm"))] { - if is_x86_feature_detected!("avx2") { + if is_x86_feature_detected!("avx2") && bit_depth == 8 { let mut dst8: AlignedArray<[u8; 128 * 128]> = UninitializedAlignedArray(); let mut src8: [u8; (128 + 7) * (128 + 7)] = @@ -329,7 +329,7 @@ mod nasm { col_frac: i32, row_frac: i32, mode_x: FilterMode, mode_y: FilterMode, bit_depth: usize ) { - if is_x86_feature_detected!("avx2") { + if is_x86_feature_detected!("avx2") && bit_depth == 8 { let mut src8: [u8; (128 + 7) * (128 + 7)] = unsafe { mem::uninitialized() }; convert_slice_2d( @@ -363,7 +363,7 @@ mod nasm { dst: &'a mut PlaneMutSlice<'a>, tmp1: &[i16], tmp2: &[i16], width: usize, height: usize, bit_depth: usize ) { - if is_x86_feature_detected!("avx2") { + if is_x86_feature_detected!("avx2") && bit_depth == 8 { let mut dst8: AlignedArray<[u8; 128 * 128]> = UninitializedAlignedArray(); unsafe {