|
|
|
@ -111,6 +111,14 @@ internal sealed class DownScalingComponentProcessor8 : ComponentProcessor |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// The common 1x, 2x, and 4x integral scales are specialized above.
|
|
|
|
// Uncommon legal factor-3 scales use the generic fallback.
|
|
|
|
CopyArbitraryScale(value, ref destRef, destStrideWidth, horizontalScale, verticalScale); |
|
|
|
} |
|
|
|
|
|
|
|
[MethodImpl(InliningOptions.ColdPath)] |
|
|
|
private static float CopyArbitraryScale(float value, ref float destRef, int destStrideWidth, int horizontalScale, int verticalScale) |
|
|
|
{ |
|
|
|
// The common 1x, 2x, and 4x integral scales are specialized above.
|
|
|
|
// Uncommon legal factor-3 scales use the generic fallback.
|
|
|
|
for (nuint y = 0; y < (uint)verticalScale; y++) |
|
|
|
@ -122,6 +130,8 @@ internal sealed class DownScalingComponentProcessor8 : ComponentProcessor |
|
|
|
|
|
|
|
destRef = ref Unsafe.Add(ref destRef, (uint)destStrideWidth); |
|
|
|
} |
|
|
|
|
|
|
|
return destRef; |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|