Browse Source

Fixed warnings

pull/1706/head
Dmitry Pentin 5 years ago
parent
commit
eb6888a378
  1. 11
      src/ImageSharp/Formats/Jpeg/Components/Quantization.cs
  2. 2
      src/ImageSharp/Formats/Jpeg/JpegDecoder.cs
  3. 2
      tests/ImageSharp.Tests/Formats/Jpg/QuantizationTests.cs
  4. 1
      tests/ImageSharp.Tests/Formats/Jpg/SpectralJpegTests.cs

11
src/ImageSharp/Formats/Jpeg/Components/Quantization.cs

@ -2,9 +2,7 @@
// Licensed under the Apache License, Version 2.0.
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Text;
namespace SixLabors.ImageSharp.Formats.Jpeg.Components
{
@ -87,8 +85,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components
/// </remarks>
/// <param name="table">Input quantization table.</param>
/// <param name="target">Quantization to estimate against.</param>
/// <param name="quality">Estimated quality</param>
/// <returns><see cref="bool"/> indicating if given table is target-complient</returns>
/// <returns>Estimated quality</returns>
public static int EstimateQuality(ref Block8x8F table, ReadOnlySpan<byte> target)
{
// This method can be SIMD'ified if standard table is injected as Block8x8F.
@ -152,8 +149,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components
/// Estimates jpeg quality based on quantization table in zig-zag order.
/// </summary>
/// <param name="luminanceTable">Luminance quantization table.</param>
/// <param name="quality">Output jpeg quality.</param>
/// <returns><see cref="bool"/> indicating if given table is ITU-complient.</returns>
/// <returns>Estimated quality</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int EstimateLuminanceQuality(ref Block8x8F luminanceTable)
=> EstimateQuality(ref luminanceTable, UnscaledQuant_Luminance);
@ -162,8 +158,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components
/// Estimates jpeg quality based on quantization table in zig-zag order.
/// </summary>
/// <param name="chrominanceTable">Chrominance quantization table.</param>
/// <param name="quality">Output jpeg quality.</param>
/// <returns><see cref="bool"/> indicating if given table is ITU-complient.</returns>
/// <returns>Estimated quality</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static int EstimateChrominanceQuality(ref Block8x8F chrominanceTable)
=> EstimateQuality(ref chrominanceTable, UnscaledQuant_Chrominance);

2
src/ImageSharp/Formats/Jpeg/JpegDecoder.cs

@ -4,8 +4,6 @@
using System.IO;
using System.Threading;
using System.Threading.Tasks;
using SixLabors.ImageSharp.IO;
using SixLabors.ImageSharp.Memory;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.Jpeg

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

@ -1,10 +1,8 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using SixLabors.ImageSharp.Formats.Jpeg.Components;
using Xunit;
using Xunit.Abstractions;
using JpegQuantization = SixLabors.ImageSharp.Formats.Jpeg.Components.Quantization;

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

@ -4,7 +4,6 @@
using System;
using System.IO;
using System.Linq;
using System.Threading;
using SixLabors.ImageSharp.Formats.Jpeg;
using SixLabors.ImageSharp.Formats.Jpeg.Components;
using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder;

Loading…
Cancel
Save