Browse Source

Organize HEIF color converters

pull/2633/head
James Jackson-South 1 week ago
parent
commit
d57d02c9e2
  1. 2
      src/ImageSharp/Formats/Heif/Av1/Color/Av1PlanarSampleBuffer.cs
  2. 4
      src/ImageSharp/Formats/Heif/Av1/Color/Av1YuvConverter.cs
  3. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConversionParameters.cs
  4. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.CoefficientOperator.cs
  5. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.ConstantLuminanceOperator.cs
  6. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.ICtCpOperator.cs
  7. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.IdentityOperator.cs
  8. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.IptC2Operator.cs
  9. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.Operator.cs
  10. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.Samples.cs
  11. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.Smpte2085Operator.cs
  12. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.YCgCoOperator.cs
  13. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.YCgCoReversibleOperator.cs
  14. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.cs
  15. 4
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifPlanarColorConverter.cs
  16. 4
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifTransferFunctions.Simd.cs
  17. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifTransferFunctions.cs
  18. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.CoefficientOperator.cs
  19. 4
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.Parameters.cs
  20. 4
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.Simd.cs
  21. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.cs
  22. 2
      src/ImageSharp/Formats/Heif/Components/ColorConverters/IHeifPlanarSampleBuffer.cs
  23. 2
      src/ImageSharp/Formats/Heif/Hevc/Color/HevcPlanarSampleBuffer.cs
  24. 4
      src/ImageSharp/Formats/Heif/Hevc/Color/HevcYuvConverter.cs
  25. 2
      tests/ImageSharp.Tests/Formats/Heif/Color/HeifTransferFunctionsTests.cs

2
src/ImageSharp/Formats/Heif/Av1/Color/Av1PlanarSampleBuffer.cs

@ -3,7 +3,7 @@
using System.Runtime.InteropServices;
using SixLabors.ImageSharp.Formats.Heif.Av1.OpenBitstreamUnit;
using SixLabors.ImageSharp.Formats.Heif.Color;
using SixLabors.ImageSharp.Formats.Heif.Components;
using SixLabors.ImageSharp.Memory;
namespace SixLabors.ImageSharp.Formats.Heif.Av1.Color;

4
src/ImageSharp/Formats/Heif/Av1/Color/Av1YuvConverter.cs

@ -2,10 +2,10 @@
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Heif.Av1.OpenBitstreamUnit;
using SixLabors.ImageSharp.Formats.Heif.Color;
using SixLabors.ImageSharp.Formats.Heif.Components;
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
using SixLabors.ImageSharp.PixelFormats;
using static SixLabors.ImageSharp.Formats.Heif.Color.HeifColorConverterBase;
using static SixLabors.ImageSharp.Formats.Heif.Components.HeifColorConverterBase;
namespace SixLabors.ImageSharp.Formats.Heif.Av1.Color;

2
src/ImageSharp/Formats/Heif/Color/HeifColorConversionParameters.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConversionParameters.cs

@ -3,7 +3,7 @@
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <summary>
/// Stores the resolved H.273 values shared by every scalar and SIMD lane.

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.CoefficientOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.CoefficientOperator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.ConstantLuminanceOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.ConstantLuminanceOperator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.ICtCpOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.ICtCpOperator.cs

@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.IdentityOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.IdentityOperator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.IptC2Operator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.IptC2Operator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.Operator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.Operator.cs

@ -5,7 +5,7 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <content>
/// Provides the static operator contract and SIMD traversal used by HEIF color converters.

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.Samples.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.Samples.cs

