From 01ff648bdf46b85409d1a834987a69150de7adb9 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Thu, 20 Aug 2020 00:07:04 -0300 Subject: [PATCH] Fix asserts on VP9 decoder in debug mode and build warnings (#1480) --- Ryujinx.Graphics.Nvdec.H264/Decoder.cs | 2 +- Ryujinx.Graphics.Nvdec.Vp9/DecodeFrame.cs | 2 +- Ryujinx.Graphics.Nvdec.Vp9/Decoder.cs | 5 ++++- Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs | 2 -- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Ryujinx.Graphics.Nvdec.H264/Decoder.cs b/Ryujinx.Graphics.Nvdec.H264/Decoder.cs index 7a7e184a..6dbe5176 100644 --- a/Ryujinx.Graphics.Nvdec.H264/Decoder.cs +++ b/Ryujinx.Graphics.Nvdec.H264/Decoder.cs @@ -3,7 +3,7 @@ using System; namespace Ryujinx.Graphics.Nvdec.H264 { - public class Decoder : IH264Decoder + public sealed class Decoder : IH264Decoder { public bool IsHardwareAccelerated => false; diff --git a/Ryujinx.Graphics.Nvdec.Vp9/DecodeFrame.cs b/Ryujinx.Graphics.Nvdec.Vp9/DecodeFrame.cs index 81c187e1..012b0c60 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/DecodeFrame.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/DecodeFrame.cs @@ -1149,7 +1149,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9 ref TileWorkerData tileData = ref cm.TileWorkerData[tileCols * tileRow + tileCol]; tileData.Xd = cm.Mb; tileData.Xd.Corrupted = false; - tileData.Xd.Counts = cm.FrameParallelDecodingMode ? Ptr.Null : cm.Counts; + tileData.Xd.Counts = cm.Counts; tileData.Dqcoeff = new Array32>(); tileData.Xd.Tile.Init(ref cm, tileRow, tileCol); SetupTokenDecoder(buf.Data, buf.Size, ref cm.Error, ref tileData.BitReader); diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Decoder.cs b/Ryujinx.Graphics.Nvdec.Vp9/Decoder.cs index df3199cf..ff4221ac 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Decoder.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Decoder.cs @@ -7,7 +7,7 @@ using Vp9MvRef = Ryujinx.Graphics.Video.Vp9MvRef; namespace Ryujinx.Graphics.Nvdec.Vp9 { - public class Decoder : IVp9Decoder + public sealed class Decoder : IVp9Decoder { public bool IsHardwareAccelerated => false; @@ -37,6 +37,8 @@ namespace Ryujinx.Graphics.Nvdec.Vp9 cm.Width = output.Width; cm.Height = output.Height; + cm.SubsamplingX = 1; + cm.SubsamplingY = 1; cm.UsePrevFrameMvs = pictureInfo.UsePrevInFindMvRefs; @@ -48,6 +50,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9 cm.UvDcDeltaQ = pictureInfo.UvDcDeltaQ; cm.Mb.Lossless = pictureInfo.Lossless; + cm.Mb.Bd = 8; cm.TxMode = (TxMode)pictureInfo.TransformMode; diff --git a/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs b/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs index f33ea93f..4ca05954 100644 --- a/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs +++ b/Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs @@ -83,8 +83,6 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types public Ptr Fc; public Ptr Counts; - public bool FrameParallelDecodingMode; - public int Log2TileCols, Log2TileRows; public ArrayPtr AboveSegContext;