diff --git a/src/ImageSharp/Common/Helpers/Vector128Utilities.cs b/src/ImageSharp/Common/Helpers/Vector128Utilities.cs index a272e459c..3ca551494 100644 --- a/src/ImageSharp/Common/Helpers/Vector128Utilities.cs +++ b/src/ImageSharp/Common/Helpers/Vector128Utilities.cs @@ -111,7 +111,9 @@ internal static class Vector128Utilities { if (Sse2.IsSupported) { - return Sse2.ShiftRightLogical128BitLane(value, numBytes); +#pragma warning disable CA1857 // A constant is expected for the parameter + return Sse2.ShiftRightLogical128BitLane(value, (byte)(16 - numBytes)); +#pragma warning restore CA1857 // A constant is expected for the parameter } if (AdvSimd.IsSupported)