Commit graph

819 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
5952dfe73f filter/upscaling: Restore alpha after processing
As none of the known Upscaling algorithms handle Alpha, we need to manually restore and interpolate it properly. While this technically reduces visual quality slightly, the chances of this being noticed are slim to none considering that Upscaling is already a questionable solution to quality. Linear was picked here as it produces the best overall result for scaling, keeping gradients mostly in one piece. Mostly.

Fixes #646
2023-04-05 18:51:22 +02:00
Michael Fabian 'Xaymar' Dirks
fc479bcdaf filter/denoising: Restore alpha after processing
As the Alpha channel is completely ignored and possibly destroyed by denoising algorithms, we should restore the Alpha channel manually. Linear interpolation was chosen here as it will behave like Point if the size matches, and properly interpolate if the size doesn't match.

Fixes: #646
2023-04-05 18:51:22 +02:00
Michael Fabian 'Xaymar' Dirks
e40e7526de filter/upscaling: Update Source Identifier 2023-04-05 18:51:21 +02:00
Michael Fabian 'Xaymar' Dirks
0e5709f7da filter/denoising: Update Source Identifier 2023-04-05 18:51:21 +02:00
Michael Fabian 'Xaymar' Dirks
f9c03f2c86 filter/denoising: Don't denoise the same image twice 2023-04-05 18:51:21 +02:00
Michael Fabian 'Xaymar' Dirks
3735627b13 filter/denoising: Use actual size instead of base size of target 2023-04-05 18:51:21 +02:00
Michael Fabian 'Xaymar' Dirks
45cedde1ae filter/denoising: Restrict size to reasonable numbers
Prevents invalid sizes from being used by the filter, which sometimes happens with Async Sources that aren't quite ready yet.

