Browse Source

Update folder structure

pull/3153/head
winscripter 1 day ago
parent
commit
497c27c0d7
  1. 1
      src/ImageSharp/Formats/Jxl/IO/FrameHeader/JxlFrameHeader.cs
  2. 2
      src/ImageSharp/Formats/Jxl/IO/Jpeg/Data/JpegAppMarkerType.cs
  3. 2
      src/ImageSharp/Formats/Jxl/IO/Jpeg/Data/JpegDataConstants.cs
  4. 29
      src/ImageSharp/Formats/Jxl/IO/Jpeg/Data/JpegQuantizationTable.cs
  5. 38
      src/ImageSharp/Formats/Jxl/IO/Jpeg/JpegHuffmanDecoder.cs
  6. 0
      src/ImageSharp/Formats/Jxl/IO/Jpeg/README.md
  7. 2
      src/ImageSharp/Formats/Jxl/IO/Metadata/JxlOpsinInverseMatrix.cs
  8. 9
      src/ImageSharp/Formats/Jxl/InlineArrays.cs
  9. 4
      src/ImageSharp/Formats/Jxl/Processing/AcStrategy/IJxlDctAcImage.cs
  10. 2
      src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcContext.cs
  11. 2
      src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategy.cs
  12. 2
      src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategyImage.cs
  13. 2
      src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategyRow.cs
  14. 2
      src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategyType.cs
  15. 2
      src/ImageSharp/Formats/Jxl/Processing/Blending/JxlAlphaBlendingInputLayer.cs
  16. 2
      src/ImageSharp/Formats/Jxl/Processing/Blending/JxlAlphaBlendingOutput.cs
  17. 2
      src/ImageSharp/Formats/Jxl/Processing/Blending/JxlAlphaHelper.cs
  18. 1
      src/ImageSharp/Formats/Jxl/Processing/Butteraugli/Butteraugli.cs
  19. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDct.cs
  20. 3
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctAcImage{T}.cs
  21. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctAcPointer.cs
  22. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctAcType.cs
  23. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctOutput.cs
  24. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctQuantWeightParameters.cs
  25. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctReadOnlyAcPointer.cs
  26. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctScales.cs
  27. 2
      src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctSource.cs
  28. 1
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs
  29. 1
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlFrameDecoder.cs
  30. 1
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlNoiseDecoder.cs
  31. 1
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlOutputEncodingInfo.cs
  32. 1
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlPassesDecoderState.cs
  33. 2
      src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlPatchDictionary.cs
  34. 1
      src/ImageSharp/Formats/Jxl/Processing/Encoder/Ans/JxlHistogramParameters.cs
  35. 72
      src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlAuxiliaryOutput.cs
  36. 9
      src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlAuxiliaryOutputConstants.cs
  37. 22
      src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlLayerTotals.cs
  38. 23
      src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlLayerType.cs
  39. 1
      src/ImageSharp/Formats/Jxl/Processing/JxlBlockContextMap.cs
  40. 1
      src/ImageSharp/Formats/Jxl/Processing/JxlCoefficientOrder.cs
  41. 1
      src/ImageSharp/Formats/Jxl/Processing/JxlConvolve.cs
  42. 1
      src/ImageSharp/Formats/Jxl/Processing/JxlEntropyCoder.cs
  43. 1
      src/ImageSharp/Formats/Jxl/Processing/JxlImageFeatures.cs
  44. 1
      src/ImageSharp/Formats/Jxl/Processing/JxlLoopFilter.cs
  45. 2
      src/ImageSharp/Formats/Jxl/Processing/JxlOpsinInverseParameters.cs
  46. 2
      src/ImageSharp/Formats/Jxl/Processing/JxlPassesSharedState.cs
  47. 2
      src/ImageSharp/Formats/Jxl/Processing/JxlTranspose.cs
  48. 2
      src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseHelper.cs
  49. 2
      src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseIndexAndFraction.cs
  50. 2
      src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseLevel.cs
  51. 2
      src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseParameters.cs
  52. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlAspectRatioHelpers.cs
  53. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlBitDepth.cs
  54. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlBitDepthType.cs
  55. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlDataType.cs
  56. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlInverseMtf.cs
  57. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlLehmerCode.cs
  58. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlMatrix3x3.cs
  59. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlMatrix3x3F.cs
  60. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlOverride.cs
  61. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlOverrideHelpers.cs
  62. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlPackSigned.cs
  63. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlPixelFormat.cs
  64. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlSpeedTier.cs
  65. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlWeightsSeparable5.cs
  66. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlWeightsSymmetric3.cs
  67. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlWeightsSymmetric5.cs
  68. 2
      src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlXorShift.cs
  69. 3
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlDequantMatrices.cs
  70. 2
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantMode.cs
  71. 2
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantTable.cs
  72. 4
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantWeights.cs
  73. 3
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizer.cs
  74. 2
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizerConstants.cs
  75. 4
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizerEncoding.cs
  76. 2
      src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizerParameters.cs
  77. 2
      src/ImageSharp/Formats/Jxl/Processing/Splines/JxlQuantizedSpline.cs

