Commit Graph

9278 Commits (535e7dfa157b68562ab185c09d6bcc2c9add2d3f)

Author SHA1 Message Date
jpark37 346af9cc87 obs-filters: Apply scale filter in linear space 2021-01-21 07:57:57 -08:00
jpark37 19d897e3d3 obs-filters: Apply image mask filter in linear space
Also fix an existing stale texture crash when reseting to defaults.
2021-01-21 07:57:57 -08:00
jpark37 d16919b8a0 obs-filters: Apply GPU delay filter in linear space 2021-01-21 07:57:57 -08:00
jpark37 ad2527765f obs-filters: Apply luma key filter in linear space
Also switch from 601 to 709 luma coefficients to match other filters.
2021-01-21 07:57:43 -08:00
jpark37 e66d49cd83 obs-filters: Apply color key filter in linear space
Also consolidate behavior of contrast/brightness/gamma across chroma
key, color correction, and color key filters. The contrast range has
been expanded to approximtely match the range when the filter applied to
nonlinear colors.
2021-01-21 07:57:15 -08:00
jpark37 22a7fd1cf3 obs-filters: Apply color grade filter in linear space 2021-01-21 07:57:15 -08:00
jpark37 e812a133ee obs-filters: Apply color correction filter in linear space
The newly versioned filter also has color overlay removed. We can add it
back if the demand is there, but I'd rather not maintain it.

Also consolidate behavior of contrast/brightness/gamma across chroma
key, color correction, and color key filters. The contrast range has
been expanded to approximtely match the range when the filter applied to
nonlinear colors.
2021-01-21 07:56:34 -08:00
jpark37 47da18e26c obs-filters: Apply chroma key filter in linear space
Also consolidate behavior of contrast/brightness/gamma across chroma
key, color correction, and color key filters. The contrast range has
been expanded to approximtely match the range when the filter applied to
nonlinear colors.
2021-01-21 07:55:50 -08:00
jpark37 14d9b57422 obs-transitions: Linear SRGB, swipe 2021-01-21 07:42:57 -08:00
jpark37 33ace6b817 obs-transitions: Linear SRGB, slide 2021-01-21 07:42:57 -08:00
jpark37 ad013f4d84 obs-transitions: Linear SRGB, luma wipe 2021-01-21 07:42:57 -08:00
jpark37 b718a5b0a4 obs-transitions: Linear SRGB, fade 2021-01-21 07:42:57 -08:00
jpark37 18184e0175 obs-transitions: Linear SRGB, fade to color 2021-01-21 07:42:57 -08:00
jpark37 33b744270a linux-capture: Support linear SRGB
Well, linear SRGB for screen capture. The window capture path failed to
copy between SRGB textures for some reason, so just force nonlinear
formats instead.
2021-01-21 07:42:57 -08:00
jpark37 ebc22dea78 mac-capture: Support linear SRGB 2021-01-21 07:42:57 -08:00
jpark37 a311299606 win-capture: Support linear SRGB
For game capture, neither GL nor D3D9 support SRGB shared textures, so
disable linear SRGB support if the texture format doesn't support it.

Similarly, DXGI display capture doesn't work with SRGB at the moment.
Unsure if it will with more work, but disable for now.

Also force linear SRGB off if using GDI-compatible textures.
2021-01-21 07:42:57 -08:00
jpark37 015ed39923 text-freetype2: Support linear SRGB 2021-01-21 07:42:57 -08:00
jpark37 a6fc46156d obs-text: Support linear SRGB 2021-01-21 07:42:57 -08:00
jpark37 6fe33df708 libobs-winrt: Support linear SRGB
Switch away from GDI-compatible texture for SRGB support. Never needed
GDI compatibility anyway.
2021-01-21 07:42:57 -08:00
jpark37 cc452e5eda image-source: Support linear SRGB
Both image and color sources have been updated.

