Commit graph

822 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
ebbe5e92a8 nvidia/cuda: Adjust to match coding guidelines 2021-06-16 13:34:47 +02:00
Michael Fabian 'Xaymar' Dirks
7c262ed38b gfx/blur/dual-filtering: Clean up code
Cleans up the code slightly, without affecting actual functionality
2021-06-09 03:46:14 +02:00
Michael Fabian 'Xaymar' Dirks
8971bad218 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
2021-06-09 03:46:14 +02:00
Michael Fabian 'Xaymar' Dirks
d6a8385ab5 util: Add Pascal Triangle and integer power 2021-06-09 03:46:14 +02:00
Michael Fabian 'Xaymar' Dirks
ddb0007b91 gfx/shader: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
e8f333e42d filter/blur: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
da0e8b3377 filter/displacement: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
36847a1fd4 filter/dynamic-mask: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
3e2af7ee9a filter/sdf-effects: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
b0bcad906c filter/shader: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
90f0593eb1 filters/transform: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
f9c5907c10 gfx: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
f7d8758465 nvidia/cuda: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
bf91ed7ba7 obs/gs: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
33ef4b0d68 obs: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
5ae479fecd source/mirror: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
39a972139c source/shader: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
c71e8fe9d4 transition/shader: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
cf30768e7e util: Remove unused legacy function 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
a54f1a144b util: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
7065691e7b project: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
708dd58745 ffmpeg: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
6ab48b8f6d encoders/codecs: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
06bf44880b encoders/handlers/amf: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
2ecfa0e1a4 encoders/handlers/nvenc: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
05a6a83d1a encoders/ffmpeg: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
e0c10bd3b2 filters/color-grade: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
399c351ac7 encoders/handlers/nvenc: Fix NVIDIA trademark 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
b365884181 filters/nv-face-tracking: Apply coding guidelines 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
ba32632110 nvidia/ar: Fix NVIDIA Trademark 2021-06-08 05:44:22 +02:00
Michael Fabian 'Xaymar' Dirks
cdca069b2a filters/nvidia-face-tracking: Update for new SDK and OBS 27.x 2021-05-01 19:14:57 +02:00
Michael Fabian 'Xaymar' Dirks
295b1a5fca obs/gs/texture: Add new flags and fix flag decoding 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
2923c5bd49 uitl/bitmask: Add 'has' function 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
132bdaf542 nvidia/cuda: Add function to query version directly 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
2501afff3b nvidia/cuda: Update to match CUDA 11.1 and later
Adds several new functions that may be required for operation
2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
21f2c7fdc5 nvidia/cuda: Print the Driver CUDA version to the log 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
31ddb9901f filter/nvidia-face-tracking: Update to nvidia::cuda::obs 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
ffcb940e34 filter/nvidia-face-tracking: Update to new CUDA code 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
fbd5c956a5 nvidia/ar: Fix bad function definition 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
cfbc7833f3 project: Apply formatting 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
ac967cadae nvidia/cuda/obs: Add simple CUDA manager for OBS 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
e4996cdc80 nvidia/cuda/stream: Add synchronize function 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
ebdda0162f nvidia/cuda/gs-texture: Add accessors for internals 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
e678570bba nvidia/cuda/context: Merge context-stack into context header 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
e75986f0a8 nvidia/cuda: Log extra information when built for Debug 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
be7a0d9a5e nvidia/cuda: Add custom exception for CUDA 2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
c7f517e206 nvidia/cuda: Use util::library and remove CUDA library argument
The CUDA library is always available as a singleton, so it does not make sense for it to be passed in. Instead we can simply grab it from the singleton and use it as it is, which makes the code easier to maintain and automates certain code.
2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
fee3d2cd5c util/logging: Add logging utility
Also contains the function signature and name macros.
2021-04-27 03:12:59 +02:00
Michael Fabian 'Xaymar' Dirks
a51bc3aff0 ui/about: Update Supporter and Translator entries 2021-04-24 00:05:28 +02:00
Michael Fabian 'Xaymar' Dirks
f1b0b725fb ui/about: Fix stack size problem 2021-04-24 00:05:28 +02:00
Michael Fabian 'Xaymar' Dirks
2ba94dabbc ui/about: Remove outdated entry roles 2021-04-24 00:05:28 +02:00
Michael Fabian 'Xaymar' Dirks
5d5709764e ui/about: Replace buttons with clickable Entries
This reduces the total amount of links Supporters can submit to just one instead of two. Additionally by removing the buttons and making the entry itself clickable, the UI can show more entries at once and allow users to easily make the connection between the entry and the link it opens when clicked.
2021-04-24 00:05:28 +02:00
Michael Fabian 'Xaymar' Dirks
9498411783 ffmpeg/tools: Adjust to match ffmpeg-mux color settings
The 'obs-ffmpeg-mux.c' file specifies different color parameters than StreamFX does. This causes re-muxing to go haywire, and editors that trust these tags suddenly spew out bad colors for BT.601 and sRGB.

