From 9ee1c75d516232d7b47e41fd2a21e1d803fcb372 Mon Sep 17 00:00:00 2001 From: Anton Firszov Date: Tue, 24 Jan 2017 03:11:41 +0100 Subject: [PATCH] ValuesAsInt --> Values --- .../Components/Decoder/HuffmanTree.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp.Formats.Jpeg/Components/Decoder/HuffmanTree.cs b/src/ImageSharp.Formats.Jpeg/Components/Decoder/HuffmanTree.cs index 236cffbdf..03013219c 100644 --- a/src/ImageSharp.Formats.Jpeg/Components/Decoder/HuffmanTree.cs +++ b/src/ImageSharp.Formats.Jpeg/Components/Decoder/HuffmanTree.cs @@ -63,7 +63,7 @@ namespace ImageSharp.Formats.Jpg /// /// Gets the the decoded values, sorted by their encoding. /// - public int[] ValuesAsInt; + public int[] Values; /// /// Gets the array of minimum codes. @@ -112,7 +112,7 @@ namespace ImageSharp.Formats.Jpg public void Dispose() { IntPool256.Return(this.Lut, true); - IntPool256.Return(this.ValuesAsInt, true); + IntPool256.Return(this.Values, true); CodesPool16.Return(this.MinCodes, true); CodesPool16.Return(this.MaxCodes, true); CodesPool16.Return(this.Indices, true); @@ -165,7 +165,7 @@ namespace ImageSharp.Formats.Jpg for (int i = 0; i < values.Length; i++) { - this.ValuesAsInt[i] = values[i]; + this.Values[i] = values[i]; } } finally @@ -193,7 +193,7 @@ namespace ImageSharp.Formats.Jpg // The high 8 bits of lutValue are the encoded value. // The low 8 bits are 1 plus the codeLength. int base2 = code << (7 - i); - int lutValue = (this.ValuesAsInt[x] << 8) | (2 + i); + int lutValue = (this.Values[x] << 8) | (2 + i); for (int k = 0; k < 1 << (7 - i); k++) { @@ -237,7 +237,7 @@ namespace ImageSharp.Formats.Jpg /// The value public int GetValue(int code, int codeLength) { - return this.ValuesAsInt[this.Indices[codeLength] + code - this.MinCodes[codeLength]]; + return this.Values[this.Indices[codeLength] + code - this.MinCodes[codeLength]]; } /// @@ -246,7 +246,7 @@ namespace ImageSharp.Formats.Jpg private void Init() { this.Lut = IntPool256.Rent(MaxNCodes); - this.ValuesAsInt = IntPool256.Rent(MaxNCodes); + this.Values = IntPool256.Rent(MaxNCodes); this.MinCodes = CodesPool16.Rent(MaxCodeLength); this.MaxCodes = CodesPool16.Rent(MaxCodeLength); this.Indices = CodesPool16.Rent(MaxCodeLength);