Also added alpha support to the color source. Useful for users, and
serves as an easy alpha blending test case.
2021-01-21 07:42:57 -08:00
jpark37 e08ad9faf3 UI: Render previews in linear sRGB space
Necessary for correct alpha blending.
2021-01-21 07:42:57 -08:00
jpark37 71bd5860ce libobs: Final downsample with SRGB formats 2021-01-21 07:42:57 -08:00
jpark37 9e66a4d1ad libobs: Deinterlace as linear SRGB when needed 2021-01-21 07:42:57 -08:00
jpark37 72efe8b942 libobs: Update render_item to enable linear SRGB
Does nothing without linear-aware modifications to sources.
2021-01-21 07:42:56 -08:00
jpark37 edbad7e93d docs/sphinx: Document SRGB changes 2021-01-21 07:42:56 -08:00
jpark37 66259560e0 libobs: Add dormant SRGB format support
GS_RGBA, GS_BGRX, and GS_BGRA now use TYPELESS DXGI formats, so we can
alias them between UNORM and UNORM_SRGB as necessary. GS_RGBA_UNORM,
GS_BGRX_UNORM, and GS_BGRA_UNORM have been added to support straight
UNORM types, which Windows requires for sharing textures from D3D9 and
OpenGL. The D3D path aliases via views, and GL aliases via
GL_EXT_texture_sRGB_decode/GL_FRAMEBUFFER_SRGB.

A significant amount of code has changed in the D3D/GL backends, but the
concepts are simple. On the D3D side, we need separate SRVs and RTVs to
support nonlinear/linear reads and writes. On the GL side, we need to
set the proper GL parameters to emulate the same.

Add gs_enable_framebuffer_srgb/gs_framebuffer_srgb_enabled to set/get
the framebuffer as SRGB or not.

Add gs_linear_srgb_active/gs_set_linear_srgb to instruct sources that
they should render as SRGB. Legacy sources can ignore this setting
without regression.

Update obs_source_draw to use linear SRGB as needed.

Update render_filter_tex to use linear SRGB as needed.

Add gs_effect_set_texture_srgb next to gs_effect_set_texture to set
texture with SRGB view instead.

Add SRGB helpers for vec4 struct.

Create GDI-compatible textures without SRGB support. Doesn't seem to
work with SRGB formats.
2021-01-21 07:42:13 -08:00
Piotr Esden-Tempski d7ec87ff0e linux-v4l2: Add auto reset on timeout option
Adds frame time multiple based timeout option, instead of the hardcoded
1 second timeout.

Adds optional automatic device stream reset when the device times out.
Helps with devices that "lock up" or "freeze", for example Magewell and
Elgato USB HDMI capture devices.

The automatic reset is by default off and optional. Turning it on can
cause issues for devices that work but drop a lot of frames.
2021-01-20 16:45:05 -08:00
jp9000 552bd035d5 Revert "mac-avcapture: Add additional capture presets"
This reverts commit b1efb005ab.

This needs to be a runtime check, not a compile-time check.
2021-01-20 12:44:16 -08:00
Doug Kelly b1efb005ab mac-avcapture: Add additional capture presets
This adds additional capture presets, including 3840x2160 and
1920x1080, in addition to the preset "High."
2021-01-20 12:20:29 -08:00
Ivan Efremov c7ca8abdd3 UI: fix the maximum search length of Hotkeys Filter
The "fullName" property was filled only in case of exceeding
TRUNCATE_TEXT_LENGTH. Also search function had worked only with
item->text() what was the reason of maximum search length in
Hotkeys Filter(Setting->Hotkeys).

The following changes allow to search in filter without
the length limit of string along with the current functionality.
2021-01-20 12:18:05 -08:00
jpark37 7427272062 libobs-opengl: SRGB-safe GLSL path for raw loads
texelFetch ignores SKIP_DECODE_EXT. Replace implementation with
textureSize and textureLod.
2021-01-19 12:24:36 -08:00
Ryan Foster 54207a0d60 UI: Replace deprecated QLayout->setMargin with setContentsMargin
QLayout->setMargin has been deprecated since Qt 5.13 (though marked
obsolete since at least Qt 4.8) and removed in Qt6. It was replaced by
QLayout->setContentsMargins, which is available in all versions of Qt5.
Building against Qt 5.13+ can produce compiler warnings when using
QLayout->setMargin, and warnings are bad.

