Move solution and projects to src

This commit is contained in:
TSR Berry 2023-04-08 01:22:00 +02:00 committed by Mary
parent cd124bda58
commit cee7121058
3466 changed files with 55 additions and 55 deletions

View file

@ -0,0 +1,26 @@
using Ryujinx.Graphics.Texture;
using Ryujinx.Graphics.Video;
using System;
namespace Ryujinx.Graphics.Nvdec.Image
{
static class SurfaceCommon
{
public static int GetBlockLinearSize(int width, int height, int bytesPerPixel)
{
return SizeCalculator.GetBlockLinearTextureSize(width, height, 1, 1, 1, 1, 1, bytesPerPixel, 2, 1, 1).TotalSize;
}
public static void Copy(ISurface src, ISurface dst)
{
src.YPlane.AsSpan().CopyTo(dst.YPlane.AsSpan());
src.UPlane.AsSpan().CopyTo(dst.UPlane.AsSpan());
src.VPlane.AsSpan().CopyTo(dst.VPlane.AsSpan());
}
public unsafe static Span<byte> AsSpan(this Plane plane)
{
return new Span<byte>((void*)plane.Pointer, plane.Length);
}
}
}