From d6db6b6be75dbc73dbb238cc02c6fcca31131d0c Mon Sep 17 00:00:00 2001 From: Dmitry Pentin Date: Sun, 30 May 2021 01:23:09 +0300 Subject: [PATCH] Fixed compilation errors for non-intrinsic platforms --- .../Encoder/RgbToYCbCrConverterVectorized.cs | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/Components/Encoder/RgbToYCbCrConverterVectorized.cs b/src/ImageSharp/Formats/Jpeg/Components/Encoder/RgbToYCbCrConverterVectorized.cs index a44b174d89..e5fe4dea2f 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Encoder/RgbToYCbCrConverterVectorized.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Encoder/RgbToYCbCrConverterVectorized.cs @@ -125,8 +125,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder /// Converts 8x8 Rgb24 pixel matrix to YCbCr pixel matrices with 4:2:0 subsampling /// /// Total size of rgb span must be 200 bytes - /// Span of rgb pixels with size of 64 - /// 8x8 destination matrix of Luminance(Y) converted dataф public static void Convert420(ReadOnlySpan rgbSpan, ref Block8x8F yBlock, ref Block8x8F cbBlock, ref Block8x8F crBlock, int idx) { Debug.Assert(IsSupported, "AVX2 is required to run this converter"); @@ -207,12 +205,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder /// /// Converts 16x8 Rgb24 pixels matrix to 2 Y 8x8 matrices with 4:2:0 subsampling /// - /// - /// - /// - /// - /// - /// public static void Convert420_16x8(ReadOnlySpan rgbSpan, Span yBlocks, ref Block8x8F cbBlock, ref Block8x8F crBlock, int row) { Debug.Assert(IsSupported, "AVX2 is required to run this converter"); @@ -286,6 +278,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder } +#if SUPPORTS_RUNTIME_INTRINSICS [MethodImpl(MethodImplOptions.AggressiveInlining)] public static Vector256 Scale_8x4_4x2(Span> v) { @@ -335,5 +328,6 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Encoder Unsafe.Add(ref destCrRef, i) = Avx.Add(f128, SimdUtils.HwIntrinsics.MultiplyAdd(SimdUtils.HwIntrinsics.MultiplyAdd(Avx.Multiply(fn0081312F, b), fn0418688, g), f05, r)); } } +#endif } }