@ -7,7 +7,7 @@ using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Common.Helpers;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <content>
/// Provides SIMD sample widening, chroma reconstruction, planar storage, and packed output for HEIF color conversion.

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.Smpte2085Operator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.Smpte2085Operator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.YCgCoOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.YCgCoOperator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.YCgCoReversibleOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.YCgCoReversibleOperator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
internal abstract partial class HeifColorConverterBase
{

2
src/ImageSharp/Formats/Heif/Color/HeifColorConverter.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifColorConverter.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <summary>
/// Identifies the H.273 matrix operation used between encoded planes and RGB components.

4
src/ImageSharp/Formats/Heif/Color/HeifPlanarColorConverter.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifPlanarColorConverter.cs

@ -7,9 +7,9 @@ using SixLabors.ImageSharp.Advanced;
using SixLabors.ImageSharp.Common.Helpers;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
using static SixLabors.ImageSharp.Formats.Heif.Color.HeifColorConverterBase;
using static SixLabors.ImageSharp.Formats.Heif.Components.HeifColorConverterBase;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <summary>
/// Converts between native HEIF component planes and packed ImageSharp pixels.

4
src/ImageSharp/Formats/Heif/Color/HeifTransferFunctions.Simd.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifTransferFunctions.Simd.cs

@ -3,9 +3,9 @@
using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
using static SixLabors.ImageSharp.Formats.Heif.Color.HeifTransferVectorOperators;
using static SixLabors.ImageSharp.Formats.Heif.Components.HeifTransferVectorOperators;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <content>
/// Provides the SIMD implementations of the H.273 transfer characteristics used by HEIF color conversion.

2
src/ImageSharp/Formats/Heif/Color/HeifTransferFunctions.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifTransferFunctions.cs

@ -3,7 +3,7 @@
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <summary>
/// Applies the H.273 transfer characteristics used by HEIF color conversion.

2
src/ImageSharp/Formats/Heif/Color/HeifYuv420ToRgb8Converter.CoefficientOperator.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.CoefficientOperator.cs

@ -4,7 +4,7 @@
using System.Runtime.CompilerServices;
using System.Runtime.Intrinsics;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <content>
/// Provides full-range fixed-point coefficient conversion.

4
src/ImageSharp/Formats/Heif/Color/HeifYuv420ToRgb8Converter.Parameters.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.Parameters.cs

@ -2,9 +2,7 @@
// Licensed under the Six Labors Split License.
using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <content>
/// Provides fixed-point scalar and SIMD coefficient storage for eight-bit 4:2:0 conversion.

4
src/ImageSharp/Formats/Heif/Color/HeifYuv420ToRgb8Converter.Simd.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.Simd.cs

@ -5,9 +5,9 @@ using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Common.Helpers;
using static SixLabors.ImageSharp.Formats.Heif.Color.HeifColorConverterBase;
using static SixLabors.ImageSharp.Formats.Heif.Components.HeifColorConverterBase;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <content>
/// Provides the operator-driven SIMD row traversal for eight-bit 4:2:0 conversion.

2
src/ImageSharp/Formats/Heif/Color/HeifYuv420ToRgb8Converter.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/HeifYuv420ToRgb8Converter.cs

@ -7,7 +7,7 @@ using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <summary>
/// Converts full-range eight-bit HEIF 4:2:0 planes with an unspecified matrix to packed RGB pixels.

2
src/ImageSharp/Formats/Heif/Color/IHeifPlanarSampleBuffer.cs → src/ImageSharp/Formats/Heif/Components/ColorConverters/IHeifPlanarSampleBuffer.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Heif.Color;
namespace SixLabors.ImageSharp.Formats.Heif.Components;
/// <summary>
/// Exposes the native planar sample layout shared by HEIF image codecs.

2
src/ImageSharp/Formats/Heif/Hevc/Color/HevcPlanarSampleBuffer.cs

@ -1,7 +1,7 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Heif.Color;
using SixLabors.ImageSharp.Formats.Heif.Components;
namespace SixLabors.ImageSharp.Formats.Heif.Hevc.Color;

4
src/ImageSharp/Formats/Heif/Hevc/Color/HevcYuvConverter.cs

@ -1,10 +1,10 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
using SixLabors.ImageSharp.Formats.Heif.Color;
using SixLabors.ImageSharp.Formats.Heif.Components;
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
using SixLabors.ImageSharp.PixelFormats;
using static SixLabors.ImageSharp.Formats.Heif.Color.HeifColorConverterBase;
using static SixLabors.ImageSharp.Formats.Heif.Components.HeifColorConverterBase;
namespace SixLabors.ImageSharp.Formats.Heif.Hevc.Color;

2
tests/ImageSharp.Tests/Formats/Heif/Color/HeifTransferFunctionsTests.cs

@ -2,7 +2,7 @@
// Licensed under the Six Labors Split License.
using System.Runtime.Intrinsics;
using SixLabors.ImageSharp.Formats.Heif.Color;
using SixLabors.ImageSharp.Formats.Heif.Components;
using SixLabors.ImageSharp.Metadata.Profiles.Cicp;
namespace SixLabors.ImageSharp.Tests.Formats.Heif.Color;

Loading…
Cancel
Save