mirror of https://github.com/SixLabors/ImageSharp
8 changed files with 232 additions and 0 deletions
@ -0,0 +1,31 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
/// <summary>
|
|||
/// Filter information.
|
|||
/// </summary>
|
|||
internal class Vp8FilterInfo |
|||
{ |
|||
/// <summary>
|
|||
/// Gets or sets the filter limit in [3..189], or 0 if no filtering.
|
|||
/// </summary>
|
|||
public sbyte Limit { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the inner limit in [1..63].
|
|||
/// </summary>
|
|||
public sbyte InnerLevel { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets a value indicating whether to do inner filtering.
|
|||
/// </summary>
|
|||
public bool InnerFiltering { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the high edge variance threshold in [0..2].
|
|||
/// </summary>
|
|||
public sbyte HighEdgeVarianceThreshold { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,26 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
/// <summary>
|
|||
/// Vp8 frame header information.
|
|||
/// </summary>
|
|||
internal class Vp8FrameHeader |
|||
{ |
|||
/// <summary>
|
|||
/// Gets or sets a value indicating whether this is a key frame.
|
|||
/// </summary>
|
|||
public bool KeyFrame { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets Vp8 profile [0..3].
|
|||
/// </summary>
|
|||
public sbyte Profile { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the partition length.
|
|||
/// </summary>
|
|||
public uint PartitionLength { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,21 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
/// <summary>
|
|||
/// Info about a macro block.
|
|||
/// </summary>
|
|||
internal class Vp8MacroBlock |
|||
{ |
|||
/// <summary>
|
|||
/// Gets or sets non-zero AC/DC coeffs (4bit for luma + 4bit for chroma).
|
|||
/// </summary>
|
|||
public uint NoneZeroAcDcCoeffs { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets non-zero DC coeff (1bit).
|
|||
/// </summary>
|
|||
public uint NoneZeroDcCoeffs { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,44 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
/// <summary>
|
|||
/// Data needed to reconstruct a macroblock.
|
|||
/// </summary>
|
|||
internal class Vp8MacroBlockData |
|||
{ |
|||
/// <summary>
|
|||
/// Gets or sets the coefficient. 384 coeffs = (16+4+4) * 4*4.
|
|||
/// </summary>
|
|||
public short Coeffs { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets a value indicating whether its intra4x4.
|
|||
/// </summary>
|
|||
public bool IsI4x4 { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the modes. One 16x16 mode (#0) or sixteen 4x4 modes.
|
|||
/// </summary>
|
|||
public byte Modes { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the chroma prediction mode.
|
|||
/// </summary>
|
|||
public byte UvMode { get; set; } |
|||
|
|||
public uint NonZeroY { get; set; } |
|||
|
|||
public uint NonZeroUv { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the local dithering strength (deduced from NonZero_*).
|
|||
/// </summary>
|
|||
public byte Dither { get; set; } |
|||
|
|||
public byte Skip { get; set; } |
|||
|
|||
public byte Segment { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,38 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
internal class Vp8PictureHeader |
|||
{ |
|||
/// <summary>
|
|||
/// Gets or sets the width of the image.
|
|||
/// </summary>
|
|||
public uint Width { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the Height of the image.
|
|||
/// </summary>
|
|||
public uint Height { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the horizontal scale.
|
|||
/// </summary>
|
|||
public sbyte XScale { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the vertical scale.
|
|||
/// </summary>
|
|||
public sbyte YScale { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the colorspace. 0 = YCbCr.
|
|||
/// </summary>
|
|||
public sbyte ColorSpace { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the clamp type.
|
|||
/// </summary>
|
|||
public sbyte ClampType { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,24 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
internal class Vp8QuantMatrix |
|||
{ |
|||
public int[] Y1Mat { get; set; } |
|||
|
|||
public int[] Y2Mat { get; set; } |
|||
|
|||
public int[] UVMat { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the U/V quantizer value.
|
|||
/// </summary>
|
|||
public int UvQuant { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the dithering amplitude (0 = off, max=255).
|
|||
/// </summary>
|
|||
public int Dither { get; set; } |
|||
} |
|||
} |
|||
@ -0,0 +1,33 @@ |
|||
// Copyright (c) Six Labors and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
|
|||
namespace SixLabors.ImageSharp.Formats.WebP |
|||
{ |
|||
/// <summary>
|
|||
/// Segment features.
|
|||
/// </summary>
|
|||
internal class Vp8SegmentHeader |
|||
{ |
|||
public bool UseSegment { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets a value indicating whether to update the segment map or not.
|
|||
/// </summary>
|
|||
public bool UpdateMap { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the absolute or delta values for quantizer and filter.
|
|||
/// </summary>
|
|||
public int AbsoluteOrDelta { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets quantization changes.
|
|||
/// </summary>
|
|||
public byte[] Quantizer { get; set; } |
|||
|
|||
/// <summary>
|
|||
/// Gets or sets the filter strength for segments.
|
|||
/// </summary>
|
|||
public byte[] FilterStrength { get; set; } |
|||
} |
|||
} |
|||
Loading…
Reference in new issue