From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001 From: TSR Berry <20988865+TSRBerry@users.noreply.github.com> Date: Sat, 8 Apr 2023 01:22:00 +0200 Subject: Move solution and projects to src --- Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs | 122 ------------------ .../Types/H264/ReferenceFrame.cs | 15 --- Ryujinx.Graphics.Nvdec/Types/Vp8/PictureInfo.cs | 75 ----------- .../Types/Vp9/BackwardUpdates.cs | 72 ----------- Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs | 141 --------------------- Ryujinx.Graphics.Nvdec/Types/Vp9/FrameFlags.cs | 12 -- Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs | 12 -- Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs | 21 --- Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs | 13 -- Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs | 87 ------------- Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs | 16 --- 11 files changed, 586 deletions(-) delete mode 100644 Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp8/PictureInfo.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/BackwardUpdates.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/FrameFlags.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs delete mode 100644 Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs (limited to 'Ryujinx.Graphics.Nvdec/Types') diff --git a/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs b/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs deleted file mode 100644 index 7c779dff..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/H264/PictureInfo.cs +++ /dev/null @@ -1,122 +0,0 @@ -using Ryujinx.Common.Memory; -using Ryujinx.Graphics.Video; - -namespace Ryujinx.Graphics.Nvdec.Types.H264 -{ - struct PictureInfo - { -#pragma warning disable CS0169, CS0649 - Array18 Unknown0; - public uint BitstreamSize; - public uint NumSlices; - public uint Unknown50; - public uint Unknown54; - public uint Log2MaxPicOrderCntLsbMinus4; - public uint DeltaPicOrderAlwaysZeroFlag; - public uint FrameMbsOnlyFlag; - public uint PicWidthInMbs; - public uint PicHeightInMbs; - public uint BlockLayout; // Not supported on T210 - public uint EntropyCodingModeFlag; - public uint PicOrderPresentFlag; - public uint NumRefIdxL0ActiveMinus1; - public uint NumRefIdxL1ActiveMinus1; - public uint DeblockingFilterControlPresentFlag; - public uint RedundantPicCntPresentFlag; - public uint Transform8x8ModeFlag; - public uint LumaPitch; - public uint ChromaPitch; - public uint LumaTopFieldOffset; - public uint LumaBottomFieldOffset; - public uint LumaFrameOffset; - public uint ChromaTopFieldOffset; - public uint ChromaBottomFieldOffset; - public uint ChromaFrameOffset; - public uint HistBufferSize; - public ulong Flags; - public Array2 FieldOrderCnt; - public Array16 RefFrames; - public Array6> ScalingLists4x4; - public Array2> ScalingLists8x8; - public byte MvcextNumInterViewRefsL0; - public byte MvcextNumInterViewRefsL1; - public ushort Padding2A2; - public uint Unknown2A4; - public uint Unknown2A8; - public uint Unknown2AC; - public Array16 MvcextViewRefMasksL0; - public Array16 MvcextViewRefMasksL1; - public uint Flags2; - public Array10 Unknown2D4; -#pragma warning restore CS0169, CS0649 - - public bool MbAdaptiveFrameFieldFlag => (Flags & (1 << 0)) != 0; - public bool Direct8x8InferenceFlag => (Flags & (1 << 1)) != 0; - public bool WeightedPredFlag => (Flags & (1 << 2)) != 0; - public bool ConstrainedIntraPredFlag => (Flags & (1 << 3)) != 0; - public bool IsReference => (Flags & (1 << 4)) != 0; - public bool FieldPicFlag => (Flags & (1 << 5)) != 0; - public bool BottomFieldFlag => (Flags & (1 << 6)) != 0; - public uint Log2MaxFrameNumMinus4 => (uint)(Flags >> 8) & 0xf; - public ushort ChromaFormatIdc => (ushort)((Flags >> 12) & 3); - public uint PicOrderCntType => (uint)(Flags >> 14) & 3; - public int PicInitQpMinus26 => ExtractSx(Flags, 16, 6); - public int ChromaQpIndexOffset => ExtractSx(Flags, 22, 5); - public int SecondChromaQpIndexOffset => ExtractSx(Flags, 27, 5); - public uint WeightedBipredIdc => (uint)(Flags >> 32) & 3; - public uint OutputSurfaceIndex => (uint)(Flags >> 34) & 0x7f; - public uint ColIndex => (uint)(Flags >> 41) & 0x1f; - public ushort FrameNum => (ushort)(Flags >> 46); - public bool QpprimeYZeroTransformBypassFlag => (Flags2 & (1 << 1)) != 0; - - private static int ExtractSx(ulong packed, int lsb, int length) - { - return (int)((long)packed << (64 - (lsb + length)) >> (64 - length)); - } - - public H264PictureInfo Convert() - { - return new H264PictureInfo() - { - FieldOrderCnt = FieldOrderCnt, - IsReference = IsReference, - ChromaFormatIdc = ChromaFormatIdc, - FrameNum = FrameNum, - FieldPicFlag = FieldPicFlag, - BottomFieldFlag = BottomFieldFlag, - NumRefFrames = 0, - MbAdaptiveFrameFieldFlag = MbAdaptiveFrameFieldFlag, - ConstrainedIntraPredFlag = ConstrainedIntraPredFlag, - WeightedPredFlag = WeightedPredFlag, - WeightedBipredIdc = WeightedBipredIdc, - FrameMbsOnlyFlag = FrameMbsOnlyFlag != 0, - Transform8x8ModeFlag = Transform8x8ModeFlag != 0, - ChromaQpIndexOffset = ChromaQpIndexOffset, - SecondChromaQpIndexOffset = SecondChromaQpIndexOffset, - PicInitQpMinus26 = PicInitQpMinus26, - NumRefIdxL0ActiveMinus1 = NumRefIdxL0ActiveMinus1, - NumRefIdxL1ActiveMinus1 = NumRefIdxL1ActiveMinus1, - Log2MaxFrameNumMinus4 = Log2MaxFrameNumMinus4, - PicOrderCntType = PicOrderCntType, - Log2MaxPicOrderCntLsbMinus4 = Log2MaxPicOrderCntLsbMinus4, - DeltaPicOrderAlwaysZeroFlag = DeltaPicOrderAlwaysZeroFlag != 0, - Direct8x8InferenceFlag = Direct8x8InferenceFlag, - EntropyCodingModeFlag = EntropyCodingModeFlag != 0, - PicOrderPresentFlag = PicOrderPresentFlag != 0, - DeblockingFilterControlPresentFlag = DeblockingFilterControlPresentFlag != 0, - RedundantPicCntPresentFlag = RedundantPicCntPresentFlag != 0, - NumSliceGroupsMinus1 = 0, - SliceGroupMapType = 0, - SliceGroupChangeRateMinus1 = 0, - FmoAsoEnable = false, - ScalingMatrixPresent = true, - ScalingLists4x4 = ScalingLists4x4, - ScalingLists8x8 = ScalingLists8x8, - FrameType = 0, - PicWidthInMbsMinus1 = PicWidthInMbs - 1, - PicHeightInMapUnitsMinus1 = (PicHeightInMbs >> (FrameMbsOnlyFlag != 0 ? 0 : 1)) - 1, - QpprimeYZeroTransformBypassFlag = QpprimeYZeroTransformBypassFlag - }; - } - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs b/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs deleted file mode 100644 index d205a47a..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/H264/ReferenceFrame.cs +++ /dev/null @@ -1,15 +0,0 @@ -using Ryujinx.Common.Memory; - -namespace Ryujinx.Graphics.Nvdec.Types.H264 -{ - struct ReferenceFrame - { -#pragma warning disable CS0649 - public uint Flags; - public Array2 FieldOrderCnt; - public uint FrameNum; -#pragma warning restore CS0649 - - public uint OutputSurfaceIndex => (uint)Flags & 0x7f; - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp8/PictureInfo.cs b/Ryujinx.Graphics.Nvdec/Types/Vp8/PictureInfo.cs deleted file mode 100644 index 844f2103..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp8/PictureInfo.cs +++ /dev/null @@ -1,75 +0,0 @@ -using Ryujinx.Common.Memory; -using Ryujinx.Graphics.Video; - -namespace Ryujinx.Graphics.Nvdec.Types.Vp8 -{ - struct PictureInfo - { -#pragma warning disable CS0649 - public Array13 Unknown0; - public uint GpTimerTimeoutValue; - public ushort FrameWidth; - public ushort FrameHeight; - public byte KeyFrame; // 1: key frame - 0: not - public byte Version; - public byte Flags0; - // TileFormat : 2 // 0: TBL; 1: KBL; - // GobHeight : 3 // Set GOB height, 0: GOB_2, 1: GOB_4, 2: GOB_8, 3: GOB_16, 4: GOB_32 (NVDEC3 onwards) - // ReserverdSurfaceFormat : 3 - public byte ErrorConcealOn; // 1: error conceal on - 0: off - public uint FirstPartSize; // the size of first partition (frame header and mb header partition) - public uint HistBufferSize; // in units of 256 - public uint VLDBufferSize; // in units of 1 - public Array2 FrameStride; // [y_c] - public uint LumaTopOffset; // offset of luma top field in units of 256 - public uint LumaBotOffset; // offset of luma bottom field in units of 256 - public uint LumaFrameOffset; // offset of luma frame in units of 256 - public uint ChromaTopOffset; // offset of chroma top field in units of 256 - public uint ChromaBotOffset; // offset of chroma bottom field in units of 256 - public uint ChromaFrameOffset; // offset of chroma frame in units of 256 - public uint Flags1; - // EnableTFOutput : 1; // =1, enable dbfdma to output the display surface; if disable, then the following configure on tf is useless. - // Remap for VC1 - // VC1MapYFlag : 1 - // MapYValue : 3 - // VC1MapUVFlag : 1 - // MapUVValue : 3 - // TF - // OutStride : 8 - // TilingFormat : 3; - // OutputStructure : 1 // 0:frame, 1:field - // Reserved0 : 11 - public Array2 OutputTop; // in units of 256 - public Array2 OutputBottom; // in units of 256 - // Histogram - public uint Flags2; - // EnableHistogram : 1 // enable histogram info collection - // HistogramStartX : 12 // start X of Histogram window - // HistogramStartY : 12 // start Y of Histogram window - // Reserved1 : 7 - // HistogramEndX : 12 // end X of Histogram window - // HistogramEndY : 12 // end y of Histogram window - // Reserved2 : 8 - // Decode picture buffer related - public sbyte CurrentOutputMemoryLayout; - public Array3 OutputMemoryLayout; // output NV12/NV24 setting. item 0:golden - 1: altref - 2: last - public byte SegmentationFeatureDataUpdate; - public Array3 Reserved3; - public uint ResultValue; // ucode return result - public Array8 PartitionOffset; - public Array3 Reserved4; -#pragma warning restore CS0649 - - public Vp8PictureInfo Convert() - { - return new Vp8PictureInfo() - { - KeyFrame = KeyFrame != 0, - FirstPartSize = FirstPartSize, - Version = Version, - FrameWidth = FrameWidth, - FrameHeight = FrameHeight - }; - } - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/BackwardUpdates.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/BackwardUpdates.cs deleted file mode 100644 index 661e6cdd..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/BackwardUpdates.cs +++ /dev/null @@ -1,72 +0,0 @@ -using Ryujinx.Common.Memory; -using Ryujinx.Graphics.Video; - -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct BackwardUpdates - { - public Array7>> InterModeCounts; - public Array4> YModeCounts; - public Array10> UvModeCounts; - public Array16> PartitionCounts; - public Array4> SwitchableInterpsCount; - public Array4> IntraInterCount; - public Array5> CompInterCount; - public Array5>> SingleRefCount; - public Array5> CompRefCount; - public Array2> Tx32x32; - public Array2> Tx16x16; - public Array2> Tx8x8; - public Array3> MbSkipCount; - public Array4 Joints; - public Array2> Sign; - public Array2> Classes; - public Array2> Class0; - public Array2>> Bits; - public Array2>> Class0Fp; - public Array2> Fp; - public Array2> Class0Hp; - public Array2> Hp; - public Array4>>>>> CoefCounts; - public Array4>>>> EobCounts; - - public BackwardUpdates(ref Vp9BackwardUpdates counts) - { - InterModeCounts = new Array7>>(); - - for (int i = 0; i < 7; i++) - { - InterModeCounts[i][0][0] = counts.InterMode[i][2]; - InterModeCounts[i][0][1] = counts.InterMode[i][0] + counts.InterMode[i][1] + counts.InterMode[i][3]; - InterModeCounts[i][1][0] = counts.InterMode[i][0]; - InterModeCounts[i][1][1] = counts.InterMode[i][1] + counts.InterMode[i][3]; - InterModeCounts[i][2][0] = counts.InterMode[i][1]; - InterModeCounts[i][2][1] = counts.InterMode[i][3]; - } - - YModeCounts = counts.YMode; - UvModeCounts = counts.UvMode; - PartitionCounts = counts.Partition; - SwitchableInterpsCount = counts.SwitchableInterp; - IntraInterCount = counts.IntraInter; - CompInterCount = counts.CompInter; - SingleRefCount = counts.SingleRef; - CompRefCount = counts.CompRef; - Tx32x32 = counts.Tx32x32; - Tx16x16 = counts.Tx16x16; - Tx8x8 = counts.Tx8x8; - MbSkipCount = counts.Skip; - Joints = counts.Joints; - Sign = counts.Sign; - Classes = counts.Classes; - Class0 = counts.Class0; - Bits = counts.Bits; - Class0Fp = counts.Class0Fp; - Fp = counts.Fp; - Class0Hp = counts.Class0Hp; - Hp = counts.Hp; - CoefCounts = counts.Coef; - EobCounts = counts.EobBranch; - } - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs deleted file mode 100644 index b2858d2d..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/EntropyProbs.cs +++ /dev/null @@ -1,141 +0,0 @@ -using Ryujinx.Common.Memory; -using Ryujinx.Graphics.Video; - -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct EntropyProbs - { -#pragma warning disable CS0649 - public Array10>> KfYModeProbE0ToE7; - public Array10> KfYModeProbE8; - public Array3 Padding384; - public Array7 SegTreeProbs; - public Array3 SegPredProbs; - public Array15 Padding391; - public Array10> KfUvModeProbE0ToE7; - public Array10 KfUvModeProbE8; - public Array6 Padding3FA; - public Array7> InterModeProb; - public Array4 IntraInterProb; - public Array10> UvModeProbE0ToE7; - public Array2> Tx8x8Prob; - public Array2> Tx16x16Prob; - public Array2> Tx32x32Prob; - public Array4 YModeProbE8; - public Array4> YModeProbE0ToE7; - public Array16> KfPartitionProb; - public Array16> PartitionProb; - public Array10 UvModeProbE8; - public Array4> SwitchableInterpProb; - public Array5 CompInterProb; - public Array4 SkipProbs; - public Array3 Joints; - public Array2 Sign; - public Array2> Class0; - public Array2> Fp; - public Array2 Class0Hp; - public Array2 Hp; - public Array2> Classes; - public Array2>> Class0Fp; - public Array2> Bits; - public Array5> SingleRefProb; - public Array5 CompRefProb; - public Array17 Padding58F; - public Array4>>>>> CoefProbs; -#pragma warning restore CS0649 - - public void Convert(ref Vp9EntropyProbs fc) - { - for (int i = 0; i < 10; i++) - { - for (int j = 0; j < 10; j++) - { - for (int k = 0; k < 9; k++) - { - fc.KfYModeProb[i][j][k] = k < 8 ? KfYModeProbE0ToE7[i][j][k] : KfYModeProbE8[i][j]; - } - } - } - - fc.SegTreeProb = SegTreeProbs; - fc.SegPredProb = SegPredProbs; - - for (int i = 0; i < 7; i++) - { - for (int j = 0; j < 3; j++) - { - fc.InterModeProb[i][j] = InterModeProb[i][j]; - } - } - - fc.IntraInterProb = IntraInterProb; - - for (int i = 0; i < 10; i++) - { - for (int j = 0; j < 9; j++) - { - fc.KfUvModeProb[i][j] = j < 8 ? KfUvModeProbE0ToE7[i][j] : KfUvModeProbE8[i]; - fc.UvModeProb[i][j] = j < 8 ? UvModeProbE0ToE7[i][j] : UvModeProbE8[i]; - } - } - - fc.Tx8x8Prob = Tx8x8Prob; - fc.Tx16x16Prob = Tx16x16Prob; - fc.Tx32x32Prob = Tx32x32Prob; - - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 9; j++) - { - fc.YModeProb[i][j] = j < 8 ? YModeProbE0ToE7[i][j] : YModeProbE8[i]; - } - } - - for (int i = 0; i < 16; i++) - { - for (int j = 0; j < 3; j++) - { - fc.KfPartitionProb[i][j] = KfPartitionProb[i][j]; - fc.PartitionProb[i][j] = PartitionProb[i][j]; - } - } - - fc.SwitchableInterpProb = SwitchableInterpProb; - fc.CompInterProb = CompInterProb; - fc.SkipProb[0] = SkipProbs[0]; - fc.SkipProb[1] = SkipProbs[1]; - fc.SkipProb[2] = SkipProbs[2]; - fc.Joints = Joints; - fc.Sign = Sign; - fc.Class0 = Class0; - fc.Fp = Fp; - fc.Class0Hp = Class0Hp; - fc.Hp = Hp; - fc.Classes = Classes; - fc.Class0Fp = Class0Fp; - fc.Bits = Bits; - fc.SingleRefProb = SingleRefProb; - fc.CompRefProb = CompRefProb; - - for (int i = 0; i < 4; i++) - { - for (int j = 0; j < 2; j++) - { - for (int k = 0; k < 2; k++) - { - for (int l = 0; l < 6; l++) - { - for (int m = 0; m < 6; m++) - { - for (int n = 0; n < 3; n++) - { - fc.CoefProbs[i][j][k][l][m][n] = CoefProbs[i][j][k][l][m][n]; - } - } - } - } - } - } - } - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameFlags.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameFlags.cs deleted file mode 100644 index 88f1ac20..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameFlags.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - enum FrameFlags : uint - { - IsKeyFrame = 1 << 0, - LastFrameIsKeyFrame = 1 << 1, - FrameSizeChanged = 1 << 2, - ErrorResilientMode = 1 << 3, - LastShowFrame = 1 << 4, - IntraOnly = 1 << 5 - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs deleted file mode 100644 index d449ec4d..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameSize.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct FrameSize - { -#pragma warning disable CS0649 - public ushort Width; - public ushort Height; - public ushort LumaPitch; - public ushort ChromaPitch; -#pragma warning restore CS0649 - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs deleted file mode 100644 index 26aab506..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/FrameStats.cs +++ /dev/null @@ -1,21 +0,0 @@ -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct FrameStats - { -#pragma warning disable CS0649 - public uint Unknown0; - public uint Unknown4; - public uint Pass2CycleCount; - public uint ErrorStatus; - public uint FrameStatusIntraCnt; - public uint FrameStatusInterCnt; - public uint FrameStatusSkipCtuCount; - public uint FrameStatusFwdMvxCnt; - public uint FrameStatusFwdMvyCnt; - public uint FrameStatusBwdMvxCnt; - public uint FrameStatusBwdMvyCnt; - public uint ErrorCtbPos; - public uint ErrorSlicePos; -#pragma warning restore CS0649 - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs deleted file mode 100644 index 7cb0fd7a..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/LoopFilter.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Ryujinx.Common.Memory; - -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct LoopFilter - { -#pragma warning disable CS0649 - public byte ModeRefDeltaEnabled; - public Array4 RefDeltas; - public Array2 ModeDeltas; -#pragma warning restore CS0649 - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs deleted file mode 100644 index 7d06f747..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/PictureInfo.cs +++ /dev/null @@ -1,87 +0,0 @@ -using Ryujinx.Common.Memory; -using Ryujinx.Graphics.Video; - -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct PictureInfo - { -#pragma warning disable CS0649 - public Array12 Unknown0; - public uint BitstreamSize; - public uint IsEncrypted; - public uint Unknown38; - public uint Reserved3C; - public uint BlockLayout; // Not supported on T210 - public uint WorkBufferSizeShr8; - public FrameSize LastFrameSize; - public FrameSize GoldenFrameSize; - public FrameSize AltFrameSize; - public FrameSize CurrentFrameSize; - public FrameFlags Flags; - public Array4 RefFrameSignBias; - public byte FirstLevel; - public byte SharpnessLevel; - public byte BaseQIndex; - public byte YDcDeltaQ; - public byte UvAcDeltaQ; - public byte UvDcDeltaQ; - public byte Lossless; - public byte TxMode; - public byte AllowHighPrecisionMv; - public byte InterpFilter; - public byte ReferenceMode; - public sbyte CompFixedRef; - public Array2 CompVarRef; - public byte Log2TileCols; - public byte Log2TileRows; - public Segmentation Seg; - public LoopFilter Lf; - public byte PaddingEB; - public uint WorkBufferSizeShr8New; // Not supported on T210 - public uint SurfaceParams; // Not supported on T210 - public uint UnknownF4; - public uint UnknownF8; - public uint UnknownFC; -#pragma warning restore CS0649 - - public uint BitDepth => (SurfaceParams >> 1) & 0xf; - - public Vp9PictureInfo Convert() - { - return new Vp9PictureInfo() - { - IsKeyFrame = Flags.HasFlag(FrameFlags.IsKeyFrame), - IntraOnly = Flags.HasFlag(FrameFlags.IntraOnly), - UsePrevInFindMvRefs = - !Flags.HasFlag(FrameFlags.ErrorResilientMode) && - !Flags.HasFlag(FrameFlags.FrameSizeChanged) && - !Flags.HasFlag(FrameFlags.IntraOnly) && - Flags.HasFlag(FrameFlags.LastShowFrame) && - !Flags.HasFlag(FrameFlags.LastFrameIsKeyFrame), - RefFrameSignBias = RefFrameSignBias, - BaseQIndex = BaseQIndex, - YDcDeltaQ = YDcDeltaQ, - UvDcDeltaQ = UvDcDeltaQ, - UvAcDeltaQ = UvAcDeltaQ, - Lossless = Lossless != 0, - TransformMode = TxMode, - AllowHighPrecisionMv = AllowHighPrecisionMv != 0, - InterpFilter = InterpFilter, - ReferenceMode = ReferenceMode, - CompFixedRef = CompFixedRef, - CompVarRef = CompVarRef, - Log2TileCols = Log2TileCols, - Log2TileRows = Log2TileRows, - SegmentEnabled = Seg.Enabled != 0, - SegmentMapUpdate = Seg.UpdateMap != 0, - SegmentMapTemporalUpdate = Seg.TemporalUpdate != 0, - SegmentAbsDelta = Seg.AbsDelta, - SegmentFeatureEnable = Seg.FeatureMask, - SegmentFeatureData = Seg.FeatureData, - ModeRefDeltaEnabled = Lf.ModeRefDeltaEnabled != 0, - RefDeltas = Lf.RefDeltas, - ModeDeltas = Lf.ModeDeltas - }; - } - } -} diff --git a/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs b/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs deleted file mode 100644 index f6c4f0b1..00000000 --- a/Ryujinx.Graphics.Nvdec/Types/Vp9/Segmentation.cs +++ /dev/null @@ -1,16 +0,0 @@ -using Ryujinx.Common.Memory; - -namespace Ryujinx.Graphics.Nvdec.Types.Vp9 -{ - struct Segmentation - { -#pragma warning disable CS0649 - public byte Enabled; - public byte UpdateMap; - public byte TemporalUpdate; - public byte AbsDelta; - public Array8 FeatureMask; - public Array8> FeatureData; -#pragma warning restore CS0649 - } -} -- cgit v1.2.3