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]; } } } } } } } } }