https://doc.qt.io/archives/qt-4.8/qlayout-obsolete.html
https://doc.qt.io/qt-5/qlayout-obsolete.html
d6d33f0b80
https://github.com/qt/qtbase/blame/5.15.2/src/widgets/kernel/qlayout.h
2021-01-18 19:10:31 -08:00
Richard Stanway 900b5341eb libobs: Add os_is_obs_plugin function
This function determines if something is an OBS plugin before attempting
to load it. On Windows, many plugins ship their dependent DLLs alongside
the plugin DLL, so OBS would load things like libcef.dll on startup only
to immediately free it. For other platforms, this is less of a concern
so this function is a no-op for now.

This improves startup time and reduces risk from dependent DLLs
potentially running code with unwanted side effects in DllMain.
2021-01-18 19:05:41 -08:00
Georges Basile Stavracas Neto 44ca426483 ci: Add experimental Flatpak bundle
This is a simple, isolated workflow that generates Flatpak
bundles when running on the master branch, or when a pull
request has the "Seeking Testers" label.

Based on https://github.com/marketplace/actions/flatpak-builder
2021-01-18 15:33:54 -08:00
Georges Basile Stavracas Neto 036012d329 build-aux: Add Flatpak manifest
Add a new com.obsproject.Studio.json file containing the
dependencies and permissions required by OBS Studio.

RFC: https://github.com/obsproject/rfcs/pull/21
2021-01-18 15:33:54 -08:00
gxalpha 6d01d25117 .gitignore: Remove duplicated .DS_Store 2021-01-18 15:13:03 -08:00
Matt Gajownik 6650f090d8 CI: Enable service integration in GitHub Actions 2021-01-18 21:07:56 +11:00
Mike So f79393a727 UI: fix unable to upload and view crash report in mac 2021-01-18 01:43:09 -08:00
Ryan Foster 81c2dac75e deps: Update cmake_minimum_required to 2.8.12 2021-01-18 01:37:45 -08:00
Sefa Eyeoglu 90244212f3 obs-outputs: Use system-wide FTL if present
To support FTL, it needed to be present in-tree to be compiled. This PR
adds support for system-wide installations of libftl. It uses
pkg-config to find the system-wide installation. If pkg-config can't
provide libftl we just fall back to using the in-tree submodule. If
that's also not available it won't be included at all like before.
2021-01-17 20:07:03 -08:00
Clayton Groeneveld 968a1a6ff0 UI: Add interact button to source toolbar
This adds a interact button to the source toolbar. It is only
shown when source is interactable.
2021-01-17 20:03:08 -08:00
Clayton Groeneveld 520f1158e1 UI: Fix color of filters icon
The filters icon color was #ffffff. This changes it to #d2d2d2, the
same as the other icons.
2021-01-17 19:55:21 -08:00
Matt Gajownik f233222412 mac-virtualcam: Make DAL plugin filename case consistent
This caused issues on case sensitive filesystems
2021-01-18 08:57:26 +11:00
Matt Gajownik 95c4db3bc6 CI: Fix CEF version for both Linux & macOS 2021-01-17 23:55:18 +11:00
Matt Gajownik bb6b1e53f8 obs-browser: Update to 2.11.0
- macOS Browser Docks
- Virtualcam Frontend Function/Events
- Manually set default font size
- Expose reload function for browser panels
2021-01-17 20:22:44 +11:00
VodBox 3273472019 UI: Add missing files dialog 2021-01-17 10:31:59 +13:00
VodBox fb95e1d1e9 libobs: Add missing file API to sources 2021-01-17 10:31:58 +13:00
Andrew Tropin fb347c3c62 UI: Add support for OBS_PLUGINS*_PATH env variables
Allow to load obs plugins from arbitary directory, specified by
OBS_PLUGINS_PATH and OBS_PLUGINS_DATA_PATH environment variables.
2021-01-16 00:26:10 -08:00
Clayton Groeneveld e38d8f10a6 UI: Add virtual camera to system tray
Adds ability to start and stop the virtual camera from the
system tray.
2021-01-15 18:16:41 -08:00
jpark37 2e82a6c7e8 libobs-winrt: Disable WGC border on insider SDK
Functionality is coming in a future Windows update to disable the yellow
border when using WGC. Add code now to opt in. Will require SDK upgrade
later for OBS build.

winrt::apartment_type::multi_threaded is necessary to dodge assert for
calling get() on RequestAccessAsync result. Don't think I will ever
fully understand COM apartments.
2021-01-15 18:16:23 -08:00