Skip to content

Commit

Permalink
Fix asserts on VP9 decoder in debug mode and build warnings (#1480)
Browse files Browse the repository at this point in the history
  • Loading branch information
gdkchan authored Aug 20, 2020
1 parent 5eb0ee3 commit 01ff648
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Ryujinx.Graphics.Nvdec.H264/Decoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace Ryujinx.Graphics.Nvdec.H264
{
public class Decoder : IH264Decoder
public sealed class Decoder : IH264Decoder
{
public bool IsHardwareAccelerated => false;

Expand Down
2 changes: 1 addition & 1 deletion Ryujinx.Graphics.Nvdec.Vp9/DecodeFrame.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ public static unsafe ArrayPtr<byte> DecodeTiles(ref Vp9Common cm, ArrayPtr<byte>
ref TileWorkerData tileData = ref cm.TileWorkerData[tileCols * tileRow + tileCol];
tileData.Xd = cm.Mb;
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.Xd.Tile.Init(ref cm, tileRow, tileCol);
SetupTokenDecoder(buf.Data, buf.Size, ref cm.Error, ref tileData.BitReader);
Expand Down
5 changes: 4 additions & 1 deletion Ryujinx.Graphics.Nvdec.Vp9/Decoder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace Ryujinx.Graphics.Nvdec.Vp9
{
public class Decoder : IVp9Decoder
public sealed class Decoder : IVp9Decoder
{
public bool IsHardwareAccelerated => false;

Expand Down Expand Up @@ -37,6 +37,8 @@ public unsafe bool Decode(

cm.Width = output.Width;
cm.Height = output.Height;
cm.SubsamplingX = 1;
cm.SubsamplingY = 1;

cm.UsePrevFrameMvs = pictureInfo.UsePrevInFindMvRefs;

Expand All @@ -48,6 +50,7 @@ public unsafe bool Decode(
cm.UvDcDeltaQ = pictureInfo.UvDcDeltaQ;

cm.Mb.Lossless = pictureInfo.Lossless;
cm.Mb.Bd = 8;

cm.TxMode = (TxMode)pictureInfo.TransformMode;

Expand Down
2 changes: 0 additions & 2 deletions Ryujinx.Graphics.Nvdec.Vp9/Types/Vp9Common.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ an extra row on top and column on the left to simplify prediction. */
public Ptr<Vp9EntropyProbs> Fc;
public Ptr<Vp9BackwardUpdates> Counts;

public bool FrameParallelDecodingMode;

public int Log2TileCols, Log2TileRows;

public ArrayPtr<sbyte> AboveSegContext;
Expand Down

0 comments on commit 01ff648

Please sign in to comment.