diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcFillPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcFillPredictor.cs index cf4a9dd89..663ee5062 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcFillPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcFillPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block with the sample-domain midpoint when neither top nor left neighbors are available. /// -internal class Av1DcFillPredictor : IAv1Predictor +internal readonly struct Av1DcFillPredictor : IAv1Predictor { /// /// The number of samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1DcFillPredictor : IAv1Predictor private readonly uint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1DcFillPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1DcFillPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1DcFillPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcLeftPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcLeftPredictor.cs index e3361f1a4..d2ffbbaca 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcLeftPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcLeftPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block from the rounded average of its available left neighboring samples. /// -internal class Av1DcLeftPredictor : IAv1Predictor +internal readonly struct Av1DcLeftPredictor : IAv1Predictor { /// /// The number of samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1DcLeftPredictor : IAv1Predictor private readonly uint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1DcLeftPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1DcLeftPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1DcLeftPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcPredictor.cs index 6977ee40e..220975b65 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block from the rounded average of its top and left neighboring samples. /// -internal class Av1DcPredictor : IAv1Predictor +internal readonly struct Av1DcPredictor : IAv1Predictor { /// /// The number of top samples averaged and samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1DcPredictor : IAv1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1DcPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1DcPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1DcPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcTopPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcTopPredictor.cs index 4d4e85e14..a8e41b2cb 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcTopPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DcTopPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block from the rounded average of its available top neighboring samples. /// -internal class Av1DcTopPredictor : IAv1Predictor +internal readonly struct Av1DcTopPredictor : IAv1Predictor { /// /// The number of top samples averaged and samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1DcTopPredictor : IAv1Predictor private readonly uint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1DcTopPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1DcTopPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1DcTopPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone1Predictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone1Predictor.cs index 662010c5d..cfb2f4ba9 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone1Predictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone1Predictor.cs @@ -13,7 +13,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// Zone 1 projects the top reference samples into the block for prediction angles less than 90 degrees. /// The scalar prediction follows the directional prediction process in section 7.11.2.4 of the AV1 specification. /// -internal class Av1DirectionalZone1Predictor +internal readonly struct Av1DirectionalZone1Predictor { /// /// The width of the prediction block in samples. @@ -26,7 +26,7 @@ internal class Av1DirectionalZone1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for the specified block dimensions. + /// Initializes a new instance of the struct for the specified block dimensions. /// /// The dimensions of the prediction block. public Av1DirectionalZone1Predictor(Size blockSize) @@ -36,7 +36,7 @@ internal class Av1DirectionalZone1Predictor } /// - /// Initializes a new instance of the class for the specified transform size. + /// Initializes a new instance of the struct for the specified transform size. /// /// The transform size that determines the prediction block dimensions. public Av1DirectionalZone1Predictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone2Predictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone2Predictor.cs index 74b25509b..257e0615e 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone2Predictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone2Predictor.cs @@ -15,7 +15,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// Zone 2 projects both top and left reference samples into the block for prediction angles between 90 and 180 degrees. /// The scalar prediction follows the directional prediction process in section 7.11.2.4 of the AV1 specification. /// -internal class Av1DirectionalZone2Predictor +internal readonly struct Av1DirectionalZone2Predictor { /// /// The width of the prediction block in samples. @@ -28,7 +28,7 @@ internal class Av1DirectionalZone2Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for the specified block dimensions. + /// Initializes a new instance of the struct for the specified block dimensions. /// /// The dimensions of the prediction block. public Av1DirectionalZone2Predictor(Size blockSize) @@ -38,7 +38,7 @@ internal class Av1DirectionalZone2Predictor } /// - /// Initializes a new instance of the class for the specified transform size. + /// Initializes a new instance of the struct for the specified transform size. /// /// The transform size that determines the prediction block dimensions. public Av1DirectionalZone2Predictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone3Predictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone3Predictor.cs index 99aedafee..5caa1d81c 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone3Predictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1DirectionalZone3Predictor.cs @@ -14,7 +14,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// Zone 3 projects the left reference samples into the block for prediction angles greater than 180 degrees. /// The scalar prediction follows the directional prediction process in section 7.11.2.4 of the AV1 specification. /// -internal class Av1DirectionalZone3Predictor +internal readonly struct Av1DirectionalZone3Predictor { /// /// The width of the prediction block in samples. @@ -27,7 +27,7 @@ internal class Av1DirectionalZone3Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for the specified block dimensions. + /// Initializes a new instance of the struct for the specified block dimensions. /// /// The dimensions of the prediction block. public Av1DirectionalZone3Predictor(Size blockSize) @@ -37,7 +37,7 @@ internal class Av1DirectionalZone3Predictor } /// - /// Initializes a new instance of the class for the specified transform size. + /// Initializes a new instance of the struct for the specified transform size. /// /// The transform size that determines the prediction block dimensions. public Av1DirectionalZone3Predictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1HorizontalPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1HorizontalPredictor.cs index f84e0abe3..3ae2e09b3 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1HorizontalPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1HorizontalPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block by extending each left neighboring sample across its destination row. /// -internal class Av1HorizontalPredictor : IAv1Predictor +internal readonly struct Av1HorizontalPredictor : IAv1Predictor { /// /// The number of samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1HorizontalPredictor : IAv1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1HorizontalPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1HorizontalPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1HorizontalPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1PaethPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1PaethPredictor.cs index 4efb40acc..025d6256e 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1PaethPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1PaethPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block by selecting the top, left, or top-left neighbor with the smallest local gradient. /// -internal class Av1PaethPredictor : IAv1Predictor +internal readonly struct Av1PaethPredictor : IAv1Predictor { /// /// The number of top samples consumed and samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1PaethPredictor : IAv1Predictor private readonly uint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1PaethPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1PaethPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1PaethPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothHorizontalPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothHorizontalPredictor.cs index d0901e1a4..838408967 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothHorizontalPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothHorizontalPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block by smoothly blending each left neighbor toward the top-right reference sample. /// -internal class Av1SmoothHorizontalPredictor : IAv1Predictor +internal readonly struct Av1SmoothHorizontalPredictor : IAv1Predictor { /// /// The number of interpolation weights and samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1SmoothHorizontalPredictor : IAv1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1SmoothHorizontalPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1SmoothHorizontalPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1SmoothHorizontalPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothPredictor.cs index 5386803b2..6fe36c316 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block by blending top-to-bottom and left-to-right smooth interpolation surfaces. /// -internal class Av1SmoothPredictor : IAv1Predictor +internal readonly struct Av1SmoothPredictor : IAv1Predictor { // Weights are quadratic from '1' to '1 / BlockSize', scaled by // 2^sm_weight_log2_scale. @@ -61,7 +61,7 @@ internal class Av1SmoothPredictor : IAv1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1SmoothPredictor(Size blockSize) @@ -71,7 +71,7 @@ internal class Av1SmoothPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1SmoothPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothVerticalPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothVerticalPredictor.cs index bf618cf4b..dafff6829 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothVerticalPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1SmoothVerticalPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block by smoothly blending each top neighbor toward the bottom-left reference sample. /// -internal class Av1SmoothVerticalPredictor : IAv1Predictor +internal readonly struct Av1SmoothVerticalPredictor : IAv1Predictor { /// /// The number of top samples consumed and samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1SmoothVerticalPredictor : IAv1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1SmoothVerticalPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1SmoothVerticalPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1SmoothVerticalPredictor(Av1TransformSize transformSize) diff --git a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1VerticalPredictor.cs b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1VerticalPredictor.cs index b9cf9d192..78a76cf38 100644 --- a/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1VerticalPredictor.cs +++ b/src/ImageSharp/Formats/Heif/Av1/Prediction/Av1VerticalPredictor.cs @@ -9,7 +9,7 @@ namespace SixLabors.ImageSharp.Formats.Heif.Av1.Prediction; /// /// Predicts an 8-bit AV1 block by copying the top neighboring samples into every destination row. /// -internal class Av1VerticalPredictor : IAv1Predictor +internal readonly struct Av1VerticalPredictor : IAv1Predictor { /// /// The number of top samples consumed and samples written to each destination row. @@ -22,7 +22,7 @@ internal class Av1VerticalPredictor : IAv1Predictor private readonly nuint blockHeight; /// - /// Initializes a new instance of the class for explicit block dimensions. + /// Initializes a new instance of the struct for explicit block dimensions. /// /// The predicted block dimensions in samples. public Av1VerticalPredictor(Size blockSize) @@ -32,7 +32,7 @@ internal class Av1VerticalPredictor : IAv1Predictor } /// - /// Initializes a new instance of the class for a transform size. + /// Initializes a new instance of the struct for a transform size. /// /// The transform size whose dimensions define the predicted block. public Av1VerticalPredictor(Av1TransformSize transformSize)