diff --git a/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs index 3a6eb4f8bf..85f30d28d7 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/DCTTests.cs @@ -52,16 +52,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg // Part of the IDCT calculations is fused into the quantization step // We must multiply input block with adjusted no-quantization matrix // before applying IDCT + // Dequantization using unit matrix - no values are upscaled Block8x8F dequantMatrix = CreateBlockFromScalar(1); - // Dequantization using unit matrix - no values are upscaled - // as quant matrix is all 1's // This step is needed to apply adjusting multipliers to the input block FastFloatingPointDCT.AdjustToIDCT(ref dequantMatrix); - srcBlock.MultiplyInPlace(ref dequantMatrix); // IDCT implementation tranforms blocks after transposition srcBlock.TransposeInplace(); + srcBlock.MultiplyInPlace(ref dequantMatrix); // IDCT calculation FastFloatingPointDCT.TransformIDCT(ref srcBlock); @@ -86,16 +85,15 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg // Part of the IDCT calculations is fused into the quantization step // We must multiply input block with adjusted no-quantization matrix // before applying IDCT + // Dequantization using unit matrix - no values are upscaled Block8x8F dequantMatrix = CreateBlockFromScalar(1); - // Dequantization using unit matrix - no values are upscaled - // as quant matrix is all 1's // This step is needed to apply adjusting multipliers to the input block FastFloatingPointDCT.AdjustToIDCT(ref dequantMatrix); - srcBlock.MultiplyInPlace(ref dequantMatrix); // IDCT implementation tranforms blocks after transposition srcBlock.TransposeInplace(); + srcBlock.MultiplyInPlace(ref dequantMatrix); // IDCT calculation FastFloatingPointDCT.TransformIDCT(ref srcBlock); diff --git a/tests/ImageSharp.Tests/Formats/Jpg/Utils/JpegFixture.cs b/tests/ImageSharp.Tests/Formats/Jpg/Utils/JpegFixture.cs index a76b2bf2ef..1bdfc6ecad 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/Utils/JpegFixture.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/Utils/JpegFixture.cs @@ -172,7 +172,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg.Utils bool failed = false; - for (int i = 0; i < 64; i++) + for (int i = 0; i < Block8x8F.Size; i++) { float expected = a[i]; float actual = b[i];