Browse Source

Fix build

pull/2633/head
Ynse Hoornenborg 2 years ago
parent
commit
a1a1a5a176
  1. 10
      src/ImageSharp/Formats/Heif/Av1/Av1BlockSize.cs
  2. 14
      src/ImageSharp/Formats/Heif/Av1/Av1BlockSizeExtensions.cs
  3. 15
      src/ImageSharp/Formats/Heif/Av1/Av1Decoder.cs

10
src/ImageSharp/Formats/Heif/Av1/Av1BlockSize.cs

@ -32,13 +32,3 @@ internal enum Av1BlockSize
BlockInvalid = 255,
BlockLargest = BlockSizeS - 1,
}
internal static class Av1BlockSizeExtensions
{
private static readonly int[] SizeWide = { 1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 1, 4, 2, 8, 4, 16 };
private static readonly int[] SizeHigh = { 1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16, 32, 16, 32, 4, 1, 8, 2, 16, 4 };
public static int Get4x4WideCount(this Av1BlockSize blockSize) => SizeWide[(int)blockSize];
public static int Get4x4HighCount(this Av1BlockSize blockSize) => SizeHigh[(int)blockSize];
}

14
src/ImageSharp/Formats/Heif/Av1/Av1BlockSizeExtensions.cs

@ -0,0 +1,14 @@
// Copyright (c) Six Labors.
// Licensed under the Six Labors Split License.
namespace SixLabors.ImageSharp.Formats.Heif.Av1;
internal static class Av1BlockSizeExtensions
{
private static readonly int[] SizeWide = { 1, 1, 2, 2, 2, 4, 4, 4, 8, 8, 8, 16, 16, 16, 32, 32, 1, 4, 2, 8, 4, 16 };
private static readonly int[] SizeHigh = { 1, 2, 1, 2, 4, 2, 4, 8, 4, 8, 16, 8, 16, 32, 16, 32, 4, 1, 8, 2, 16, 4 };
public static int Get4x4WideCount(this Av1BlockSize blockSize) => SizeWide[(int)blockSize];
public static int Get4x4HighCount(this Av1BlockSize blockSize) => SizeHigh[(int)blockSize];
}

15
src/ImageSharp/Formats/Heif/Av1/Av1Decoder.cs

@ -5,7 +5,7 @@ using SixLabors.ImageSharp.Formats.Heif.Av1.OpenBitstreamUnit;
namespace SixLabors.ImageSharp.Formats.Heif.Av1;
internal class Av1Decoder
internal class Av1Decoder : IAv1TileDecoder
{
public Av1Decoder()
{
@ -32,20 +32,19 @@ internal class Av1Decoder
ObuReader.Read(ref reader, buffer.Length, this, false);
}
internal void DecodeTile(ref Av1BitStreamReader reader, int tileNum)
public void DecodeTile(ref Av1BitStreamReader reader, int tileNum)
{
// TODO: Implement
}
internal void DecodeBlock(Av1BlockModeInfo blockMode, int rowIndex, int columnIndex)
public void FinishDecodeTiles(ref Av1BitStreamReader reader, bool doCdef, bool doLoopRestoration)
{
int block4x4Width = blockMode.BlockSize.Get4x4WideCount();
int block4x4Height = blockMode.BlockSize.Get4x4HighCount();
// TODO: Implement
}
internal void FinishDecodeTiles(ref Av1BitStreamReader reader, bool doCdef, bool doLoopRestoration)
private static void DecodeBlock(Av1BlockModeInfo blockMode, int rowIndex, int columnIndex)
{
// TODO: Implement
int block4x4Width = blockMode.BlockSize.Get4x4WideCount();
int block4x4Height = blockMode.BlockSize.Get4x4HighCount();
}
}

Loading…
Cancel
Save