Reverts #478
2021-04-20 04:25:13 +02:00
Michael Fabian 'Xaymar' Dirks
4b75577afe ui: Prevent Qt from automatically assigning Menu roles
Qt defaults to give every QAction a TextHeuristicRole, which means that certain key words will cause Qt to change how the QAction behaves. We do not want this, so we explicitly assign it to have NoRole instead.

Fixes #323
2021-04-19 14:19:27 +02:00
Michael Fabian 'Xaymar' Dirks
18e8aa8f04 ui: Insert StreamFX menu before OBS "Help" menu
Instead of adding ourselves as the last entry which seems to confuse the MacOS Qt implementation, we instead insert ourselves before the Help menu. This should hopefully prevent the StreamFX menu from overriding the OBS About entry.

Fixes #323
2021-04-19 14:19:27 +02:00
Michael Fabian 'Xaymar' Dirks
8de32fd6c4 filters/sdf-effects: Improve user experience with visual property groups
Grouping properties by what they do improves the user experience as the user does not have to guess at what belongs to which part of the effect. Additionally toggleable groups automatically disable all child elements, so the user is not confused by them still being active.
2021-04-18 15:47:54 +02:00
Michael Fabian 'Xaymar' Dirks
c7b4450d9d filters/displacement: Permanently deprecate the filter 2021-04-18 15:17:56 +02:00
Michael Fabian 'Xaymar' Dirks
5baf8524d5 plugin: Replace long descriptions with "Open Manual" button
While the long descriptions were useful, keeping the updated and translated is pretty much impossible. Technology moves fast and not everyone that translates the project knows a lot about technology.

