Browse Source

move Block8x8F into ImageSharp.Formats.Jpeg.Common

af/merge-core
Anton Firszov 9 years ago
parent
commit
d230faa928
  1. 2
      src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.cs
  2. 2
      src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.tt
  3. 3
      src/ImageSharp/Formats/Jpeg/Common/Block8x8F.cs
  4. 8
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/BlockQuad.cs
  5. 2
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/DCT.cs
  6. 2
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecodedBlock.cs
  7. 4
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegBlockProcessor.cs
  8. 3
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegPixelArea.cs
  9. 3
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegScanDecoder.ComputationData.cs
  10. 2
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegScanDecoder.DataPointers.cs
  11. 4
      src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegScanDecoder.cs
  12. 3
      src/ImageSharp/Formats/Jpeg/GolangPort/JpegDecoderCore.cs
  13. 3
      src/ImageSharp/Formats/Jpeg/GolangPort/JpegEncoderCore.cs
  14. 4
      tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs
  15. 2
      tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs
  16. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs
  17. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegUtilityTestFixture.cs
  18. 1
      tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs
  19. 2
      tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs
  20. 1
      tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs
  21. 1
      tests/ImageSharp.Tests/Formats/Jpg/YCbCrImageTests.cs

2
src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.cs

@ -5,7 +5,7 @@
// ReSharper disable InconsistentNaming
// <auto-generated />
#pragma warning disable
namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.Common
{
using System.Numerics;
using System.Runtime.CompilerServices;

2
src/ImageSharp/Formats/Jpeg/Common/Block8x8F.Generated.tt

@ -14,7 +14,7 @@
<#
char[] coordz = {'X', 'Y', 'Z', 'W'};
#>
namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.Common
{
using System.Numerics;
using System.Runtime.CompilerServices;

3
src/ImageSharp/Formats/Jpeg/Common/Block8x8F.cs

@ -3,10 +3,9 @@
// Licensed under the Apache License, Version 2.0.
// </copyright>
// ReSharper disable InconsistentNaming
namespace ImageSharp.Formats.Jpg
namespace ImageSharp.Formats.Jpeg.Common
{
using System;
using System.Buffers;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

8
src/ImageSharp/Formats/Jpeg/GolangPort/Components/BlockQuad.cs

@ -4,16 +4,18 @@
// </copyright>
namespace ImageSharp.Formats.Jpeg.GolangPort.Components
{
using ImageSharp.Formats.Jpg;
using ImageSharp.Formats.Jpeg.Common;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Poor man's stackalloc: Contains a value-type <see cref="float"/> buffer sized for 4 <see cref="Block8x8F"/> instances.
/// Poor man's stackalloc: Contains a value-type <see cref="float"/> buffer sized for 4 <see cref="Common.Block8x8F"/> instances.
/// Useful for decoder/encoder operations allocating a block for each Jpeg component.
/// </summary>
internal unsafe struct BlockQuad
{
/// <summary>
/// The value-type <see cref="float"/> buffer sized for 4 <see cref="Block8x8F"/> instances.
/// The value-type <see cref="float"/> buffer sized for 4 <see cref="Common.Block8x8F"/> instances.
/// </summary>
public fixed float Data[4 * Block8x8F.ScalarCount];
}

2
src/ImageSharp/Formats/Jpeg/GolangPort/Components/DCT.cs

@ -9,7 +9,7 @@ namespace ImageSharp.Formats.Jpeg.GolangPort.Components
using System.Numerics;
using System.Runtime.CompilerServices;
using ImageSharp.Formats.Jpg;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Contains forward and inverse DCT implementations

2
src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/DecodedBlock.cs

@ -5,7 +5,7 @@
namespace ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
{
using ImageSharp.Formats.Jpg;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// A structure to store unprocessed <see cref="Block8x8F"/> instances and their coordinates while scanning the image.

4
src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegBlockProcessor.cs

@ -6,10 +6,10 @@
namespace ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
{
using System.Runtime.InteropServices;
using ImageSharp.Formats.Jpg;
using ImageSharp.Memory;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Encapsulates the implementation of processing "raw" <see cref="Buffer{T}"/>-s into Jpeg image channels.
/// </summary>

3
src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegPixelArea.cs

@ -7,9 +7,10 @@ namespace ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
using System.Runtime.CompilerServices;
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
using ImageSharp.Memory;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Represents an area of a Jpeg subimage (channel)
/// </summary>

3
src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegScanDecoder.ComputationData.cs

@ -6,8 +6,7 @@
namespace ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
{
using System.Runtime.InteropServices;
using ImageSharp.Formats.Jpg;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <content>
/// Conains the definition of <see cref="ComputationData"/>

2
src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegScanDecoder.DataPointers.cs

@ -5,7 +5,7 @@
namespace ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
{
using ImageSharp.Formats.Jpg;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <content>
/// Conains the definition of <see cref="DataPointers"/>

4
src/ImageSharp/Formats/Jpeg/GolangPort/Components/Decoder/JpegScanDecoder.cs

@ -7,10 +7,10 @@ namespace ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder
{
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using ImageSharp.Formats.Jpg;
using ImageSharp.Memory;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Encapsulates the impementation of Jpeg SOS Huffman decoding. See JpegScanDecoder.md!
///

3
src/ImageSharp/Formats/Jpeg/GolangPort/JpegDecoderCore.cs

@ -11,10 +11,11 @@ namespace ImageSharp.Formats.Jpeg.GolangPort
using System.Threading.Tasks;
using ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder;
using ImageSharp.Formats.Jpg;
using ImageSharp.Memory;
using ImageSharp.PixelFormats;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Performs the jpeg decoding operation.
/// </summary>

3
src/ImageSharp/Formats/Jpeg/GolangPort/JpegEncoderCore.cs

@ -12,9 +12,10 @@ namespace ImageSharp.Formats.Jpeg.GolangPort
using ImageSharp.Formats.Jpeg.GolangPort.Components;
using ImageSharp.Formats.Jpeg.GolangPort.Components.Encoder;
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
using ImageSharp.PixelFormats;
using Block8x8F = ImageSharp.Formats.Jpeg.Common.Block8x8F;
/// <summary>
/// Image encoder for writing an image to a stream as a jpeg.
/// </summary>

4
tests/ImageSharp.Tests/Formats/Jpg/BadEofJpegTests.cs

@ -14,11 +14,7 @@ using Xunit.Abstractions;
namespace ImageSharp.Tests
{
using System.Numerics;
using ImageSharp.Formats.Jpg;
using ImageSharp.PixelFormats;
using ImageSharp.Processing;
public class BadEOFJpegTests : MeasureFixture
{

2
tests/ImageSharp.Tests/Formats/Jpg/Block8x8FTests.cs

@ -14,9 +14,9 @@ namespace ImageSharp.Tests
using System.Numerics;
using ImageSharp.Formats;
using ImageSharp.Formats.Jpeg.Common;
using ImageSharp.Formats.Jpeg.GolangPort.Components;
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
using Xunit;
using Xunit.Abstractions;

1
tests/ImageSharp.Tests/Formats/Jpg/JpegEncoderTests.cs

@ -14,7 +14,6 @@ using Xunit.Abstractions;
namespace ImageSharp.Tests
{
using ImageSharp.Formats.Jpg;
using ImageSharp.PixelFormats;
using ImageSharp.Processing;
using SixLabors.Primitives;

1
tests/ImageSharp.Tests/Formats/Jpg/JpegUtilityTestFixture.cs

@ -14,7 +14,6 @@ namespace ImageSharp.Tests
using System.Diagnostics;
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
public class JpegUtilityTestFixture : MeasureFixture
{

1
tests/ImageSharp.Tests/Formats/Jpg/JpegUtilsTests.cs

@ -10,7 +10,6 @@ namespace ImageSharp.Tests
using System.Numerics;
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
using ImageSharp.PixelFormats;
using Xunit;

2
tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementations.cs

@ -12,8 +12,8 @@ namespace ImageSharp.Tests
using System.Runtime.CompilerServices;
using ImageSharp.Formats;
using ImageSharp.Formats.Jpeg.Common;
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
/// <summary>
/// This class contains simplified (unefficient) reference implementations to produce verification data for unit tests

1
tests/ImageSharp.Tests/Formats/Jpg/ReferenceImplementationsTests.cs

@ -7,7 +7,6 @@
namespace ImageSharp.Tests.Formats.Jpg
{
using ImageSharp.Formats.Jpeg.GolangPort.Utils;
using ImageSharp.Formats.Jpg;
using Xunit;
using Xunit.Abstractions;

1
tests/ImageSharp.Tests/Formats/Jpg/YCbCrImageTests.cs

@ -6,7 +6,6 @@
namespace ImageSharp.Tests
{
using ImageSharp.Formats.Jpeg.GolangPort.Components.Decoder;
using ImageSharp.Formats.Jpg;
using SixLabors.Primitives;
using Xunit;
using Xunit.Abstractions;

Loading…
Cancel
Save