Commit Graph

82 Commits (7aedf7833859047dfd9a4ad85bd4da11b896c817)

Author SHA1 Message Date
jpark37 9d7330ca44 obs-transitions: Blend in linear space
Color mismatch is apparent when using source transitions, which lerps
against transparent black and blends into the canvas nonlinearly. When
the transition is done, the blend switches to linear, leading to a pop.

Fix the issue by blending into the canvas in linear space. The lerp is
still nonlinear by design.
2021-05-08 20:53:44 -07:00
jpark37 091bdb9832 obs-transitions: Remove dead code 2021-05-01 23:57:49 -07:00
jpark37 a5cef2513b obs-transitions: Nonlinear SRGB, swipe
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 8c826f5bc3 obs-transitions: Nonlinear SRGB, slide
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 62bd3854f8 obs-transitions: Nonlinear SRGB, luma wipe
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 8e2096f621 obs-transitions: Nonlinear SRGB, fade
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
jpark37 6124a373f6 obs-transitions: Nonlinear SRGB, fade to color
Switch back for now. Maybe we want CIELUV, but that's expensive.
2021-04-21 21:06:18 -07:00
Stéphane Lepin dc2b00a4dd obs-transitions: Crop output of stinger media player
This fixes an issue with Track Matte Stingers applied as visibility
transitions, where the side-by-side or stacked matte file mode would
result in the matte part of the video to "overflow" outside of the
transition's zone
2021-04-18 18:05:07 -07:00
Stéphane Lepin 661256e6de obs-transitions: Remove scaling of track matte texture 2021-04-18 18:05:07 -07:00
jpark37 cacc65f978 obs-transitions: Add narrowing casts 2021-03-31 06:07:11 -07:00
Eric Lindvall 3c76fc4ddb obs-ffmpeg: Enable macOS hardware decoding for media source
Reverts  c7395b05ec
2021-03-30 03:45:06 -07:00
Stéphane Lepin 2bd0404c17 obs-transitions: skip stinger size factors if track matte is disabled 2021-02-06 17:14:10 -08:00
Stéphane Lepin 442ebce361 obs-transitions: default size factors when track matte is disabled 2021-02-06 17:14:10 -08:00
Stéphane Lepin 506434c5e6 obs-transitions: add track matte feature to the stinger transition
This adds the ability to use a secondary black-and-white video as a mask
between source A and B of the transition. The greyscale value of each
pixel is used as the "slider" value in a linear interpolation between the
corresponding pixels in source A and source B.
The track matte can either be in the same file as the stinger itself
(next to the stinger or under the stinger, doubling the width or height
of the stinger depending of the selected layout) or a in a separate
dedicated file.
The same file/separate file behavior is controlled by the
"Matte Layout" option in the stinger settings.
2021-02-06 17:14:07 -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
Gol-D-Ace 7368a2c7cc Update translations from Crowdin 2020-12-14 00:29:44 +01:00
Gol-D-Ace 7ab98ca00f Update translations from Crowdin 2020-11-25 20:11:39 +01:00
Matt Gajownik 4a53958c87 obs-transitions: Expose hardware decoding for Stingers
This also enables hardware decoding by default for stingers.

Note: per c2a2bc5e40 this will not affect
webm files with alpha.
2020-10-23 22:34:24 -07:00
Gol-D-Ace c66ebde080 Update translations from Crowdin 2020-09-27 23:07:27 +02:00
jp9000 7993179466 cmake: Add cmake folders 2020-05-13 06:52:37 -07:00
Colin Edwards 55e2985026
Merge pull request #1944 from WizardCM/windows-rc-definition
CMake: Build Windows modules with file descriptors
2020-04-18 18:27:22 -05:00
Gol-D-Ace d74fc65047 Update translations from Crowdin 2020-03-16 20:14:50 +01:00
Matt Gajownik 061793b975 obs-transitions: Halve stinger padding to 250ms
Triggering a new transition too soon after a
stinger would cause the wrong scene to be displayed
2020-02-01 09:50:57 +11:00
Matt Gajownik 56d25fe6a8 obs-transitions: Set stinger media source's name 2020-01-25 17:27:16 +11:00
Matt Gajownik 51be039cf8 CMake: Build Windows modules with file descriptors 2019-10-15 21:34:12 +11:00
jp9000 e023060afa obs-transitions: Fix stingers sometimes getting cut off
The file duration is a bit of an estimate.  This adds 500ms to the
estimated stinger media file duration to help ensure stinger videos
play back in full without getting cut off prematurely.
2019-10-05 12:51:01 -07:00
Gol-D-Ace 03b5be75e4 Update translations from Crowdin 2019-09-17 23:21:00 +02:00
Clayton Groeneveld ae7887704a obs-transitions: Fix suffix with stinger transition 2019-07-22 15:24:30 -05:00
Clayton Groeneveld 3ea354b4e4 UI, obs-plugins: Add spinbox suffixes where necessary 2019-07-18 04:03:38 -05:00
jp9000 f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Gol-D-Ace 973bc481ce Update translations from Crowdin 2019-06-11 01:42:42 +02:00
James Park ba21fb947e libobs: Fix various alpha issues
There are cases where alpha is multiplied unnecessarily. This change
attempts to use premultiplied alpha blending for composition.