Therefore the long descriptions have now been replaced with a button that opens the wiki page for the feature instead. This should drastically reduce the number of help cases, and improve the translation coverage at the same time.
2021-04-17 03:34:39 +02:00
Michael Fabian 'Xaymar' Dirks
e0e889287b plugin: Add function to open an URL 2021-04-17 03:34:39 +02:00
Michael Fabian 'Xaymar' Dirks
b0842e8927 filters/color-grading: Add proper suffixes to UI properties 2021-04-17 03:19:21 +02:00
Michael Fabian 'Xaymar' Dirks
b837d94d91 source/shader: Fix missing buffered draw requirement (#516)
Fixes #516
2021-04-14 13:41:52 +02:00
Michael Fabian 'Xaymar' Dirks
515f9c659e filters/color-grading: Adjust range for Lift and Gain (#515)
Fixes #515
2021-04-14 13:41:52 +02:00
Michael Fabian 'Xaymar' Dirks
a47d068012 transition/shader: Use direct rendering (#501) 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
8aba2bd2be source/shader: Use direct rendering (#501) 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
069061274b filter/shader: Use direct rendering (#501) 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
0fe913a94c gfx/shader: Allow specifying effect for direct rendering (#501) 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
78b91c9957 filter/dynamic-mask: Require buffered rendering 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
f9d4c48237 filter/displacement: Require buffered rendering 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
40bf73bc22 filter/color-grade: Add direct rendering support (#501) 2021-03-28 15:02:11 +02:00
Michael Fabian 'Xaymar' Dirks
dfec841054 filters/color-grade: Fix support for translucent Inputs
Additionally also document some of the code and enforce certain GPU states for rendering.
2021-03-28 10:43:35 +02:00
Michael Fabian 'Xaymar' Dirks
f9af350768 ffmpeg/tools: Fix incorrect transfer characteristics
Both Rec. 601 and sRGB looked extremely wrong before, resulting in weird or warped colors. Since it is very difficult to find up to date and accurate information on standards, we should simply go for what has the most widespread support.
2021-02-21 04:04:31 +01:00
Michael Fabian 'Xaymar' Dirks
612c2f5213 obs/gs/vertex: Don't include unused headers 2021-02-14 13:41:10 +01:00
Michael Fabian 'Xaymar' Dirks
31b7b06af1 nvidia/cuda: Use reinterpret_case instead of static_cast 2021-02-14 13:33:53 +01:00
Michael Fabian 'Xaymar' Dirks
e436d22367 filters/color-grade: Redesign for use with LUTs
There is hardly any reason for us to recalculate everything all the time. LUTs can cache the work once, and then re-use it every time necessary, drastically reducing the impact of Color Grading by almost 60% (on some GPUs even more). Additionally this fixes the negative gamma issue, which plagued the filter for a while.

In the future, once PR 4199 (https://github.com/obsproject/obs-studio/pull/4199) has been merged, we can cut away one intermediate rendering step currently required to make the effect work. Hopefully this will be with the 27.x release of OBS Studio.
2021-02-06 16:22:22 +01:00
Michael Fabian 'Xaymar' Dirks
f396f52054 gfx/lut: Add a simple but efficient LUT producer and consumer
For simple image and video editing, LUTs (Look-Up Tables) are vastly superior to running the entire editing operation on each pixel - especially if all the processing can be done inside a single shader.

Due to the post-processing requirements for our LUTs, we are limited to 8 bits per channel - though clever use of the unused Alpha channel may result in additional space. For our purposes however, this is definitely enough.
2021-02-06 16:22:22 +01:00
tytan652
1d80c0bef0 ui: Don't reference Updater if it's been disabled
Merges #446
2021-02-06 13:35:15 +01:00
Michael Fabian 'Xaymar' Dirks
239e01558d cmake: Refactor component and dependency system
A complete redesign of the component and dependency system is necessary in order to support additional platforms, such as MacOS and other Linux platforms. Additionally it results in a much cleaner code base, which is less confusing overall.

Eventually it might be necessary to push components of StreamFX into their own CMake projects, as it is getting kind of complex now. Especially with the push for a proper plugin manager, things get dicey for big plugins like StreamFX.
2021-02-02 11:53:32 +01:00
Michael Fabian 'Xaymar' Dirks
cd3f9d21c8 sources/mirror: Clamp minimum size to 1x1
This works around an issue in our code with asynchronous or delayed sources.
2021-01-31 19:54:03 +01:00
Michael Fabian 'Xaymar' Dirks
1a2f3962e0 ui: Fix additional Qt issues 2021-01-21 03:28:10 +01:00
Xaymar
0607529cc3
ui/updater: Don't require Qt interaction before OBS is ready (#427)
Fixes one of the launch freezes caused by StreamFX due to interaction with the Qt message loop.
2021-01-21 02:42:56 +01:00
Michael Fabian 'Xaymar' Dirks
b792e56608 source/mirror: Don't ignore data in initializer 2020-12-04 13:28:49 +01:00
Michael Fabian 'Xaymar' Dirks
0c3a8a1d56 filter/shader: Initialize with given data
Ignoring the data parameter during initialization results in duplication and some third party plugins not working as expected, so it's better to not ignore it.

Fixes #315
2020-12-04 13:19:30 +01:00
Michael Fabian 'Xaymar' Dirks
4f5f267451 gfx/shader: Correctly cache shader rendering result
Fixes #392
2020-12-04 13:07:26 +01:00
Michael Fabian 'Xaymar' Dirks
cbd75767fa encoders/ffmpeg: Implement AMF H.264 and H.265 handlers
Adds support for the AMD Advanced Media Framework H.264 and H.265 encoders via FFmpeg. The majority of settings are supported, and the UI/UX experience mimics that of the NVENC implementation. Various settings are left out due to their complexity and should be controlled via the custom parameters field.
2020-12-04 08:32:20 +01:00
Michael Fabian 'Xaymar' Dirks
f7cb14fd34 filter/dynamic-mask: Explicitly increase showing/active references
Fixes #384
2020-11-29 17:17:28 +01:00
Michael Fabian 'Xaymar' Dirks
74c478321c obs/tools: Add active_source and visible_source helpers
These classes help us manage active and showing references to a source, which seem to be necessary for filters.
2020-11-29 17:17:28 +01:00
Michael Fabian 'Xaymar' Dirks
3f92276c9e filter/blur: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
f10f235d43 filter/color-grade: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
73dfb580cb filter/displacement: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
9fb75fc4f2 filter/dynamic-mask: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
268a601bac filter/sdf-effects: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
790f0b32cf gfx/shader: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
b9e0278428 obs/gs/effect: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
97301b9882 obs/gs/mipmapper: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
93c44fe98a util/library: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
6494e8e2d5 gfx/blur: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
007974da54 configuration: Fix unicode support
Related: #359
2020-11-28 23:48:52 +01:00
Michael Fabian 'Xaymar' Dirks
a666e01506 plugin: Implement proper functions to get config and data files
Using the obs_module_file and obs_module_config_path macros works okay, but it comes with a slight overhead as well as additional requirements when passing it to C++ functions that expect certain rules to be fulfilled. By instead wrapping the actual functionality into our own functions and using those we can avoid most of the issues that come with the old approach.

Related: #359
2020-11-28 23:42:29 +01:00
Michael Fabian 'Xaymar' Dirks
a0ce296085 util/bitmask: Move bitmask functionality its own file 2020-11-08 03:39:40 +01:00
Michael Fabian 'Xaymar' Dirks
884138b04c util/library: Use string_view instead of string
Slightly improves performance and reduces memory impact, as string data is not duplicated.
2020-11-08 03:39:40 +01:00