Improvements with new .NET 5 functions or bugfixes (#1714)

* Improvements with new .NET 5 functions or bugfixes

* This no longer needs to be unsafe
This commit is contained in:
gdkchan 2020-11-18 15:28:40 -03:00 committed by GitHub
parent 7c3b559830
commit eafee34fee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 41 deletions

View file

@ -374,11 +374,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
} while (--bH != 0);
}
[StructLayout(LayoutKind.Sequential, Size = 80 * 2 * 80 * 2)]
struct McBufHigh
{
}
[SkipLocalsInit]
private static unsafe void ExtendAndPredict(
byte* bufPtr1,
int preBufStride,
@ -402,8 +398,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
int xs,
int ys)
{
McBufHigh mcBufHighStruct;
ushort* mcBufHigh = (ushort*)Unsafe.AsPointer(ref mcBufHighStruct); // Avoid zero initialization.
ushort* mcBufHigh = stackalloc ushort[80 * 2 * 80 * 2];
if (xd.CurBuf.HighBd)
{
HighBuildMcBorder(bufPtr1, preBufStride, mcBufHigh, bW, x0, y0, bW, bH, frameWidth, frameHeight);