To keep this change simple, The filter chain will continue to use
straight alpha. Otherwise, every source would need to modified to output
premultiplied, and every filter modified for premultiplied input.

"DrawAlphaDivide" shader techniques have been added to convert from
premultiplied alpha to straight alpha for final output. "DrawMatrix"
techniques ignore alpha, so they do not appear to need changing.

One remaining issue is that scale effects are set up here to use the
same shader logic for both scale filters (straight alpha - incorrectly),
and output composition (premultiplied alpha - correctly). A fix could be
made to add additional shaders for straight alpha, but the "real" fix
may be to eliminate the straight alpha path at some point.

For graphics, SrcBlendAlpha and DestBlendAlpha were both ONE, and could
combine together to form alpha values greater than one. This is not as
noticeable of a problem for UNORM targets because the channels are
clamped, but it will likely become a problem in more situations if FLOAT
targets are used.

This change switches DestBlendAlpha to INVSRCALPHA. The blending
behavior of stacked transparents is preserved without overflowing the
alpha channel.

obs-transitions: Use premultiplied alpha blend, and simplify shaders
because both inputs and outputs use premultiplied alpha now.

Fixes https://obsproject.com/mantis/view.php?id=1108
2019-05-08 20:26:52 -07:00
Gol-D-Ace e78ac5ebef Update translations from Crowdin 2019-04-04 16:19:51 +02:00
Gol-D-Ace 98f78fe3a7 Update translations from Crowdin 2019-02-25 15:11:33 +01:00
Gol-D-Ace c3711bdd5e Update translations from Crowdin 2019-02-20 22:26:07 +01:00
Jim af320a0838
Merge pull request #1480 from kkartaltepe/module-descriptions
Plugins: Add descriptions to modules
2018-09-16 15:34:28 -07:00
Kurt Kartaltepe d86c8121ed Plugins: Add descriptions to modules 2018-09-11 18:28:58 -07:00
Gol-D-Ace a79aaa28ab Update translations from Crowdin 2018-08-18 04:16:35 +02:00
jp9000 0bd2e23d14 obs-transitions: Fix potential stinger divide by 0
If the transition point was above or equal to 1.0, it would cause a
divide by 0 error a few lines down.  This could cause audio data to
become corrupted with NAN audio data when mixing, which can cause
certain audio encoders (namely the FFmpeg AAC encoder) to fail.

It was possible for the transition point to be above or equal to 1.0 if
the stinger media file was no longer loadable for whatever reason.
2018-06-11 19:34:07 -07:00
Gol-D-Ace 88282c168c Update translations from Crowdin 2018-03-15 09:00:28 +01:00
Gol-D-Ace ae22886f67 Update translations from Crowdin 2018-01-22 04:55:52 +01:00
jp9000 7bd06e7f26 Update translations from Crowdin 2017-10-17 05:39:22 -07:00
jp9000 2386bd6556 obs-transitions: Fix integer conversion warning 2017-09-16 13:59:53 -07:00
Makeenon 006fc35a2d obs-transition: Add crossfade option to stinger
Add option in properties that let you choose how audio is mixed during
transition:
- Fade Out/Fade In (existing behavior, default)
- Crossfade

Closes jp9000/obs-studio#1028
2017-09-16 13:59:49 -07:00
Michel dab278e1b6 obs-transitions: Add audio monitoring to stinger
Closes jp9000/obs-studio#1001
2017-09-16 12:35:17 -07:00
Gol-D-Ace 8d8c2e5a22 Update translations from Crowdin 2017-08-10 16:07:40 +02:00