|
|
@ -23,29 +23,6 @@ namespace SixLabors.ImageSharp |
|
|
private const int ShuffleAlphaControl = 0b_11_11_11_11; |
|
|
private const int ShuffleAlphaControl = 0b_11_11_11_11; |
|
|
#endif
|
|
|
#endif
|
|
|
|
|
|
|
|
|
// TODO: Obsolete - remove
|
|
|
|
|
|
#if !SUPPORTS_BITOPERATIONS
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the counts the number of bits needed to hold an integer.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
private static ReadOnlySpan<byte> BitCountLut => new byte[] |
|
|
|
|
|
{ |
|
|
|
|
|
0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, |
|
|
|
|
|
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
|
|
|
|
|
6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, |
|
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
|
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
|
|
|
|
|
7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, |
|
|
|
|
|
7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
|
|
|
|
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
|
|
|
|
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, |
|
|
|
|
|
8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8,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