PictureInfo.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. using Ryujinx.Common.Memory;
  2. using Ryujinx.Graphics.Video;
  3. namespace Ryujinx.Graphics.Nvdec.Types.Vp8
  4. {
  5. struct PictureInfo
  6. {
  7. #pragma warning disable CS0649
  8. public Array13<uint> Unknown0;
  9. public uint GpTimerTimeoutValue;
  10. public ushort FrameWidth;
  11. public ushort FrameHeight;
  12. public byte KeyFrame; // 1: key frame - 0: not
  13. public byte Version;
  14. public byte Flags0;
  15. // TileFormat : 2 // 0: TBL; 1: KBL;
  16. // GobHeight : 3 // Set GOB height, 0: GOB_2, 1: GOB_4, 2: GOB_8, 3: GOB_16, 4: GOB_32 (NVDEC3 onwards)
  17. // ReserverdSurfaceFormat : 3
  18. public byte ErrorConcealOn; // 1: error conceal on - 0: off
  19. public uint FirstPartSize; // the size of first partition (frame header and mb header partition)
  20. public uint HistBufferSize; // in units of 256
  21. public uint VLDBufferSize; // in units of 1
  22. public Array2<uint> FrameStride; // [y_c]
  23. public uint LumaTopOffset; // offset of luma top field in units of 256
  24. public uint LumaBotOffset; // offset of luma bottom field in units of 256
  25. public uint LumaFrameOffset; // offset of luma frame in units of 256
  26. public uint ChromaTopOffset; // offset of chroma top field in units of 256
  27. public uint ChromaBotOffset; // offset of chroma bottom field in units of 256
  28. public uint ChromaFrameOffset; // offset of chroma frame in units of 256
  29. public uint Flags1;
  30. // EnableTFOutput : 1; // =1, enable dbfdma to output the display surface; if disable, then the following configure on tf is useless.
  31. // Remap for VC1
  32. // VC1MapYFlag : 1
  33. // MapYValue : 3
  34. // VC1MapUVFlag : 1
  35. // MapUVValue : 3
  36. // TF
  37. // OutStride : 8
  38. // TilingFormat : 3;
  39. // OutputStructure : 1 // 0:frame, 1:field
  40. // Reserved0 : 11
  41. public Array2<int> OutputTop; // in units of 256
  42. public Array2<int> OutputBottom; // in units of 256
  43. // Histogram
  44. public uint Flags2;
  45. // EnableHistogram : 1 // enable histogram info collection
  46. // HistogramStartX : 12 // start X of Histogram window
  47. // HistogramStartY : 12 // start Y of Histogram window
  48. // Reserved1 : 7
  49. // HistogramEndX : 12 // end X of Histogram window
  50. // HistogramEndY : 12 // end y of Histogram window
  51. // Reserved2 : 8
  52. // Decode picture buffer related
  53. public sbyte CurrentOutputMemoryLayout;
  54. public Array3<sbyte> OutputMemoryLayout; // output NV12/NV24 setting. item 0:golden - 1: altref - 2: last
  55. public byte SegmentationFeatureDataUpdate;
  56. public Array3<byte> Reserved3;
  57. public uint ResultValue; // ucode return result
  58. public Array8<uint> PartitionOffset;
  59. public Array3<uint> Reserved4;
  60. #pragma warning restore CS0649
  61. public Vp8PictureInfo Convert()
  62. {
  63. return new Vp8PictureInfo()
  64. {
  65. KeyFrame = KeyFrame != 0,
  66. FirstPartSize = FirstPartSize,
  67. Version = Version,
  68. FrameWidth = FrameWidth,
  69. FrameHeight = FrameHeight
  70. };
  71. }
  72. }
  73. }