1
src/ImageSharp/Formats/Jxl/IO/FrameHeader/JxlFrameHeader.cs

@ -9,6 +9,7 @@
using SixLabors.ImageSharp.Formats.Jxl.Fields; using SixLabors.ImageSharp.Formats.Jxl.Fields;
using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata; using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata;
using SixLabors.ImageSharp.Formats.Jxl.Processing; using SixLabors.ImageSharp.Formats.Jxl.Processing;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader; namespace SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader;

2
src/ImageSharp/Formats/Jxl/Processing/Jpeg/Data/JpegAppMarkerType.cs → src/ImageSharp/Formats/Jxl/IO/Jpeg/Data/JpegAppMarkerType.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Jpeg.Data; namespace SixLabors.ImageSharp.Formats.Jxl.IO.Jpeg.Data;
/// <summary> /// <summary>
/// Identifies the kind of APP marker in a JPEG file. /// Identifies the kind of APP marker in a JPEG file.

2
src/ImageSharp/Formats/Jxl/Processing/Jpeg/Data/JpegDataConstants.cs → src/ImageSharp/Formats/Jxl/IO/Jpeg/Data/JpegDataConstants.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Jpeg.Data; namespace SixLabors.ImageSharp.Formats.Jxl.IO.Jpeg.Data;
/// <summary> /// <summary>
/// Constants used in parsed JPEG data. /// Constants used in parsed JPEG data.

29
src/ImageSharp/Formats/Jxl/IO/Jpeg/Data/JpegQuantizationTable.cs

@ -0,0 +1,29 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.IO.Jpeg.Data;
/// <summary>
/// Representation of quantization values for an 8x8 pixel block.
/// </summary>
internal struct JpegQuantizationTable()
{
/// <summary>
/// Quantization values
/// </summary>
public InlineArray64<int> Values;
public int Precision { get; set; }
/// <summary>
/// Gets or sets the index of the quantization table
/// as it was parsed from the input JPEG.
/// </summary>
public int Index { get; set; }
/// <summary>
/// Gets or sets a value indicating whether this table
/// is the last one within its marker segment.
/// </summary>
public bool IsLast { get; set; } = true;
}

38
src/ImageSharp/Formats/Jxl/IO/Jpeg/JpegHuffmanDecoder.cs

@ -0,0 +1,38 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.IO.Jpeg;
/// <summary>
/// Decodes Huffman codes in a JPEG file for JPEG to JPEG XL encoder.
/// </summary>
internal static class JpegHuffmanDecoder
{
private const int RootTableBits = 8;
private const int LookupSize = 8;
private static int NextTableBitSize(Span<int> count, int length)
{
int left = 1 << (length - RootTableBits);
while (length < MaxBitLength)
{
left -= count[length];
if (left <= 0)
{
break;
}
length++;
left <<= 1;
}
return length - RootTableBits;
}
public struct HuffmanTableEntry()
{
public byte Bits = 0;
public ushort Value = 0xFFFF;
}
}

0
src/ImageSharp/Formats/Jxl/Processing/Jpeg/README.md → src/ImageSharp/Formats/Jxl/IO/Jpeg/README.md

2
src/ImageSharp/Formats/Jxl/IO/Metadata/JxlOpsinInverseMatrix.cs

