// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // namespace ImageSharp.Formats.Jpg { using System.Runtime.InteropServices; /// /// Conains the definition of /// internal unsafe partial struct JpegScanDecoder { /// /// Holds the "large" data blocks needed for computations /// [StructLayout(LayoutKind.Sequential)] public struct ComputationData { /// /// The main input/working block /// public Block8x8F Block; /// /// Temporal block 1 to store intermediate and/or final computation results /// public Block8x8F Temp1; /// /// Temporal block 2 to store intermediate and/or final computation results /// public Block8x8F Temp2; /// /// The quantization table as /// public Block8x8F QuantiazationTable; /// /// The jpeg unzig data /// public UnzigData Unzig; /// /// The no-idea-what's this data /// public fixed byte ScanData[3 * JpegDecoderCore.MaxComponents]; /// /// The DC component values /// public fixed int Dc[JpegDecoderCore.MaxComponents]; /// /// Creates and initializes a new instance /// /// The public static ComputationData Create() { ComputationData data = default(ComputationData); data.Unzig = UnzigData.Create(); return data; } } } }