Fixes: #642
2023-04-05 18:51:20 +02:00
Michael Fabian 'Xaymar' Dirks
a5166c409e filter/denoising: Fix incorrect define checks 2023-04-05 18:51:19 +02:00
Michael Fabian 'Xaymar' Dirks
0ff1e3145d locale: Adjust text to match reality 2023-04-05 18:51:18 +02:00
Michael Fabian 'Xaymar' Dirks
247553fa74 filter/denoising: Add Denoising filter 2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks
843a76d1c6 filter/upscaling: 'Video Super-Resolution' -> 'Upscaling'
The previous name was too strict on what could be put into the effect, and would result in additional clutter in the Filter menu when we eventually decide to support other Upscaling methods than Super-Resolution networks.
2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks
03e6ce0dbc filter/video-superresolution: Fix missing UI when selecting Providers 2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks
37666b0dc1 filter/video-superresolution: Fix incorrect symbol name 2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks
496fe424f4 filter/video-superresolution: Catch all exceptions 2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks
33c665982e nvidia/vfx/denoising: Add wrapper for Denoising effect 2023-04-05 18:51:17 +02:00
Michael Fabian 'Xaymar' Dirks
cebd8fa744 nvidia/vfx/effect: Implement managed effect wrapper
Slightly simplifies interaction with effects.
2023-04-05 18:51:16 +02:00
Michael Fabian 'Xaymar' Dirks
7c7ea3c3b6 nvidia/vfx/superresolution: Round to nearest instead of truncate
Slightly improves the accuracy of the scaled size calculations.
2023-04-05 18:51:16 +02:00
Michael Fabian 'Xaymar' Dirks
772d21a8b6 nvidia/cuda: Add cuMemsetD# functions 2023-04-05 18:51:15 +02:00
Michael Fabian 'Xaymar' Dirks
9a4ab558c0 encoders/aom-av1: AV1 encoder based on libaom 2023-04-05 18:51:15 +02:00
Michael Fabian 'Xaymar' Dirks
12f976fde3 obs/encoder-factory: Don't require implementing all virtual functions
As not all encoders need all functions, classes inheriting from this should not need to implement all of them as no-ops. Instead the header should take care of this, which reduces duplicated empty code paths.
2023-04-05 18:51:14 +02:00
William Pettersson
3eacc47085 util/logging: Don't reuse vargs (#632)
As vargs may be modified by some functions, we should not reuse it and instead create a copy of it. This fixes a segfault on logging calls happening with GCC, and potentially may fix other compilers and platforms as well.
2023-04-05 18:51:14 +02:00
Michael Fabian 'Xaymar' Dirks
04c7116f5a project: Fix various warnings 2023-04-05 18:51:14 +02:00
Michael Fabian 'Xaymar' Dirks
380d75f770 project: Unify logging structure 2023-04-05 18:51:14 +02:00
Michael Fabian 'Xaymar' Dirks
b8f23fa8ab project: Don't leak exceptions if possible 2023-04-05 18:51:13 +02:00
Michael Fabian 'Xaymar' Dirks
4943b697bc encoder/ffmpeg: Fix incorrect translations 2023-04-05 18:51:12 +02:00
Michael Fabian 'Xaymar' Dirks
4b36c91fe8 plugin: Don't leak CUDA load exceptions 2023-04-05 18:51:12 +02:00
Michael Fabian 'Xaymar' Dirks
2c4e001751 nvidia/vfx/superresolution: Use resize instead of reallocate 2023-04-05 18:51:11 +02:00
Michael Fabian 'Xaymar' Dirks
cfc463ec0d nvidia/cv/image: Store alignment for later use 2023-04-05 18:51:11 +02:00
Michael Fabian 'Xaymar' Dirks
faf85138fe nvidia/cv: NvCVImage_Dealloc returns void 2023-04-05 18:51:11 +02:00
Michael Fabian 'Xaymar' Dirks
bb03864664 filter/video-superresolution: Add Video Super-Resolution filter 2023-04-05 18:51:09 +02:00
Michael Fabian 'Xaymar' Dirks
cb88682f7c nvidia/vfx/superresolution: Add wrapper for Super-Resolution effect 2023-04-05 18:51:09 +02:00
Michael Fabian 'Xaymar' Dirks
02c6156f2e nvidia/vfx: Add wrapper for NVIDIA Video Effects SDK 2023-04-05 18:51:09 +02:00
Michael Fabian 'Xaymar' Dirks
04c3b88d5d nvidia/cv/texture: Wrapper for gs::texture Images 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks
8784c91ec6 nvidia/cv/image: Wrapper for Images 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks
84a7685d7b nvidia/cv: Add NVIDIA Computer Vision wrapper 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks
7a94007283 nvidia/cuda: Don't be so extremely spammy 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks
6fc18faab0 util/profiler: Adjust to match coding guidelines 2023-04-05 18:51:08 +02:00
Michael Fabian 'Xaymar' Dirks
61c143a0c8 util: Add is_close function 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks
5279993f4b plugin: If CUDA is requested, ensure it is loaded first 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks
0f92a4b499 nvidia/cuda/obs: Release stream before context 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks
0f56f822c3 nvidia/cuda/context: Don't try to destroy device contexts 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks
6ba51efceb nvidia/cuda/context: Log the current device name, UUId und LUId 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks
1a5dad8d97 nvidia/cuda: Add functions to get device name, UUId and LUId 2023-04-05 18:51:07 +02:00
Michael Fabian 'Xaymar' Dirks
b4c7d5f91c util/library: Convert paths to native format 2023-04-05 18:51:06 +02:00
Michael Fabian 'Xaymar' Dirks
57f15b64f7 util/platform: Add Path and String conversion utility functions 2023-04-05 18:51:06 +02:00
Michael Fabian 'Xaymar' Dirks
8d7f2ffec7 filter/nv-face-tracking: Adjust to match coding guidelines 2023-04-05 18:51:05 +02:00
Michael Fabian 'Xaymar' Dirks
7f5916dd72 nvidia/ar: Adjust to match coding guidelines 2023-04-05 18:51:05 +02:00
Michael Fabian 'Xaymar' Dirks
cd8abac142 nvidia/cuda: Adjust to match coding guidelines 2023-04-05 18:51:05 +02:00
Michael Fabian 'Xaymar' Dirks
733b325f98 gfx/blur/dual-filtering: Clean up code
Cleans up the code slightly, without affecting actual functionality
2023-04-05 18:51:02 +02:00
Michael Fabian 'Xaymar' Dirks
011bee032a gfx/blur/gaussian: Fix Gaussian Kernel generation
While the previous method worked, it matches no other implementation including a reference implementation. The new implementation almost perfectly matches the reference implementation and uses oversampling to achieve the goal. This has the downside of limiting the blur size to just 64, but it is necessary in order to achieve correct results.

Fixes #573
2023-04-05 18:51:01 +02:00