-
-
Notifications
You must be signed in to change notification settings - Fork 852
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Using Binary serialization for Vp8Residual
- Loading branch information
1 parent
25e6f6e
commit 39f8c77
Showing
10 changed files
with
20 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Six Labors Split License. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace SixLabors.ImageSharp.Formats.Webp.Lossy; | ||
|
||
[Serializable] | ||
internal class Vp8CostArray | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Vp8CostArray"/> class. | ||
/// </summary> | ||
public Vp8CostArray() => this.Costs = new ushort[67 + 1]; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Vp8CostArray"/> class. | ||
/// Only used for unit tests. | ||
/// </summary> | ||
[JsonConstructor] | ||
public Vp8CostArray(ushort[] costs) => this.Costs = costs; | ||
|
||
public ushort[] Costs { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,15 @@ | ||
// Copyright (c) Six Labors. | ||
// Licensed under the Six Labors Split License. | ||
|
||
using System.Text.Json.Serialization; | ||
|
||
namespace SixLabors.ImageSharp.Formats.Webp.Lossy; | ||
|
||
[Serializable] | ||
internal class Vp8StatsArray | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Vp8StatsArray"/> class. | ||
/// </summary> | ||
public Vp8StatsArray() => this.Stats = new uint[WebpConstants.NumProbas]; | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="Vp8StatsArray"/> class. | ||
/// Only used for unit tests. | ||
/// </summary> | ||
[JsonConstructor] | ||
public Vp8StatsArray(uint[] stats) => this.Stats = stats; | ||
|
||
public uint[] Stats { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.