diff --git a/src/ImageSharp/Formats/WebP/Lossy/Vp8Encoder.cs b/src/ImageSharp/Formats/WebP/Lossy/Vp8Encoder.cs index ed18bc6700..e60f5fdc1a 100644 --- a/src/ImageSharp/Formats/WebP/Lossy/Vp8Encoder.cs +++ b/src/ImageSharp/Formats/WebP/Lossy/Vp8Encoder.cs @@ -400,9 +400,14 @@ namespace SixLabors.ImageSharp.Formats.WebP.Lossy it.InitFilter(); do { + bool dontUseSkip = !this.Proba.UseSkipProba; + var info = new Vp8ModeScore(); it.Import(y, u, v, yStride, uvStride, width, height, false); - if (!this.Decimate(it, info, this.rdOptLevel)) + + // Warning! order is important: first call VP8Decimate() and + // *then* decide how to code the skip decision if there's one. + if (!this.Decimate(it, info, this.rdOptLevel) || dontUseSkip) { this.CodeResiduals(it, info); } diff --git a/src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlockInfo.cs b/src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlockInfo.cs index 294e548e84..e8cee31bf8 100644 --- a/src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlockInfo.cs +++ b/src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlockInfo.cs @@ -1,8 +1,11 @@ // Copyright (c) Six Labors. // Licensed under the Apache License, Version 2.0. +using System.Diagnostics; + namespace SixLabors.ImageSharp.Formats.WebP.Lossy { + [DebuggerDisplay("Type: {MacroBlockType}, Alpha: {Alpha}, UvMode: {UvMode}")] internal class Vp8MacroBlockInfo { public Vp8MacroBlockType MacroBlockType { get; set; }