diff options
author | gdkchan <gab.dark.100@gmail.com> | 2022-03-23 17:09:32 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-23 17:09:32 -0300 |
commit | 1402d8391d84f912110104e3e6c1a50a8c000d59 (patch) | |
tree | 20c22eb021a92d0256c45ba676d05a7504460bfa /Ryujinx.Graphics.Nvdec/H264Decoder.cs | |
parent | e3b36db71c62a34a26b30683dd5ad5410c97cc9c (diff) |
Support NVDEC H264 interlaced video decoding and VIC deinterlacing (#3225)1.1.84
* Support NVDEC H264 interlaced video decoding and VIC deinterlacing
* Remove unused code
Diffstat (limited to 'Ryujinx.Graphics.Nvdec/H264Decoder.cs')
-rw-r--r-- | Ryujinx.Graphics.Nvdec/H264Decoder.cs | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Nvdec/H264Decoder.cs b/Ryujinx.Graphics.Nvdec/H264Decoder.cs index 69eeb494..6efeb899 100644 --- a/Ryujinx.Graphics.Nvdec/H264Decoder.cs +++ b/Ryujinx.Graphics.Nvdec/H264Decoder.cs @@ -31,7 +31,24 @@ namespace Ryujinx.Graphics.Nvdec if (decoder.Decode(ref info, outputSurface, bitstream)) { - SurfaceWriter.Write(rm.Gmm, outputSurface, lumaOffset, chromaOffset); + if (outputSurface.Field == FrameField.Progressive) + { + SurfaceWriter.Write( + rm.Gmm, + outputSurface, + lumaOffset + pictureInfo.LumaFrameOffset, + chromaOffset + pictureInfo.ChromaFrameOffset); + } + else + { + SurfaceWriter.WriteInterlaced( + rm.Gmm, + outputSurface, + lumaOffset + pictureInfo.LumaTopFieldOffset, + chromaOffset + pictureInfo.ChromaTopFieldOffset, + lumaOffset + pictureInfo.LumaBottomFieldOffset, + chromaOffset + pictureInfo.ChromaBottomFieldOffset); + } } rm.Cache.Put(outputSurface); |