Ryujinx/src/Ryujinx.Graphics.Nvdec
Keaton f91cd05260
Implement VP9 loop filtering (#550)
Unmerged PR from OG Ryujinx (#4367). From @gdkchan:

> The main goal of this change is porting the loop filtering from
libvpx, which should fix the block artifacts on some VP9 videos on games
using NVDEC to decode them. In addition to that, there are two other
changes:
> 
> - The remaining decoder code required to decode a VP9 video (with
headers included) has been added. That was done because it's much better
to test the decoder standalone with a video file. I decided to keep that
code on the emulator, even if some of it is unused, since it makes
standalone testing easier in the future too, and we can include unit
tests with video files.
> - Large refactoring of both new and existing code to conform with our
conding [sic] styles, done by @TSRBerry (thanks!) Some of it has been
automated.
> 
> Since we had no loop filtering before, this change will make video
decoding slower. That may cause frame drop etc if the decoder is not
fast enough in some games. I plan to optimize the decoder more in the
future to make up for that, but if possible I'd prefer to not do it as
part of this PR, but if the perf loss is too severe I might consider.
> 
> This will need to be tested on games that had the block artifacts, it
would be nice to confirm if they match hardware now, and get some
before/after screenshots etc.

Comment from @Bjorn29512:

> Significantly improves the block artifacts in FE: Engage.
> 
> Before:
>
![](https://user-images.githubusercontent.com/110204265/216882414-ec88dbda-7544-4490-8a47-37f074056ae3.png)
> 
> After:
>
![](https://user-images.githubusercontent.com/110204265/216882478-4e81fead-1033-4877-b282-f9cac6d6aa3b.png)

---------

Co-authored-by: gdkchan <gab.dark.100@gmail.com>
Co-authored-by: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
2025-02-18 20:59:36 -06:00
..
Image misc: chore: Use explicit types in NVDEC projects (except VP9 because there's an open PR and I don't want to cause conflicts) 2025-01-25 14:07:20 -06:00
Types Implement VP9 loop filtering (#550) 2025-02-18 20:59:36 -06:00
ApplicationId.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
H264Decoder.cs Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
MemoryExtensions.cs Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
NvdecDecoderContext.cs [Ryujinx.Graphics.Nvdec] Address dotnet-format issues (#5369) 2023-06-25 21:44:42 +02:00
NvdecDevice.cs misc: chore: Use explicit types in NVDEC projects (except VP9 because there's an open PR and I don't want to cause conflicts) 2025-01-25 14:07:20 -06:00
NvdecRegisters.cs editorconfig: Set default encoding to UTF-8 (#5793) 2023-12-04 14:17:13 +01:00
NvdecStatus.cs [Ryujinx.Graphics.Nvdec] Address dotnet-format issues (#5369) 2023-06-25 21:44:42 +02:00
ResourceManager.cs Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
Ryujinx.Graphics.Nvdec.csproj Migrate to .NET 9 (#198) 2024-12-19 18:52:25 -06:00
Vp8Decoder.cs Add a separate device memory manager (#6153) 2024-01-22 17:14:46 -03:00
Vp9Decoder.cs misc: chore: Use explicit types in NVDEC projects (except VP9 because there's an open PR and I don't want to cause conflicts) 2025-01-25 14:07:20 -06:00