From dcb6d1fa52d15c6e1aeb427208dac49f7e60c996 Mon Sep 17 00:00:00 2001 From: Olivia Date: Sat, 17 Dec 2016 20:13:40 +0100 Subject: [PATCH 1/4] Fixing stylecop warnings on whitespace and usings. --- src/ImageSharp/Colors/PackedPixel/IPackedPixel.cs | 1 + src/ImageSharp/Drawing/Brushes/Brushes`2.cs | 4 ++-- src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs | 6 +++--- src/ImageSharp/Drawing/Draw.cs | 1 + src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs | 8 ++++---- src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs | 2 +- src/ImageSharp/Drawing/Shapes/LinearPolygon.cs | 2 +- 7 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/ImageSharp/Colors/PackedPixel/IPackedPixel.cs b/src/ImageSharp/Colors/PackedPixel/IPackedPixel.cs index 5706d907d..08257fa68 100644 --- a/src/ImageSharp/Colors/PackedPixel/IPackedPixel.cs +++ b/src/ImageSharp/Colors/PackedPixel/IPackedPixel.cs @@ -6,6 +6,7 @@ namespace ImageSharp { using System; + /// /// An interface that represents a packed pixel type. /// diff --git a/src/ImageSharp/Drawing/Brushes/Brushes`2.cs b/src/ImageSharp/Drawing/Brushes/Brushes`2.cs index 5d2f81dc8..2e2eb5ad3 100644 --- a/src/ImageSharp/Drawing/Brushes/Brushes`2.cs +++ b/src/ImageSharp/Drawing/Brushes/Brushes`2.cs @@ -3,10 +3,10 @@ // Licensed under the Apache License, Version 2.0. // -using System; - namespace ImageSharp.Drawing.Brushes { + using System; + /// /// A collection of methods for creating generic brushes. /// diff --git a/src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs b/src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs index 203fa85cd..cdbdf23ad 100644 --- a/src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs +++ b/src/ImageSharp/Drawing/Brushes/PatternBrush`2.cs @@ -5,10 +5,10 @@ namespace ImageSharp.Drawing.Brushes { + using System; using System.Numerics; using Processors; - using System; /// /// Provides an implementation of a pattern brush for painting patterns. @@ -30,12 +30,12 @@ namespace ImageSharp.Drawing.Brushes /// 0 /// 0 /// - /// Warning when use array initializer across multiple lines the bools look inverted i.e. + /// Warning when use array initializer across multiple lines the bools look inverted i.e. /// new bool[,]{ /// {true, false, false}, /// {false,true, false} /// } - /// would be + /// would be /// 10 /// 01 /// 00 diff --git a/src/ImageSharp/Drawing/Draw.cs b/src/ImageSharp/Drawing/Draw.cs index e3d1be350..0f58c5727 100644 --- a/src/ImageSharp/Drawing/Draw.cs +++ b/src/ImageSharp/Drawing/Draw.cs @@ -220,6 +220,7 @@ namespace ImageSharp { return source.DrawPolygon(pen, new Polygon(new LinearLineSegment(points)), options); } + /// /// Draws the provided Points as a closed Linear Polygon with the provided Pen. /// diff --git a/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs b/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs index b1b3e8dc9..af0af20fa 100644 --- a/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs +++ b/src/ImageSharp/Drawing/Processors/DrawPathProcessor.cs @@ -34,7 +34,7 @@ namespace ImageSharp.Drawing.Processors private readonly IPath[] paths; private readonly RectangleF region; private readonly GraphicsOptions options; - + /// /// Initializes a new instance of the class. /// @@ -56,7 +56,7 @@ namespace ImageSharp.Drawing.Processors : this(pen, new[] { path }, options) { } - + /// /// Initializes a new instance of the class. /// @@ -134,10 +134,10 @@ namespace ImageSharp.Drawing.Processors currentPoint.X = offsetX; currentPoint.Y = offsetY; - var dist = Closest(currentPoint); + var dist = this.Closest(currentPoint); var color = applicator.GetColor(dist); - + var opacity = this.Opacity(color.DistanceFromElement); if (opacity > Epsilon) diff --git a/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs b/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs index 6ced979e5..0dee0095e 100644 --- a/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs +++ b/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs @@ -73,7 +73,7 @@ namespace ImageSharp.Drawing.Processors { polyStartY = 0; } - + using (PixelAccessor sourcePixels = source.Lock()) using (IBrushApplicator applicator = this.fillColor.CreateApplicator(rect)) { diff --git a/src/ImageSharp/Drawing/Shapes/LinearPolygon.cs b/src/ImageSharp/Drawing/Shapes/LinearPolygon.cs index 2b7a0292a..03069b678 100644 --- a/src/ImageSharp/Drawing/Shapes/LinearPolygon.cs +++ b/src/ImageSharp/Drawing/Shapes/LinearPolygon.cs @@ -25,7 +25,7 @@ namespace ImageSharp.Drawing.Shapes { this.innerPolygon = new Polygon(new LinearLineSegment(points)); } - + /// /// Gets the bounding box of this shape. /// From 4da1ebd55d05339d8ee79025e1dac51db30ee1d0 Mon Sep 17 00:00:00 2001 From: Olivia Date: Sat, 17 Dec 2016 20:27:01 +0100 Subject: [PATCH 2/4] Fixing missing parameter documentation warnings. --- src/ImageSharp/Drawing/DrawImage.cs | 2 +- src/ImageSharp/Drawing/Fill.cs | 1 + .../Drawing/Processors/FillShapeProcessor.cs | 1 + .../Formats/Jpg/Components/Block8x8F.cs | 70 +++++++++++++------ .../Formats/Jpg/Components/Bytes.cs | 4 ++ 5 files changed, 54 insertions(+), 24 deletions(-) diff --git a/src/ImageSharp/Drawing/DrawImage.cs b/src/ImageSharp/Drawing/DrawImage.cs index d29415d37..a192ea7b5 100644 --- a/src/ImageSharp/Drawing/DrawImage.cs +++ b/src/ImageSharp/Drawing/DrawImage.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Drawing/Fill.cs b/src/ImageSharp/Drawing/Fill.cs index 65b506f5e..4a96b20ac 100644 --- a/src/ImageSharp/Drawing/Fill.cs +++ b/src/ImageSharp/Drawing/Fill.cs @@ -56,6 +56,7 @@ namespace ImageSharp /// The source. /// The brush. /// The shape. + /// The graphics options. /// The Image public static Image Fill(this Image source, IBrush brush, IShape shape, GraphicsOptions options) where TColor : struct, IPackedPixel diff --git a/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs b/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs index 0dee0095e..3209ce9c5 100644 --- a/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs +++ b/src/ImageSharp/Drawing/Processors/FillShapeProcessor.cs @@ -35,6 +35,7 @@ namespace ImageSharp.Drawing.Processors /// /// The brush. /// The shape. + /// The graphics options. public FillShapeProcessor(IBrush brush, IShape shape, GraphicsOptions options) { this.poly = shape; diff --git a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs index c27de4ca9..9c982e88b 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs @@ -85,6 +85,8 @@ namespace ImageSharp.Formats /// /// Load raw 32bit floating point data from source /// + /// block pointer + /// source [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void LoadFrom(Block8x8F* blockPtr, MutableSpan source) { @@ -94,6 +96,8 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// + /// block pointer + /// destination [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyTo(Block8x8F* blockPtr, MutableSpan dest) { @@ -103,6 +107,7 @@ namespace ImageSharp.Formats /// /// Load raw 32bit floating point data from source /// + /// source [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void LoadFrom(MutableSpan source) { @@ -115,6 +120,7 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// + /// destination [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void CopyTo(MutableSpan dest) { @@ -127,6 +133,7 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// + /// destination [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void CopyTo(float[] dest) { @@ -161,17 +168,17 @@ namespace ImageSharp.Formats /// Apply floating point IDCT transformation into dest, using a temporary block 'temp' provided by the caller (optimization) /// /// Destination - /// Temporary block provided by the caller - public void TransformIDCTInto(ref Block8x8F dest, ref Block8x8F temp) + /// Temporary block provided by the caller + public void TransformIDCTInto(ref Block8x8F dest, ref Block8x8F tempBlockPtr) { - this.TransposeInto(ref temp); - temp.IDCT8x4_LeftPart(ref dest); - temp.IDCT8x4_RightPart(ref dest); + this.TransposeInto(ref tempBlockPtr); + tempBlockPtr.IDCT8x4_LeftPart(ref dest); + tempBlockPtr.IDCT8x4_RightPart(ref dest); - dest.TransposeInto(ref temp); + dest.TransposeInto(ref tempBlockPtr); - temp.IDCT8x4_LeftPart(ref dest); - temp.IDCT8x4_RightPart(ref dest); + tempBlockPtr.IDCT8x4_LeftPart(ref dest); + tempBlockPtr.IDCT8x4_RightPart(ref dest); dest.MultiplyAllInplace(C_0_125); } @@ -179,6 +186,8 @@ namespace ImageSharp.Formats /// /// Pointer-based "Indexer" (getter part) /// + /// block pointer + /// index [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe float GetScalarAt(Block8x8F* blockPtr, int idx) { @@ -189,6 +198,9 @@ namespace ImageSharp.Formats /// /// Pointer-based "Indexer" (setter part) /// + /// block pointer + /// index + /// value [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void SetScalarAt(Block8x8F* blockPtr, int idx, float value) { @@ -196,11 +208,17 @@ namespace ImageSharp.Formats fp[idx] = value; } + /// + /// Un-zig + /// + /// block pointer + /// qt pointer + /// unzig pointer [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal static unsafe void UnZig(Block8x8F* block, Block8x8F* qt, int* unzigPtr) + internal static unsafe void UnZig(Block8x8F* blockPtr, Block8x8F* qtPtr, int* unzigPtr) { - float* b = (float*)block; - float* qtp = (float*)qt; + float* b = (float*)blockPtr; + float* qtp = (float*)qtPtr; for (int zig = 0; zig < BlockF.BlockSize; zig++) { float* unzigPos = b + unzigPtr[zig]; @@ -213,6 +231,7 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// + /// destination internal unsafe void CopyTo(MutableSpan dest) { fixed (Vector4* ptr = &this.V0L) @@ -228,6 +247,7 @@ namespace ImageSharp.Formats /// /// Load raw 32bit floating point data from source /// + /// source internal unsafe void LoadFrom(MutableSpan source) { fixed (Vector4* ptr = &this.V0L) @@ -301,8 +321,9 @@ namespace ImageSharp.Formats /// Original source: /// https://github.com/norishigefukushima/dct_simd/blob/master/dct/dct8x8_simd.cpp#L261 /// + /// destination block pointer [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal void IDCT8x4_RightPart(ref Block8x8F d) + internal void IDCT8x4_RightPart(ref Block8x8F destBlockPtr) { Vector4 my1 = this.V1R; Vector4 my7 = this.V7R; @@ -342,14 +363,14 @@ namespace ImageSharp.Formats my1 = mz1 + mz2; my2 = mz1 - mz2; - d.V0R = my0 + mb0; - d.V7R = my0 - mb0; - d.V1R = my1 + mb1; - d.V6R = my1 - mb1; - d.V2R = my2 + mb2; - d.V5R = my2 - mb2; - d.V3R = my3 + mb3; - d.V4R = my3 - mb3; + destBlockPtr.V0R = my0 + mb0; + destBlockPtr.V7R = my0 - mb0; + destBlockPtr.V1R = my1 + mb1; + destBlockPtr.V6R = my1 - mb1; + destBlockPtr.V2R = my2 + mb2; + destBlockPtr.V5R = my2 - mb2; + destBlockPtr.V3R = my3 + mb3; + destBlockPtr.V4R = my3 - mb3; } /// @@ -383,12 +404,15 @@ namespace ImageSharp.Formats /// /// Level shift by +128, clip to [0, 255], and write to buffer. /// + /// color buffer + /// stride offset + /// temp block pointer [MethodImpl(MethodImplOptions.AggressiveInlining)] - internal unsafe void CopyColorsTo(MutableSpan buffer, int stride, Block8x8F* temp) + internal unsafe void CopyColorsTo(MutableSpan buffer, int stride, Block8x8F* tempBlockPtr) { - this.TransformByteConvetibleColorValuesInto(ref *temp); + this.TransformByteConvetibleColorValuesInto(ref *tempBlockPtr); - float* src = (float*)temp; + float* src = (float*)tempBlockPtr; for (int i = 0; i < 8; i++) { buffer[0] = (byte)src[0]; diff --git a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs index 796ef1804..312e690be 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs @@ -56,6 +56,8 @@ namespace ImageSharp.Formats /// /// ReadByteStuffedByte is like ReadByte but is for byte-stuffed Huffman data. /// + /// input stream + /// error code /// The internal byte ReadByteStuffedByte(Stream inputStream, out JpegDecoderCore.ErrorCodes errorCode) { @@ -112,6 +114,7 @@ namespace ImageSharp.Formats /// /// Returns the next byte, whether buffered or not buffered. It does not care about byte stuffing. /// + /// input stream /// The [MethodImpl(MethodImplOptions.AggressiveInlining)] internal byte ReadByte(Stream inputStream) @@ -131,6 +134,7 @@ namespace ImageSharp.Formats /// Fills up the bytes buffer from the underlying stream. /// It should only be called when there are no unread bytes in bytes. /// + /// input stream [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void Fill(Stream inputStream) { From 1b9926b16a6d2708f619f4c623ca93d3a75113ac Mon Sep 17 00:00:00 2001 From: Olivia Date: Sat, 17 Dec 2016 20:41:19 +0100 Subject: [PATCH 3/4] Fixing more documentation warnings. Fixing generic type style warnings. --- src/ImageSharp/Drawing/DrawImage.cs | 2 +- src/ImageSharp/Formats/Gif/GifEncoderCore.cs | 13 +++++++++---- src/ImageSharp/Formats/Jpg/Components/Bits.cs | 9 ++++++++- src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs | 5 +++-- src/ImageSharp/Formats/Jpg/Components/Bytes.cs | 1 + src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs | 2 +- 6 files changed, 23 insertions(+), 9 deletions(-) diff --git a/src/ImageSharp/Drawing/DrawImage.cs b/src/ImageSharp/Drawing/DrawImage.cs index a192ea7b5..b7e672e0a 100644 --- a/src/ImageSharp/Drawing/DrawImage.cs +++ b/src/ImageSharp/Drawing/DrawImage.cs @@ -1,4 +1,4 @@ -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs index 4cbae6e77..b729f30e9 100644 --- a/src/ImageSharp/Formats/Gif/GifEncoderCore.cs +++ b/src/ImageSharp/Formats/Gif/GifEncoderCore.cs @@ -53,7 +53,8 @@ namespace ImageSharp.Formats /// The to encode from. /// The to encode the image data to. public void Encode(Image image, Stream stream) - where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { Guard.NotNull(image, nameof(image)); Guard.NotNull(stream, nameof(stream)); @@ -121,7 +122,8 @@ namespace ImageSharp.Formats /// The . /// private static int GetTransparentIndex(QuantizedImage quantized) - where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { // Find the lowest alpha value and make it the transparent index. int index = -1; @@ -236,7 +238,9 @@ namespace ImageSharp.Formats private void WriteGraphicalControlExtension( ImageBase image, EndianBinaryWriter writer, - int transparencyIndex) where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + int transparencyIndex) + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { // TODO: Check transparency logic. bool hasTransparent = transparencyIndex > -1; @@ -281,7 +285,8 @@ namespace ImageSharp.Formats /// The to be encoded. /// The stream to write to. private void WriteImageDescriptor(ImageBase image, EndianBinaryWriter writer) - where TColor : struct, IPackedPixel where TPacked : struct, IEquatable + where TColor : struct, IPackedPixel + where TPacked : struct, IEquatable { writer.Write(GifConstants.ImageDescriptorLabel); // 2c // TODO: Can we capture this? diff --git a/src/ImageSharp/Formats/Jpg/Components/Bits.cs b/src/ImageSharp/Formats/Jpg/Components/Bits.cs index b273b2702..c2cad1794 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bits.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bits.cs @@ -36,7 +36,8 @@ namespace ImageSharp.Formats /// the caller is the one responsible for first checking that bits.UnreadBits < n. /// /// The number of bits to ensure. - /// + /// Jpeg decoder + /// Error code [MethodImpl(MethodImplOptions.AggressiveInlining)] internal JpegDecoderCore.ErrorCodes EnsureNBits(int n, JpegDecoderCore decoder) { @@ -69,6 +70,12 @@ namespace ImageSharp.Formats } } + /// + /// Receive extend + /// + /// byte + /// Jpeg decoder + /// Read bits value internal int ReceiveExtend(byte t, JpegDecoderCore decoder) { if (this.UnreadBits < t) diff --git a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs index 9c982e88b..d6ca7f38c 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs @@ -188,6 +188,7 @@ namespace ImageSharp.Formats /// /// block pointer /// index + /// the scalar value at the specified index [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe float GetScalarAt(Block8x8F* blockPtr, int idx) { @@ -386,7 +387,7 @@ namespace ImageSharp.Formats /// /// TODO: Should be removed when BlockF goes away /// - /// + /// legacy block internal void LoadFrom(ref BlockF legacyBlock) { this.LoadFrom(legacyBlock.Data); @@ -395,7 +396,7 @@ namespace ImageSharp.Formats /// /// TODO: Should be removed when BlockF goes away /// - /// + /// legacy block internal void CopyTo(ref BlockF legacyBlock) { this.CopyTo(legacyBlock.Data); diff --git a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs index 312e690be..efb9660e3 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs @@ -38,6 +38,7 @@ namespace ImageSharp.Formats /// /// Creates a new instance of the , and initializes it's buffer. /// + /// the bytes created public static Bytes Create() { return new Bytes { Buffer = ArrayPool.Rent(4096) }; diff --git a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs index 313360d1c..b9cdad39d 100644 --- a/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegDecoderCore.cs @@ -1874,7 +1874,7 @@ namespace ImageSharp.Formats /// /// The block of coefficients /// The Huffman tree - /// + /// Unzig ptr /// The zig-zag start index /// The zig-zag end index /// The low transform offset From e85583ad30d628b1cf2e68f7731d30330d69197f Mon Sep 17 00:00:00 2001 From: Olivia Date: Sat, 17 Dec 2016 21:24:46 +0100 Subject: [PATCH 4/4] Fixing docs to start with uppercase letter. --- src/ImageSharp/Formats/Jpg/Components/Bits.cs | 2 +- .../Formats/Jpg/Components/Block8x8F.cs | 48 +++++++++---------- .../Formats/Jpg/Components/Bytes.cs | 10 ++-- 3 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/ImageSharp/Formats/Jpg/Components/Bits.cs b/src/ImageSharp/Formats/Jpg/Components/Bits.cs index c2cad1794..0eebef132 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bits.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bits.cs @@ -73,7 +73,7 @@ namespace ImageSharp.Formats /// /// Receive extend /// - /// byte + /// Byte /// Jpeg decoder /// Read bits value internal int ReceiveExtend(byte t, JpegDecoderCore decoder) diff --git a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs index d6ca7f38c..33b73cdd1 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Block8x8F.cs @@ -85,8 +85,8 @@ namespace ImageSharp.Formats /// /// Load raw 32bit floating point data from source /// - /// block pointer - /// source + /// Block pointer + /// Source [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void LoadFrom(Block8x8F* blockPtr, MutableSpan source) { @@ -96,8 +96,8 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// - /// block pointer - /// destination + /// Block pointer + /// Destination [MethodImpl(MethodImplOptions.AggressiveInlining)] public static unsafe void CopyTo(Block8x8F* blockPtr, MutableSpan dest) { @@ -107,7 +107,7 @@ namespace ImageSharp.Formats /// /// Load raw 32bit floating point data from source /// - /// source + /// Source [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void LoadFrom(MutableSpan source) { @@ -120,7 +120,7 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// - /// destination + /// Destination [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void CopyTo(MutableSpan dest) { @@ -133,7 +133,7 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// - /// destination + /// Destination [MethodImpl(MethodImplOptions.AggressiveInlining)] public unsafe void CopyTo(float[] dest) { @@ -186,9 +186,9 @@ namespace ImageSharp.Formats /// /// Pointer-based "Indexer" (getter part) /// - /// block pointer - /// index - /// the scalar value at the specified index + /// Block pointer + /// Index + /// The scalar value at the specified index [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe float GetScalarAt(Block8x8F* blockPtr, int idx) { @@ -199,9 +199,9 @@ namespace ImageSharp.Formats /// /// Pointer-based "Indexer" (setter part) /// - /// block pointer - /// index - /// value + /// Block pointer + /// Index + /// Value [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void SetScalarAt(Block8x8F* blockPtr, int idx, float value) { @@ -212,9 +212,9 @@ namespace ImageSharp.Formats /// /// Un-zig /// - /// block pointer - /// qt pointer - /// unzig pointer + /// Block pointer + /// Qt pointer + /// Unzig pointer [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static unsafe void UnZig(Block8x8F* blockPtr, Block8x8F* qtPtr, int* unzigPtr) { @@ -232,7 +232,7 @@ namespace ImageSharp.Formats /// /// Copy raw 32bit floating point data to dest /// - /// destination + /// Destination internal unsafe void CopyTo(MutableSpan dest) { fixed (Vector4* ptr = &this.V0L) @@ -248,7 +248,7 @@ namespace ImageSharp.Formats /// /// Load raw 32bit floating point data from source /// - /// source + /// Source internal unsafe void LoadFrom(MutableSpan source) { fixed (Vector4* ptr = &this.V0L) @@ -322,7 +322,7 @@ namespace ImageSharp.Formats /// Original source: /// https://github.com/norishigefukushima/dct_simd/blob/master/dct/dct8x8_simd.cpp#L261 /// - /// destination block pointer + /// Destination Block pointer [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void IDCT8x4_RightPart(ref Block8x8F destBlockPtr) { @@ -387,7 +387,7 @@ namespace ImageSharp.Formats /// /// TODO: Should be removed when BlockF goes away /// - /// legacy block + /// Legacy block internal void LoadFrom(ref BlockF legacyBlock) { this.LoadFrom(legacyBlock.Data); @@ -396,7 +396,7 @@ namespace ImageSharp.Formats /// /// TODO: Should be removed when BlockF goes away /// - /// legacy block + /// Legacy block internal void CopyTo(ref BlockF legacyBlock) { this.CopyTo(legacyBlock.Data); @@ -405,9 +405,9 @@ namespace ImageSharp.Formats /// /// Level shift by +128, clip to [0, 255], and write to buffer. /// - /// color buffer - /// stride offset - /// temp block pointer + /// Color buffer + /// Stride offset + /// Temp Block pointer [MethodImpl(MethodImplOptions.AggressiveInlining)] internal unsafe void CopyColorsTo(MutableSpan buffer, int stride, Block8x8F* tempBlockPtr) { diff --git a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs index efb9660e3..f848439a0 100644 --- a/src/ImageSharp/Formats/Jpg/Components/Bytes.cs +++ b/src/ImageSharp/Formats/Jpg/Components/Bytes.cs @@ -38,7 +38,7 @@ namespace ImageSharp.Formats /// /// Creates a new instance of the , and initializes it's buffer. /// - /// the bytes created + /// The bytes created public static Bytes Create() { return new Bytes { Buffer = ArrayPool.Rent(4096) }; @@ -57,8 +57,8 @@ namespace ImageSharp.Formats /// /// ReadByteStuffedByte is like ReadByte but is for byte-stuffed Huffman data. /// - /// input stream - /// error code + /// Input stream + /// Error code /// The internal byte ReadByteStuffedByte(Stream inputStream, out JpegDecoderCore.ErrorCodes errorCode) { @@ -115,7 +115,7 @@ namespace ImageSharp.Formats /// /// Returns the next byte, whether buffered or not buffered. It does not care about byte stuffing. /// - /// input stream + /// Input stream /// The [MethodImpl(MethodImplOptions.AggressiveInlining)] internal byte ReadByte(Stream inputStream) @@ -135,7 +135,7 @@ namespace ImageSharp.Formats /// Fills up the bytes buffer from the underlying stream. /// It should only be called when there are no unread bytes in bytes. /// - /// input stream + /// Input stream [MethodImpl(MethodImplOptions.AggressiveInlining)] internal void Fill(Stream inputStream) {