diff --git a/src/MagicScaler/Magic/GreyConverter.cs b/src/MagicScaler/Magic/GreyConverter.cs index 6483eed5..359baf69 100644 --- a/src/MagicScaler/Magic/GreyConverter.cs +++ b/src/MagicScaler/Magic/GreyConverter.cs @@ -196,7 +196,7 @@ unsafe private static void greyLinearToGreyFloat(byte* ipstart, byte* opstart, i float* ip = (float*)ipstart, ipe = (float*)(ipstart + cb), op = (float*)opstart; #if HWINTRINSICS - if (!Avx.IsSupported) + if (Avx.IsSupported) { var vzero = Vector256.Zero; @@ -218,7 +218,7 @@ unsafe private static void greyLinearToGreyFloat(byte* ipstart, byte* opstart, i { var vzero = Vector.Zero; - ipe -= -VectorF.Count; + ipe -= VectorF.Count; while (ip <= ipe) { var v = Unsafe.ReadUnaligned(ip);