diff --git a/src/ImageSharp/Formats/WebP/WebPConstants.cs b/src/ImageSharp/Formats/WebP/WebPConstants.cs index 906d89638f..64afc2fa00 100644 --- a/src/ImageSharp/Formats/WebP/WebPConstants.cs +++ b/src/ImageSharp/Formats/WebP/WebPConstants.cs @@ -234,110 +234,6 @@ namespace SixLabors.ImageSharp.Formats.WebP -8, -9 }; - // Paragraph 11.5 - public static readonly byte[,][] BModesProba = { - { new byte[] { 0, 0 }, new byte[] { 231, 120, 48, 89, 115, 113, 120, 152, 112 } }, - { new byte[] { 0, 1 }, new byte[] { 152, 179, 64, 126, 170, 118, 46, 70, 95 } }, - { new byte[] { 0, 2 }, new byte[] { 175, 69, 143, 80, 85, 82, 72, 155, 103 } }, - { new byte[] { 0, 3 }, new byte[] { 56, 58, 10, 171, 218, 189, 17, 13, 152 } }, - { new byte[] { 0, 4 }, new byte[] { 114, 26, 17, 163, 44, 195, 21, 10, 173 } }, - { new byte[] { 0, 5 }, new byte[] { 121, 24, 80, 195, 26, 62, 44, 64, 85 } }, - { new byte[] { 0, 6 }, new byte[] { 144, 71, 10, 38, 171, 213, 144, 34, 26 } }, - { new byte[] { 0, 7 }, new byte[] { 170, 46, 55, 19, 136, 160, 33, 206, 71 } }, - { new byte[] { 0, 8 }, new byte[] { 63, 20, 8, 114, 114, 208, 12, 9, 226 } }, - { new byte[] { 0, 9 }, new byte[] { 81, 40, 11, 96, 182, 84, 29, 16, 36 } }, - { new byte[] { 1, 0 }, new byte[] { 134, 183, 89, 137, 98, 101, 106, 165, 148 } }, - { new byte[] { 1, 1 }, new byte[] { 72, 187, 100, 130, 157, 111, 32, 75, 80 } }, - { new byte[] { 1, 2 }, new byte[] { 66, 102, 167, 99, 74, 62, 40, 234, 128 } }, - { new byte[] { 1, 3 }, new byte[] { 41, 53, 9, 178, 241, 141, 26, 8, 107 } }, - { new byte[] { 1, 4 }, new byte[] { 74, 43, 26, 146, 73, 166, 49, 23, 157 } }, - { new byte[] { 1, 5 }, new byte[] { 65, 38, 105, 160, 51, 52, 31, 115, 128 } }, - { new byte[] { 1, 6 }, new byte[] { 104, 79, 12, 27, 217, 255, 87, 17, 7 } }, - { new byte[] { 1, 7 }, new byte[] { 87, 68, 71, 44, 114, 51, 15, 186, 23 } }, - { new byte[] { 1, 8 }, new byte[] { 47, 41, 14, 110, 182, 183, 21, 17, 194 } }, - { new byte[] { 1, 9 }, new byte[] { 66, 45, 25, 102, 197, 189, 23, 18, 22 } }, - { new byte[] { 2, 0 }, new byte[] { 88, 88, 147, 150, 42, 46, 45, 196, 205 } }, - { new byte[] { 2, 1 }, new byte[] { 43, 97, 183, 117, 85, 38, 35, 179, 61 } }, - { new byte[] { 2, 2 }, new byte[] { 39, 53, 200, 87, 26, 21, 43, 232, 171 } }, - { new byte[] { 2, 3 }, new byte[] { 56, 34, 51, 104, 114, 102, 29, 93, 77 } }, - { new byte[] { 2, 4 }, new byte[] { 39, 28, 85, 171, 58, 165, 90, 98, 64 } }, - { new byte[] { 2, 5 }, new byte[] { 34, 22, 116, 206, 23, 34, 43, 166, 73 } }, - { new byte[] { 2, 6 }, new byte[] { 107, 54, 32, 26, 51, 1, 81, 43, 31 } }, - { new byte[] { 2, 7 }, new byte[] { 68, 25, 106, 22, 64, 171, 36, 225, 114 } }, - { new byte[] { 2, 8 }, new byte[] { 34, 19, 21, 102, 132, 188, 16, 76, 124 } }, - { new byte[] { 2, 9 }, new byte[] { 62, 18, 78, 95, 85, 57, 50, 48, 51 } }, - { new byte[] { 3, 0 }, new byte[] { 193, 101, 35, 159, 215, 111, 89, 46, 111 } }, - { new byte[] { 3, 1 }, new byte[] { 60, 148, 31, 172, 219, 228, 21, 18, 111 } }, - { new byte[] { 3, 2 }, new byte[] { 112, 113, 77, 85, 179, 255, 38, 120, 114 } }, - { new byte[] { 3, 3 }, new byte[] { 40, 42, 1, 196, 245, 209, 10, 25, 109 } }, - { new byte[] { 3, 4 }, new byte[] { 88, 43, 29, 140, 166, 213, 37, 43, 154 } }, - { new byte[] { 3, 5 }, new byte[] { 61, 63, 30, 155, 67, 45, 68, 1, 209 } }, - { new byte[] { 3, 6 }, new byte[] { 100, 80, 8, 43, 154, 1, 51, 26, 71 } }, - { new byte[] { 3, 7 }, new byte[] { 142, 78, 78, 16, 255, 128, 34, 197, 171 } }, - { new byte[] { 3, 8 }, new byte[] { 41, 40, 5, 102, 211, 183, 4, 1, 221 } }, - { new byte[] { 3, 9 }, new byte[] { 51, 50, 17, 168, 209, 192, 23, 25, 82 } }, - { new byte[] { 4, 0 }, new byte[] { 138, 31, 36, 171, 27, 166, 38, 44, 229 } }, - { new byte[] { 4, 1 }, new byte[] { 67, 87, 58, 169, 82, 115, 26, 59, 179 } }, - { new byte[] { 4, 2 }, new byte[] { 63, 59, 90, 180, 59, 166, 93, 73, 154 } }, - { new byte[] { 4, 3 }, new byte[] { 40, 40, 21, 116, 143, 209, 34, 39, 175 } }, - { new byte[] { 4, 4 }, new byte[] { 47, 15, 16, 183, 34, 223, 49, 45, 183 } }, - { new byte[] { 4, 5 }, new byte[] { 46, 17, 33, 183, 6, 98, 15, 32, 183 } }, - { new byte[] { 4, 6 }, new byte[] { 57, 46, 22, 24, 128, 1, 54, 17, 37 } }, - { new byte[] { 4, 7 }, new byte[] { 65, 32, 73, 115, 28, 128, 23, 128, 205 } }, - { new byte[] { 4, 8 }, new byte[] { 40, 3, 9, 115, 51, 192, 18, 6, 223 } }, - { new byte[] { 4, 9 }, new byte[] { 87, 37, 9, 115, 59, 77, 64, 21, 47 } }, - { new byte[] { 5, 0 }, new byte[] { 104, 55, 44, 218, 9, 54, 53, 130, 226 } }, - { new byte[] { 5, 1 }, new byte[] { 64, 90, 70, 205, 40, 41, 23, 26, 57 } }, - { new byte[] { 5, 2 }, new byte[] { 54, 57, 112, 184, 5, 41, 38, 166, 213 } }, - { new byte[] { 5, 3 }, new byte[] { 30, 34, 26, 133, 152, 116, 10, 32, 134 } }, - { new byte[] { 5, 4 }, new byte[] { 39, 19, 53, 221, 26, 114, 32, 73, 255 } }, - { new byte[] { 5, 5 }, new byte[] { 31, 9, 65, 234, 2, 15, 1, 118, 73 } }, - { new byte[] { 5, 6 }, new byte[] { 75, 32, 12, 51, 192, 255, 160, 43, 51 } }, - { new byte[] { 5, 7 }, new byte[] { 88, 31, 35, 67, 102, 85, 55, 186, 85 } }, - { new byte[] { 5, 8 }, new byte[] { 56, 21, 23, 111, 59, 205, 45, 37, 192 } }, - { new byte[] { 5, 9 }, new byte[] { 55, 38, 70, 124, 73, 102, 1, 34, 98 } }, - { new byte[] { 6, 0 }, new byte[] { 125, 98, 42, 88, 104, 85, 117, 175, 82 } }, - { new byte[] { 6, 1 }, new byte[] { 95, 84, 53, 89, 128, 100, 113, 101, 45 } }, - { new byte[] { 6, 2 }, new byte[] { 75, 79, 123, 47, 51, 128, 81, 171, 1 } }, - { new byte[] { 6, 3 }, new byte[] { 57, 17, 5, 71, 102, 57, 53, 41, 49 } }, - { new byte[] { 6, 4 }, new byte[] { 38, 33, 13, 121, 57, 73, 26, 1, 85 } }, - { new byte[] { 6, 5 }, new byte[] { 41, 10, 67, 138, 77, 110, 90, 47, 114 } }, - { new byte[] { 6, 6 }, new byte[] { 115, 21, 2, 10, 102, 255, 166, 23, 6 } }, - { new byte[] { 6, 7 }, new byte[] { 101, 29, 16, 10, 85, 128, 101, 196, 26 } }, - { new byte[] { 6, 8 }, new byte[] { 57, 18, 10, 102, 102, 213, 34, 20, 43 } }, - { new byte[] { 6, 9 }, new byte[] { 117, 20, 15, 36, 163, 128, 68, 1, 26 } }, - { new byte[] { 7, 0 }, new byte[] { 102, 61, 71, 37, 34, 53, 31, 243, 192 } }, - { new byte[] { 7, 1 }, new byte[] { 69, 60, 71, 38, 73, 119, 28, 222, 37 } }, - { new byte[] { 7, 2 }, new byte[] { 68, 45, 128, 34, 1, 47, 11, 245, 171 } }, - { new byte[] { 7, 3 }, new byte[] { 62, 17, 19, 70, 146, 85, 55, 62, 70 } }, - { new byte[] { 7, 4 }, new byte[] { 37, 43, 37, 154, 100, 163, 85, 160, 1 } }, - { new byte[] { 7, 5 }, new byte[] { 63, 9, 92, 136, 28, 64, 32, 201, 85 } }, - { new byte[] { 7, 6 }, new byte[] { 75, 15, 9, 9, 64, 255, 184, 119, 16 } }, - { new byte[] { 7, 7 }, new byte[] { 86, 6, 28, 5, 64, 255, 25, 248, 1 } }, - { new byte[] { 7, 8 }, new byte[] { 56, 8, 17, 132, 137, 255, 55, 116, 128 } }, - { new byte[] { 7, 9 }, new byte[] { 58, 15, 20, 82, 135, 57, 26, 121, 40 } }, - { new byte[] { 8, 0 }, new byte[] { 164, 50, 31, 137, 154, 133, 25, 35, 218 } }, - { new byte[] { 8, 1 }, new byte[] { 51, 103, 44, 131, 131, 123, 31, 6, 158 } }, - { new byte[] { 8, 2 }, new byte[] { 86, 40, 64, 135, 148, 224, 45, 183, 128 } }, - { new byte[] { 8, 3 }, new byte[] { 22, 26, 17, 131, 240, 154, 14, 1, 209 } }, - { new byte[] { 8, 4 }, new byte[] { 45, 16, 21, 91, 64, 222, 7, 1, 197 } }, - { new byte[] { 8, 5 }, new byte[] { 56, 21, 39, 155, 60, 138, 23, 102, 213 } }, - { new byte[] { 8, 6 }, new byte[] { 83, 12, 13, 54, 192, 255, 68, 47, 28 } }, - { new byte[] { 8, 7 }, new byte[] { 85, 26, 85, 85, 128, 128, 32, 146, 171 } }, - { new byte[] { 8, 8 }, new byte[] { 18, 11, 7, 63, 144, 171, 4, 4, 246 } }, - { new byte[] { 8, 9 }, new byte[] { 35, 27, 10, 146, 174, 171, 12, 26, 128 } }, - { new byte[] { 9, 0 }, new byte[] { 190, 80, 35, 99, 180, 80, 126, 54, 45 } }, - { new byte[] { 9, 1 }, new byte[] { 85, 126, 47, 87, 176, 51, 41, 20, 32 } }, - { new byte[] { 9, 2 }, new byte[] { 101, 75, 128, 139, 118, 146, 116, 128, 85 } }, - { new byte[] { 9, 3 }, new byte[] { 56, 41, 15, 176, 236, 85, 37, 9, 62 } }, - { new byte[] { 9, 4 }, new byte[] { 71, 30, 17, 119, 118, 255, 17, 18, 138 } }, - { new byte[] { 9, 5 }, new byte[] { 101, 38, 60, 138, 55, 70, 43, 26, 142 } }, - { new byte[] { 9, 6 }, new byte[] { 146, 36, 19, 30, 171, 255, 97, 27, 20 } }, - { new byte[] { 9, 7 }, new byte[] { 138, 45, 61, 62, 219, 1, 81, 188, 64 } }, - { new byte[] { 9, 8 }, new byte[] { 32, 41, 20, 117, 151, 142, 20, 21, 163 } }, - { new byte[] { 9, 9 }, new byte[] { 112, 19, 12, 61, 195, 128, 48, 4, 24 } }, - }; - // Paragraph 13 public static readonly byte[,,,] CoeffsUpdateProba = { diff --git a/src/ImageSharp/Formats/WebP/WebPLossyDecoder.cs b/src/ImageSharp/Formats/WebP/WebPLossyDecoder.cs index 219dc2145f..a572915c01 100644 --- a/src/ImageSharp/Formats/WebP/WebPLossyDecoder.cs +++ b/src/ImageSharp/Formats/WebP/WebPLossyDecoder.cs @@ -5,7 +5,6 @@ using System; using System.Collections.Generic; using System.Linq; -using SixLabors.ImageSharp.Formats.Bmp; using SixLabors.ImageSharp.Memory; using SixLabors.ImageSharp.PixelFormats; using SixLabors.Memory; @@ -18,10 +17,13 @@ namespace SixLabors.ImageSharp.Formats.WebP private readonly MemoryAllocator memoryAllocator; + private readonly byte[,][] bModesProba = new byte[10, 10][]; + public WebPLossyDecoder(Vp8BitReader bitReader, MemoryAllocator memoryAllocator) { this.memoryAllocator = memoryAllocator; this.bitReader = bitReader; + this.InitializeModesProbabilities(); } public void Decode(Buffer2D pixels, int width, int height, WebPImageInfo info) @@ -170,7 +172,7 @@ namespace SixLabors.ImageSharp.Formats.WebP int yMode = left[y]; for (int x = 0; x < 4; ++x) { - byte[] prob = WebPConstants.BModesProba[top[x], yMode]; + byte[] prob = this.bModesProba[top[x], yMode]; int i = WebPConstants.YModesIntra4[this.bitReader.GetBit(prob[0])]; while (i > 0) { @@ -1182,7 +1184,7 @@ namespace SixLabors.ImageSharp.Formats.WebP for (int p = 0; p < WebPConstants.NumProbas; ++p) { byte prob = WebPConstants.CoeffsUpdateProba[t, b, c, p]; - int v = this.bitReader.GetBit(prob) > 0 + int v = this.bitReader.GetBit(prob) != 0 ? (int)this.bitReader.ReadValue(8) : WebPConstants.DefaultCoeffsProba[t, b, c, p]; proba.Bands[t, b].Probabilities[c].Probabilities[p] = (byte)v; @@ -1290,6 +1292,112 @@ namespace SixLabors.ImageSharp.Formats.WebP { return value < 0 ? 0 : value > max ? max : value; } + + private void InitializeModesProbabilities() + { + // Paragraph 11.5 + this.bModesProba[0, 0] = new byte[] { 231, 120, 48, 89, 115, 113, 120, 152, 112 }; + this.bModesProba[0, 1] = new byte[] { 152, 179, 64, 126, 170, 118, 46, 70, 95 }; + this.bModesProba[0, 2] = new byte[] { 175, 69, 143, 80, 85, 82, 72, 155, 103 }; + this.bModesProba[0, 3] = new byte[] { 56, 58, 10, 171, 218, 189, 17, 13, 152 }; + this.bModesProba[0, 4] = new byte[] { 114, 26, 17, 163, 44, 195, 21, 10, 173 }; + this.bModesProba[0, 5] = new byte[] { 121, 24, 80, 195, 26, 62, 44, 64, 85 }; + this.bModesProba[0, 6] = new byte[] { 144, 71, 10, 38, 171, 213, 144, 34, 26 }; + this.bModesProba[0, 7] = new byte[] { 170, 46, 55, 19, 136, 160, 33, 206, 71 }; + this.bModesProba[0, 8] = new byte[] { 63, 20, 8, 114, 114, 208, 12, 9, 226 }; + this.bModesProba[0, 9] = new byte[] { 81, 40, 11, 96, 182, 84, 29, 16, 36 }; + this.bModesProba[1, 0] = new byte[] { 134, 183, 89, 137, 98, 101, 106, 165, 148 }; + this.bModesProba[1, 1] = new byte[] { 72, 187, 100, 130, 157, 111, 32, 75, 80 }; + this.bModesProba[1, 2] = new byte[] { 66, 102, 167, 99, 74, 62, 40, 234, 128 }; + this.bModesProba[1, 3] = new byte[] { 41, 53, 9, 178, 241, 141, 26, 8, 107 }; + this.bModesProba[1, 4] = new byte[] { 74, 43, 26, 146, 73, 166, 49, 23, 157 }; + this.bModesProba[1, 5] = new byte[] { 65, 38, 105, 160, 51, 52, 31, 115, 128 }; + this.bModesProba[1, 6] = new byte[] { 104, 79, 12, 27, 217, 255, 87, 17, 7 }; + this.bModesProba[1, 7] = new byte[] { 87, 68, 71, 44, 114, 51, 15, 186, 23 }; + this.bModesProba[1, 8] = new byte[] { 47, 41, 14, 110, 182, 183, 21, 17, 194 }; + this.bModesProba[1, 9] = new byte[] { 66, 45, 25, 102, 197, 189, 23, 18, 22 }; + this.bModesProba[2, 0] = new byte[] { 88, 88, 147, 150, 42, 46, 45, 196, 205 }; + this.bModesProba[2, 1] = new byte[] { 43, 97, 183, 117, 85, 38, 35, 179, 61 }; + this.bModesProba[2, 2] = new byte[] { 39, 53, 200, 87, 26, 21, 43, 232, 171 }; + this.bModesProba[2, 3] = new byte[] { 56, 34, 51, 104, 114, 102, 29, 93, 77 }; + this.bModesProba[2, 4] = new byte[] { 39, 28, 85, 171, 58, 165, 90, 98, 64 }; + this.bModesProba[2, 5] = new byte[] { 34, 22, 116, 206, 23, 34, 43, 166, 73 }; + this.bModesProba[2, 6] = new byte[] { 107, 54, 32, 26, 51, 1, 81, 43, 31 }; + this.bModesProba[2, 7] = new byte[] { 68, 25, 106, 22, 64, 171, 36, 225, 114 }; + this.bModesProba[2, 8] = new byte[] { 34, 19, 21, 102, 132, 188, 16, 76, 124 }; + this.bModesProba[2, 9] = new byte[] { 62, 18, 78, 95, 85, 57, 50, 48, 51 }; + this.bModesProba[3, 0] = new byte[] { 193, 101, 35, 159, 215, 111, 89, 46, 111 }; + this.bModesProba[3, 1] = new byte[] { 60, 148, 31, 172, 219, 228, 21, 18, 111 }; + this.bModesProba[3, 2] = new byte[] { 112, 113, 77, 85, 179, 255, 38, 120, 114 }; + this.bModesProba[3, 3] = new byte[] { 40, 42, 1, 196, 245, 209, 10, 25, 109 }; + this.bModesProba[3, 4] = new byte[] { 88, 43, 29, 140, 166, 213, 37, 43, 154 }; + this.bModesProba[3, 5] = new byte[] { 61, 63, 30, 155, 67, 45, 68, 1, 209 }; + this.bModesProba[3, 6] = new byte[] { 100, 80, 8, 43, 154, 1, 51, 26, 71 }; + this.bModesProba[3, 7] = new byte[] { 142, 78, 78, 16, 255, 128, 34, 197, 171 }; + this.bModesProba[3, 8] = new byte[] { 41, 40, 5, 102, 211, 183, 4, 1, 221 }; + this.bModesProba[3, 9] = new byte[] { 51, 50, 17, 168, 209, 192, 23, 25, 82 }; + this.bModesProba[4, 0] = new byte[] { 138, 31, 36, 171, 27, 166, 38, 44, 229 }; + this.bModesProba[4, 1] = new byte[] { 67, 87, 58, 169, 82, 115, 26, 59, 179 }; + this.bModesProba[4, 2] = new byte[] { 63, 59, 90, 180, 59, 166, 93, 73, 154 }; + this.bModesProba[4, 3] = new byte[] { 40, 40, 21, 116, 143, 209, 34, 39, 175 }; + this.bModesProba[4, 4] = new byte[] { 47, 15, 16, 183, 34, 223, 49, 45, 183 }; + this.bModesProba[4, 5] = new byte[] { 46, 17, 33, 183, 6, 98, 15, 32, 183 }; + this.bModesProba[4, 6] = new byte[] { 57, 46, 22, 24, 128, 1, 54, 17, 37 }; + this.bModesProba[4, 7] = new byte[] { 65, 32, 73, 115, 28, 128, 23, 128, 205 }; + this.bModesProba[4, 8] = new byte[] { 40, 3, 9, 115, 51, 192, 18, 6, 223 }; + this.bModesProba[4, 9] = new byte[] { 87, 37, 9, 115, 59, 77, 64, 21, 47 }; + this.bModesProba[5, 0] = new byte[] { 104, 55, 44, 218, 9, 54, 53, 130, 226 }; + this.bModesProba[5, 1] = new byte[] { 64, 90, 70, 205, 40, 41, 23, 26, 57 }; + this.bModesProba[5, 2] = new byte[] { 54, 57, 112, 184, 5, 41, 38, 166, 213 }; + this.bModesProba[5, 3] = new byte[] { 30, 34, 26, 133, 152, 116, 10, 32, 134 }; + this.bModesProba[5, 4] = new byte[] { 39, 19, 53, 221, 26, 114, 32, 73, 255 }; + this.bModesProba[5, 5] = new byte[] { 31, 9, 65, 234, 2, 15, 1, 118, 73 }; + this.bModesProba[5, 6] = new byte[] { 75, 32, 12, 51, 192, 255, 160, 43, 51 }; + this.bModesProba[5, 7] = new byte[] { 88, 31, 35, 67, 102, 85, 55, 186, 85 }; + this.bModesProba[5, 8] = new byte[] { 56, 21, 23, 111, 59, 205, 45, 37, 192 }; + this.bModesProba[5, 9] = new byte[] { 55, 38, 70, 124, 73, 102, 1, 34, 98 }; + this.bModesProba[6, 0] = new byte[] { 125, 98, 42, 88, 104, 85, 117, 175, 82 }; + this.bModesProba[6, 1] = new byte[] { 95, 84, 53, 89, 128, 100, 113, 101, 45 }; + this.bModesProba[6, 2] = new byte[] { 75, 79, 123, 47, 51, 128, 81, 171, 1 }; + this.bModesProba[6, 3] = new byte[] { 57, 17, 5, 71, 102, 57, 53, 41, 49 }; + this.bModesProba[6, 4] = new byte[] { 38, 33, 13, 121, 57, 73, 26, 1, 85 }; + this.bModesProba[6, 5] = new byte[] { 41, 10, 67, 138, 77, 110, 90, 47, 114 }; + this.bModesProba[6, 6] = new byte[] { 115, 21, 2, 10, 102, 255, 166, 23, 6 }; + this.bModesProba[6, 7] = new byte[] { 101, 29, 16, 10, 85, 128, 101, 196, 26 }; + this.bModesProba[6, 8] = new byte[] { 57, 18, 10, 102, 102, 213, 34, 20, 43 }; + this.bModesProba[6, 9] = new byte[] { 117, 20, 15, 36, 163, 128, 68, 1, 26 }; + this.bModesProba[7, 0] = new byte[] { 102, 61, 71, 37, 34, 53, 31, 243, 192 }; + this.bModesProba[7, 1] = new byte[] { 69, 60, 71, 38, 73, 119, 28, 222, 37 }; + this.bModesProba[7, 2] = new byte[] { 68, 45, 128, 34, 1, 47, 11, 245, 171 }; + this.bModesProba[7, 3] = new byte[] { 62, 17, 19, 70, 146, 85, 55, 62, 70 }; + this.bModesProba[7, 4] = new byte[] { 37, 43, 37, 154, 100, 163, 85, 160, 1 }; + this.bModesProba[7, 5] = new byte[] { 63, 9, 92, 136, 28, 64, 32, 201, 85 }; + this.bModesProba[7, 6] = new byte[] { 75, 15, 9, 9, 64, 255, 184, 119, 16 }; + this.bModesProba[7, 7] = new byte[] { 86, 6, 28, 5, 64, 255, 25, 248, 1 }; + this.bModesProba[7, 8] = new byte[] { 56, 8, 17, 132, 137, 255, 55, 116, 128 }; + this.bModesProba[7, 9] = new byte[] { 58, 15, 20, 82, 135, 57, 26, 121, 40 }; + this.bModesProba[8, 0] = new byte[] { 164, 50, 31, 137, 154, 133, 25, 35, 218 }; + this.bModesProba[8, 1] = new byte[] { 51, 103, 44, 131, 131, 123, 31, 6, 158 }; + this.bModesProba[8, 2] = new byte[] { 86, 40, 64, 135, 148, 224, 45, 183, 128 }; + this.bModesProba[8, 3] = new byte[] { 22, 26, 17, 131, 240, 154, 14, 1, 209 }; + this.bModesProba[8, 4] = new byte[] { 45, 16, 21, 91, 64, 222, 7, 1, 197 }; + this.bModesProba[8, 5] = new byte[] { 56, 21, 39, 155, 60, 138, 23, 102, 213 }; + this.bModesProba[8, 6] = new byte[] { 83, 12, 13, 54, 192, 255, 68, 47, 28 }; + this.bModesProba[8, 7] = new byte[] { 85, 26, 85, 85, 128, 128, 32, 146, 171 }; + this.bModesProba[8, 8] = new byte[] { 18, 11, 7, 63, 144, 171, 4, 4, 246 }; + this.bModesProba[8, 9] = new byte[] { 35, 27, 10, 146, 174, 171, 12, 26, 128 }; + this.bModesProba[9, 0] = new byte[] { 190, 80, 35, 99, 180, 80, 126, 54, 45 }; + this.bModesProba[9, 1] = new byte[] { 85, 126, 47, 87, 176, 51, 41, 20, 32 }; + this.bModesProba[9, 2] = new byte[] { 101, 75, 128, 139, 118, 146, 116, 128, 85 }; + this.bModesProba[9, 3] = new byte[] { 56, 41, 15, 176, 236, 85, 37, 9, 62 }; + this.bModesProba[9, 4] = new byte[] { 71, 30, 17, 119, 118, 255, 17, 18, 138 }; + this.bModesProba[9, 5] = new byte[] { 101, 38, 60, 138, 55, 70, 43, 26, 142 }; + this.bModesProba[9, 6] = new byte[] { 146, 36, 19, 30, 171, 255, 97, 27, 20 }; + this.bModesProba[9, 7] = new byte[] { 138, 45, 61, 62, 219, 1, 81, 188, 64 }; + this.bModesProba[9, 8] = new byte[] { 32, 41, 20, 117, 151, 142, 20, 21, 163 }; + this.bModesProba[9, 9] = new byte[] { 112, 19, 12, 61, 195, 128, 48, 4, 24 }; + } + } struct YUVPixel