@ -5,7 +5,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.Fields; using SixLabors.ImageSharp.Formats.Jxl.Fields;
using SixLabors.ImageSharp.Formats.Jxl.Processing; using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.IO.Metadata; namespace SixLabors.ImageSharp.Formats.Jxl.IO.Metadata;

9
src/ImageSharp/Formats/Jxl/InlineArrays.cs

@ -16,6 +16,15 @@ internal struct InlineArray55<T>
private T first; private T first;
} }
/// <summary>
/// Used by JpegQuantizationTable
/// </summary>
[InlineArray(64)]
internal struct InlineArray64<T>
{
private T first;
}
/// <summary> /// <summary>
/// Used by JxlCustomTransformData /// Used by JxlCustomTransformData
/// </summary> /// </summary>

4
src/ImageSharp/Formats/Jxl/Processing/IJxlDctAcImage.cs → src/ImageSharp/Formats/Jxl/Processing/AcStrategy/IJxlDctAcImage.cs

@ -1,7 +1,9 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; using SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
/// <summary> /// <summary>
/// Base DCT AC coefficient image /// Base DCT AC coefficient image

2
src/ImageSharp/Formats/Jxl/Processing/JxlAcContext.cs → src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcContext.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
/// <summary> /// <summary>
/// AC context /// AC context

2
src/ImageSharp/Formats/Jxl/Processing/JxlAcStrategy.cs → src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategy.cs

@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using static SixLabors.ImageSharp.Formats.Jxl.Processing.JxlFrameDimensions; using static SixLabors.ImageSharp.Formats.Jxl.Processing.JxlFrameDimensions;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
[StructLayout(LayoutKind.Sequential, Pack = 8)] [StructLayout(LayoutKind.Sequential, Pack = 8)]
internal struct JxlAcStrategy internal struct JxlAcStrategy

2
src/ImageSharp/Formats/Jxl/Processing/JxlAcStrategyImage.cs → src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategyImage.cs

