Commit graph

702 commits

Author SHA1 Message Date
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
Michael Fabian 'Xaymar' Dirks
3e15537f14 obs/source-factory: Skip broken filter rendering by default
Fixes a black screen issue if a filter happens to run into an unexpected issue which it considers unrecoverable.
2020-11-08 03:36:48 +01:00
Michael Fabian 'Xaymar' Dirks
9751b8fbb5 util/curl: Add missing include for vector 2020-11-02 04:14:50 +01:00
Michael Fabian 'Xaymar' Dirks
e42cf4f325 ui/updater: Set modal flag after hiding the dialog
This fixes a bug with older Qt versions which would not remove the modal window from the parent in the setModal() call, resulting in an unusable parent window.

Fixes #368
2020-11-02 00:54:48 +01:00
Michael Fabian 'Xaymar' Dirks
f6120c69be ui/updater: Always initialize members to zero 2020-11-01 12:59:04 +01:00
Daniel Molkentin
36450f2560
encoders/handlers/debug: Always return something in to_string (#354) 2020-10-09 20:28:11 +02:00
Daniel Molkentin
bb3dcf73ac
encoders/ffmpeg: Use correct parameter for log (#355) 2020-10-09 20:26:46 +02:00
Michael Fabian 'Xaymar' Dirks
dc311f5ce6 encoder/ffmpeg: Don't use hardware encoding for unsupported formats 2020-10-08 11:53:53 +02:00
Michael Fabian 'Xaymar' Dirks
e754a1edd0 encoders/ffmpeg: Don't overwrite already correct settings 2020-10-08 11:53:53 +02:00
Michael Fabian 'Xaymar' Dirks
1485e7a724 ffmpeg/tools: Set correct information when encoding
Improves the previous logic and makes it compatible with the new additions in 26.x, such as sRGB. This was previously broken as the focus was on existing features which could be tested without requiring a compiler to be installed.

Incorrect understanding of how sRGB works with RGB and YCC/YUV formats also caused sRGB to be treated as RGB when I444 was selected. This should also now be fixed, hopefully permanently.

Fixes #331
2020-10-08 11:53:53 +02:00
Michael Fabian 'Xaymar' Dirks
3dbf9c9dbc ui/updater: Apply workaround for OBS Studio checking for modals
In order to work around a bug in the OBS Studio UI code, we have to swap our modal status right before showing and right after hiding, so that the OBS Studio tray menu continuous working correctly. This is a bit of a weird solution, but it does work as expected.

Related: https://github.com/obsproject/obs-studio/issues/3518
2020-09-30 03:57:36 +02:00
Michael Fabian 'Xaymar' Dirks
8c99b56997 ui/about: Fix incorrect icon for YouTube URL
Fixes #329
2020-09-25 21:07:26 +02:00
Michael Fabian 'Xaymar' Dirks
81a970473f updater: Add functionality to check for updates
Implements a manual and automatic update checker with support for both release and testing update channels, allowing users to stay as up to date as possible. It is fully compliant with privacy regulations around the world, as it stays completely silent and inactive until the user gives the Ok to connect to GitHub for the latest releases.
2020-09-24 02:01:40 +02:00
Michael Fabian 'Xaymar' Dirks
34ae5dd64b util/curl: Add C++ wrapper for CURL 2020-09-24 02:01:40 +02:00
Michael Fabian 'Xaymar' Dirks
5ead6260bb ui: Fix support for disambiguation in translations 2020-09-10 10:14:05 +02:00
Michael Fabian 'Xaymar' Dirks
1509d73ef6 util/threadpool: Don't hold work endlessly after processing it 2020-09-10 10:02:06 +02:00
Michael Fabian 'Xaymar' Dirks
778fc7f3fe encoders/handlers/nvenc: Don't list encoders on unsupported systems
Removes the NVENC entry on systems without an NVIDIA GPU by checking if the library for it can be loaded. If it can't be loaded, it's likely that the user does not have a system with NVENC capabilities - and guaranteed that they can't use the encoder as FFmpeg relies on these libraries.
2020-08-10 20:39:08 +02:00
Michael Fabian 'Xaymar' Dirks
2010dc0a87 encoders/ffmpeg: Add function to get info object 2020-08-10 20:39:08 +02:00
Michael Fabian 'Xaymar' Dirks
53d3f1ae6c util/library: Cross-platform handler for library loading
Adds a utility class and functions to load libraries and symbols from libraries somewhat safely. Libraries are immediately unloaded when the last reference to them is lost, so the shared_ptr should be stored if the library is actually needed.
2020-08-10 20:39:08 +02:00
Michael Fabian 'Xaymar' Dirks
070fc41918 encoders/handlers/nvenc: Make code C++ standard compliant again 2020-08-10 19:51:21 +02:00
Michael Fabian 'Xaymar' Dirks
315b996ab3 encoders/ffmpeg: Support for FFmpeg versions older than 58.x 2020-08-10 19:51:21 +02:00