Fix asserts on VP9 decoder in debug mode and build warnings (#1480)

This commit is contained in:
gdkchan 2020-08-20 00:07:04 -03:00 committed by GitHub
parent 5eb0ee3cca
commit 01ff648bdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 5 deletions

View File

@ -3,7 +3,7 @@ using System;
namespace Ryujinx.Graphics.Nvdec.H264 namespace Ryujinx.Graphics.Nvdec.H264
{ {
public class Decoder : IH264Decoder public sealed class Decoder : IH264Decoder
{ {
public bool IsHardwareAccelerated => false; public bool IsHardwareAccelerated => false;

View File

@ -1149,7 +1149,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
ref TileWorkerData tileData = ref cm.TileWorkerData[tileCols * tileRow + tileCol]; ref TileWorkerData tileData = ref cm.TileWorkerData[tileCols * tileRow + tileCol];
tileData.Xd = cm.Mb; tileData.Xd = cm.Mb;
tileData.Xd.Corrupted = false; tileData.Xd.Corrupted = false;
tileData.Xd.Counts = cm.FrameParallelDecodingMode ? Ptr<Vp9BackwardUpdates>.Null : cm.Counts; tileData.Xd.Counts = cm.Counts;
tileData.Dqcoeff = new Array32<Array32<int>>(); tileData.Dqcoeff = new Array32<Array32<int>>();
tileData.Xd.Tile.Init(ref cm, tileRow, tileCol); tileData.Xd.Tile.Init(ref cm, tileRow, tileCol);
SetupTokenDecoder(buf.Data, buf.Size, ref cm.Error, ref tileData.BitReader); SetupTokenDecoder(buf.Data, buf.Size, ref cm.Error, ref tileData.BitReader);

View File

@ -7,7 +7,7 @@ using Vp9MvRef = Ryujinx.Graphics.Video.Vp9MvRef;
namespace Ryujinx.Graphics.Nvdec.Vp9 namespace Ryujinx.Graphics.Nvdec.Vp9
{ {
public class Decoder : IVp9Decoder public sealed class Decoder : IVp9Decoder
{ {
public bool IsHardwareAccelerated => false; public bool IsHardwareAccelerated => false;
@ -37,6 +37,8 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
cm.Width = output.Width; cm.Width = output.Width;
cm.Height = output.Height; cm.Height = output.Height;
cm.SubsamplingX = 1;
cm.SubsamplingY = 1;
cm.UsePrevFrameMvs = pictureInfo.UsePrevInFindMvRefs; cm.UsePrevFrameMvs = pictureInfo.UsePrevInFindMvRefs;
@ -48,6 +50,7 @@ namespace Ryujinx.Graphics.Nvdec.Vp9
cm.UvDcDeltaQ = pictureInfo.UvDcDeltaQ; cm.UvDcDeltaQ = pictureInfo.UvDcDeltaQ;
cm.Mb.Lossless = pictureInfo.Lossless; cm.Mb.Lossless = pictureInfo.Lossless;
cm.Mb.Bd = 8;
cm.TxMode = (TxMode)pictureInfo.TransformMode; cm.TxMode = (TxMode)pictureInfo.TransformMode;

View File

@ -83,8 +83,6 @@ namespace Ryujinx.Graphics.Nvdec.Vp9.Types
public Ptr<Vp9EntropyProbs> Fc; public Ptr<Vp9EntropyProbs> Fc;
public Ptr<Vp9BackwardUpdates> Counts; public Ptr<Vp9BackwardUpdates> Counts;
public bool FrameParallelDecodingMode;
public int Log2TileCols, Log2TileRows; public int Log2TileCols, Log2TileRows;
public ArrayPtr<sbyte> AboveSegContext; public ArrayPtr<sbyte> AboveSegContext;