@ -3,7 +3,7 @@
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
internal sealed class JxlAcStrategyImage : IDisposable internal sealed class JxlAcStrategyImage : IDisposable
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlAcStrategyRow.cs → src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategyRow.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
internal sealed class JxlAcStrategyRow internal sealed class JxlAcStrategyRow
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlAcStrategyType.cs → src/ImageSharp/Formats/Jxl/Processing/AcStrategy/JxlAcStrategyType.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
internal enum JxlAcStrategyType : ushort internal enum JxlAcStrategyType : ushort
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlAlphaBlendingInputLayer.cs → src/ImageSharp/Formats/Jxl/Processing/Blending/JxlAlphaBlendingInputLayer.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Blending;
internal sealed class JxlAlphaBlendingInputLayer internal sealed class JxlAlphaBlendingInputLayer
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlAlphaBlendingOutput.cs → src/ImageSharp/Formats/Jxl/Processing/Blending/JxlAlphaBlendingOutput.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Blending;
internal sealed class JxlAlphaBlendingOutput internal sealed class JxlAlphaBlendingOutput
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlAlphaHelper.cs → src/ImageSharp/Formats/Jxl/Processing/Blending/JxlAlphaHelper.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Blending;
internal sealed class JxlAlphaHelper internal sealed class JxlAlphaHelper
{ {

1
src/ImageSharp/Formats/Jxl/Processing/Butteraugli/Butteraugli.cs

@ -6,6 +6,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Formats.Jxl.Memory; using SixLabors.ImageSharp.Formats.Jxl.Memory;
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Butteraugli; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Butteraugli;

2
src/ImageSharp/Formats/Jxl/Processing/JxlDct.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDct.cs

@ -4,7 +4,7 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Discrete Cosine Transform with SIMD support. /// Discrete Cosine Transform with SIMD support.

3
src/ImageSharp/Formats/Jxl/Processing/JxlDctAcImage{T}.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctAcImage{T}.cs

@ -2,8 +2,9 @@
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.Memory; using SixLabors.ImageSharp.Formats.Jxl.Memory;
using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
internal sealed class JxlDctAcImage<T> : IJxlDctAcImage, IDisposable internal sealed class JxlDctAcImage<T> : IJxlDctAcImage, IDisposable
where T : unmanaged where T : unmanaged

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctAcPointer.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctAcPointer.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Pointer to DCT AC coefficients /// Pointer to DCT AC coefficients

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctAcType.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctAcType.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Bit size for DCT AC coefficient /// Bit size for DCT AC coefficient

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctOutput.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctOutput.cs

@ -4,7 +4,7 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Output DCT block. /// Output DCT block.

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctQuantWeightParameters.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctQuantWeightParameters.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
internal sealed class JxlDctQuantWeightParameters internal sealed class JxlDctQuantWeightParameters
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctReadOnlyAcPointer.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctReadOnlyAcPointer.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Pointer to DCT AC coefficients. (Read-only) /// Pointer to DCT AC coefficients. (Read-only)

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctScales.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctScales.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Read-only cosine lookups for the Discrete Cosine Transform (DCT), /// Read-only cosine lookups for the Discrete Cosine Transform (DCT),

2
src/ImageSharp/Formats/Jxl/Processing/JxlDctSource.cs → src/ImageSharp/Formats/Jxl/Processing/Dct/JxlDctSource.cs

@ -4,7 +4,7 @@
using System.Numerics; using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
/// <summary> /// <summary>
/// Source DCT block. /// Source DCT block.

1
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlDecoderCore.cs

@ -9,6 +9,7 @@ using SixLabors.ImageSharp.Formats.Jxl.IO;
using SixLabors.ImageSharp.Formats.Jxl.IO.Container; using SixLabors.ImageSharp.Formats.Jxl.IO.Container;
using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader; using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader;
using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata; using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
using SixLabors.ImageSharp.IO; using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Metadata.Profiles.Icc; using SixLabors.ImageSharp.Metadata.Profiles.Icc;

1
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlFrameDecoder.cs

@ -3,6 +3,7 @@
using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader; using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader;
using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata; using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;

1
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlNoiseDecoder.cs

@ -5,6 +5,7 @@ using System.Numerics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;

1
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlOutputEncodingInfo.cs

@ -4,6 +4,7 @@
using System.Numerics; using System.Numerics;
using SixLabors.ImageSharp.Formats.Jxl.Cms; using SixLabors.ImageSharp.Formats.Jxl.Cms;
using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata; using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;

1
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlPassesDecoderState.cs

@ -3,6 +3,7 @@
using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader; using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader;
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;

2
src/ImageSharp/Formats/Jxl/Processing/Decoder/JxlPatchDictionary.cs

@ -1,6 +1,8 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
internal sealed class JxlPatchDictionary internal sealed class JxlPatchDictionary

1
src/ImageSharp/Formats/Jxl/Processing/Encoder/Ans/JxlHistogramParameters.cs

@ -2,6 +2,7 @@
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.IO.Entropy; using SixLabors.ImageSharp.Formats.Jxl.IO.Entropy;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Encoder.Ans; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Encoder.Ans;

72
src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlAuxiliaryOutput.cs

@ -0,0 +1,72 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Encoder.AuxiliaryOutput;
/// <summary>
/// Provides statistics gathered during compression or decompression.
/// </summary>
internal sealed class JxlAuxiliaryOutput
{
public JxlLayerTotals[] Layers { get; set; } = new JxlLayerTotals[JxlAuxiliaryOutputConstants.NumberOfImageLayers];
public long NumberOfBlocks { get; set; }
public long NumberOfSmallBlocks { get; set; }
public long NumberOfDct4x8Blocks { get; set; }
public long NumberOfAfvBlocks { get; set; }
public long NumberOfDct8Blocks { get; set; }
public long NumberOfDct8x16Blocks { get; set; }
public long NumberOfDct8x32Blocks { get; set; }
public long NumberOfDct16Blocks { get; set; }
public long NumberOfDct16x32Blocks { get; set; }
public long NumberOfDct32Blocks { get; set; }
public long NumberOfDct32x64Blocks { get; set; }
public long NumberOfDct64Blocks { get; set; }
public long NumberOfButteraugliIterations { get; set; }
public long TotalBits => this.Layers.Sum(x => x.TotalBits);
public static string GetLayerName(JxlLayerType layer) => layer switch
{
JxlLayerType.Header => "Headers",
JxlLayerType.Toc => "TOC",
JxlLayerType.Dictionary => "Patches",
JxlLayerType.Splines => "Splines",
JxlLayerType.Noise => "Noise",
JxlLayerType.Quant => "Quantizer",
JxlLayerType.ModularTree => "ModularTree",
JxlLayerType.ModularGlobal => "ModularGlobal",
JxlLayerType.Dc => "DC",
JxlLayerType.ModularDcGroup => "ModularDcGroup",
JxlLayerType.ControlFields => "ControlFields",
JxlLayerType.Order => "CoeffOrder",
JxlLayerType.Ac => "ACHistograms",
JxlLayerType.AcTokens => "ACTokens",
JxlLayerType.ModularAcGroup => "ModularAcGroup",
_ => "Invalid",
};
public void Assimilate(JxlAuxiliaryOutput victim)
{
for (int i = 0; i < JxlAuxiliaryOutputConstants.NumberOfImageLayers; i++)
{
this.Layers[i].Assimilate(victim.Layers[i]);
}
this.NumberOfBlocks += victim.NumberOfBlocks;
this.NumberOfSmallBlocks += victim.NumberOfSmallBlocks;
}
}

9
src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlAuxiliaryOutputConstants.cs

@ -0,0 +1,9 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Encoder.AuxiliaryOutput;
internal class JxlAuxiliaryOutputConstants
{
public const int NumberOfImageLayers = (int)JxlLayerType.ModularAcGroup + 1;
}

22
src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlLayerTotals.cs

@ -0,0 +1,22 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Encoder.AuxiliaryOutput;
internal struct JxlLayerTotals
{
public int NumberOfClusteredHistograms;
public int ExtraBits;
public int HistogramBits;
public int TotalBits;
public double ClusteredEntropy;
public void Assimilate(in JxlLayerTotals victim)
{
this.NumberOfClusteredHistograms += victim.NumberOfClusteredHistograms;
this.HistogramBits += victim.HistogramBits;
this.ExtraBits += victim.ExtraBits;
this.TotalBits += victim.TotalBits;
this.ClusteredEntropy += victim.ClusteredEntropy;
}
}

23
src/ImageSharp/Formats/Jxl/Processing/Encoder/AuxiliaryOutput/JxlLayerType.cs

@ -0,0 +1,23 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Encoder.AuxiliaryOutput;
internal enum JxlLayerType : byte
{
Header = 0,
Toc,
Dictionary,
Splines,
Noise,
Quant,
ModularTree,
ModularGlobal,
Dc,
ModularDcGroup,
ControlFields,
Order,
Ac,
AcTokens,
ModularAcGroup,
}

1
src/ImageSharp/Formats/Jxl/Processing/JxlBlockContextMap.cs

@ -2,6 +2,7 @@
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

1
src/ImageSharp/Formats/Jxl/Processing/JxlCoefficientOrder.cs

@ -4,6 +4,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.IO.Entropy; using SixLabors.ImageSharp.Formats.Jxl.IO.Entropy;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

1
src/ImageSharp/Formats/Jxl/Processing/JxlConvolve.cs

@ -6,6 +6,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

1
src/ImageSharp/Formats/Jxl/Processing/JxlEntropyCoder.cs

@ -3,6 +3,7 @@
using SixLabors.ImageSharp.Formats.Jxl.Fields; using SixLabors.ImageSharp.Formats.Jxl.Fields;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

1
src/ImageSharp/Formats/Jxl/Processing/JxlImageFeatures.cs

@ -2,6 +2,7 @@
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Noise;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

1
src/ImageSharp/Formats/Jxl/Processing/JxlLoopFilter.cs

@ -4,6 +4,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Formats.Jxl.Fields; using SixLabors.ImageSharp.Formats.Jxl.Fields;
using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

2
src/ImageSharp/Formats/Jxl/Processing/JxlOpsinInverseParameters.cs

@ -1,6 +1,8 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;
internal static class JxlOpsinInverseParameters internal static class JxlOpsinInverseParameters

2
src/ImageSharp/Formats/Jxl/Processing/JxlPassesSharedState.cs

@ -6,6 +6,8 @@
using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader; using SixLabors.ImageSharp.Formats.Jxl.IO.FrameHeader;
using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata; using SixLabors.ImageSharp.Formats.Jxl.IO.Metadata;
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;

2
src/ImageSharp/Formats/Jxl/Processing/JxlTranspose.cs

@ -1,6 +1,8 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing;
/// <summary> /// <summary>

2
src/ImageSharp/Formats/Jxl/Processing/JxlNoiseHelper.cs → src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseHelper.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Noise;
internal static class JxlNoiseHelper internal static class JxlNoiseHelper
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlNoiseIndexAndFraction.cs → src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseIndexAndFraction.cs

@ -3,7 +3,7 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Noise;
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal struct JxlNoiseIndexAndFraction(int index, float fraction) internal struct JxlNoiseIndexAndFraction(int index, float fraction)

2
src/ImageSharp/Formats/Jxl/Processing/JxlNoiseLevel.cs → src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseLevel.cs

@ -3,7 +3,7 @@
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Noise;
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal struct JxlNoiseLevel(float noiseLevel, float intensity) internal struct JxlNoiseLevel(float noiseLevel, float intensity)

2
src/ImageSharp/Formats/Jxl/Processing/JxlNoiseParameters.cs → src/ImageSharp/Formats/Jxl/Processing/Noise/JxlNoiseParameters.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Noise;
internal sealed class JxlNoiseParameters internal sealed class JxlNoiseParameters
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlAspectRatioHelpers.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlAspectRatioHelpers.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal static class JxlAspectRatioHelpers internal static class JxlAspectRatioHelpers
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlBitDepth.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlBitDepth.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Describes the interpretation of the input and output /// Describes the interpretation of the input and output

2
src/ImageSharp/Formats/Jxl/Processing/JxlBitDepthType.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlBitDepthType.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Specifies the kind of bit depth. /// Specifies the kind of bit depth.

2
src/ImageSharp/Formats/Jxl/Processing/JxlDataType.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlDataType.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Specifies which data type to use for sample values /// Specifies which data type to use for sample values

2
src/ImageSharp/Formats/Jxl/Processing/JxlInverseMtf.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlInverseMtf.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Inverse Move to Front implementation /// Inverse Move to Front implementation

2
src/ImageSharp/Formats/Jxl/Processing/JxlLehmerCode.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlLehmerCode.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal static class JxlLehmerCode internal static class JxlLehmerCode
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlMatrix3x3.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlMatrix3x3.cs

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
#pragma warning disable IDE0044 // Add readonly modifier #pragma warning disable IDE0044 // Add readonly modifier
#pragma warning disable IDE0051 // Remove unused private members #pragma warning disable IDE0051 // Remove unused private members
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal struct JxlMatrix3x3 internal struct JxlMatrix3x3
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlMatrix3x3F.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlMatrix3x3F.cs

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
#pragma warning disable IDE0044 // Add readonly modifier #pragma warning disable IDE0044 // Add readonly modifier
#pragma warning disable IDE0052 // Remove unread private members #pragma warning disable IDE0052 // Remove unread private members
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal struct JxlMatrix3x3F internal struct JxlMatrix3x3F
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlOverride.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlOverride.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Represents a boolean which can be overriden to be a default /// Represents a boolean which can be overriden to be a default

2
src/ImageSharp/Formats/Jxl/Processing/JxlOverrideHelpers.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlOverrideHelpers.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Override utilities. /// Override utilities.

2
src/ImageSharp/Formats/Jxl/Processing/JxlPackSigned.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlPackSigned.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Provides PackSigned and UnpackSigned methods. /// Provides PackSigned and UnpackSigned methods.

2
src/ImageSharp/Formats/Jxl/Processing/JxlPixelFormat.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlPixelFormat.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Data type for the sample values per channel per pixel /// Data type for the sample values per channel per pixel

2
src/ImageSharp/Formats/Jxl/Processing/JxlSpeedTier.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlSpeedTier.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
/// <summary> /// <summary>
/// Defines how quickly or slowly to encode an image. Slower /// Defines how quickly or slowly to encode an image. Slower

2
src/ImageSharp/Formats/Jxl/Processing/JxlWeightsSeparable5.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlWeightsSeparable5.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal struct JxlWeightsSeparable5 internal struct JxlWeightsSeparable5
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlWeightsSymmetric3.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlWeightsSymmetric3.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal sealed class JxlWeightsSymmetric3 internal sealed class JxlWeightsSymmetric3
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlWeightsSymmetric5.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlWeightsSymmetric5.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics; using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal sealed class JxlWeightsSymmetric5 internal sealed class JxlWeightsSymmetric5
{ {

2
src/ImageSharp/Formats/Jxl/Processing/JxlXorShift.cs → src/ImageSharp/Formats/Jxl/Processing/Primitives/JxlXorShift.cs

@ -3,7 +3,7 @@
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
internal sealed class JxlXorShift internal sealed class JxlXorShift
{ {

3
src/ImageSharp/Formats/Jxl/Processing/JxlDequantMatrices.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlDequantMatrices.cs

@ -3,8 +3,9 @@
using System.Diagnostics; using System.Diagnostics;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// Contains matrices used to inverse quantize coefficients. /// Contains matrices used to inverse quantize coefficients.

2
src/ImageSharp/Formats/Jxl/Processing/JxlQuantMode.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantMode.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// Specifies which algorithm should be used to quantize coefficients. /// Specifies which algorithm should be used to quantize coefficients.

2
src/ImageSharp/Formats/Jxl/Processing/JxlQuantTable.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantTable.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// Specifies which quantization table to use depending on /// Specifies which quantization table to use depending on

4
src/ImageSharp/Formats/Jxl/Processing/JxlQuantWeights.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantWeights.cs

@ -1,7 +1,9 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
internal static class JxlQuantWeights internal static class JxlQuantWeights
{ {

3
src/ImageSharp/Formats/Jxl/Processing/JxlQuantizer.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizer.cs

@ -6,9 +6,10 @@ using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.Fields; using SixLabors.ImageSharp.Formats.Jxl.Fields;
using SixLabors.ImageSharp.Formats.Jxl.Memory; using SixLabors.ImageSharp.Formats.Jxl.Memory;
using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes; using SixLabors.ImageSharp.Formats.Jxl.Memory.ImageTypes;
using SixLabors.ImageSharp.Formats.Jxl.Processing.AcStrategy;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// The quantizer for DCT DC/AC coefficients. /// The quantizer for DCT DC/AC coefficients.

2
src/ImageSharp/Formats/Jxl/Processing/JxlQuantizerConstants.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizerConstants.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// Shared constants used by the quantizer. /// Shared constants used by the quantizer.

4
src/ImageSharp/Formats/Jxl/Processing/JxlQuantizerEncoding.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizerEncoding.cs

@ -1,7 +1,9 @@
// Copyright (c) Six Labors. // Copyright (c) Six Labors.
// Licensed under the Six Labors Split License. // Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; using SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// Specifies weights and quantizer modes. /// Specifies weights and quantizer modes.

2
src/ImageSharp/Formats/Jxl/Processing/JxlQuantizerParameters.cs → src/ImageSharp/Formats/Jxl/Processing/Quantization/JxlQuantizerParameters.cs

@ -3,7 +3,7 @@
using SixLabors.ImageSharp.Formats.Jxl.Fields; using SixLabors.ImageSharp.Formats.Jxl.Fields;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Quantization;
/// <summary> /// <summary>
/// Represents parameters for the JPEG XL quantizer. /// Represents parameters for the JPEG XL quantizer.

2
src/ImageSharp/Formats/Jxl/Processing/Splines/JxlQuantizedSpline.cs

@ -3,7 +3,9 @@
using System.Buffers; using System.Buffers;
using System.Runtime.CompilerServices; using System.Runtime.CompilerServices;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Dct;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder; using SixLabors.ImageSharp.Formats.Jxl.Processing.Decoder;
using SixLabors.ImageSharp.Formats.Jxl.Processing.Primitives;
namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Splines; namespace SixLabors.ImageSharp.Formats.Jxl.Processing.Splines;

Loading…
Cancel
Save