Commit Graph

267 Commits (master)

Author SHA1 Message Date
Julian Miller 941d040fd9 obs-filters: Add audio compression filter
Closes jp9000/obs-studio#799
2017-02-25 05:44:09 -08:00
jp9000 001f2a4772 obs-filters: Change "LUT Filter" to "Apply LUT"
At request of c3r1c3 to be a bit more specific.
2017-01-30 19:02:53 -08:00
jp9000 a58c93eb9d obs-filters: Rename "Color Grade" filter to "LUT Filter" 2017-01-30 18:43:25 -08:00
Alexandre Vicenzi b6bbdee049 obs-filters: Fix compiler warnings
static should come before const.

Closes jp9000/obs-studio#778
2017-01-30 16:54:14 -08:00
mape 7d9a68c18d obs-filters: Add "Color Grading" filter
This allows for color grading based on a color look-up table. Commonly
used to color correct and/or grade video that has been shot in Log.

Closes jp9000/obs-studio#747
2017-01-30 06:41:20 -08:00
Take Vos 9007de70cc obs-filters: Add option to undistort ultrawide -> wide
Adds an option to the aspect/scale filter to undistort the center of the
image when scaling from ultrawide to wide.

Closes jp9000/obs-studio#762
2017-01-30 06:01:28 -08:00
Cephas Reis 1e17414e8f obs-filters.c: Fix color correction filter saturation
The Saturation option was unbalanced, giving more weight to the color
red and a TON more weight to the color blue.  This patch balances the
colors to provide a more even increase in saturation across the RGB
channels.

Closes jp9000/obs-studio#739
2017-01-16 03:41:57 -08:00
Cephas Reis 10d6d5f0ca obs-filters.c: Fix color correction filter OpenGL crash
When using this filter in/on OpenGL situations can cause crashes with an
"int to vec4" cast.  This fix should resolve that issue.

Closes jp9000/obs-studio#739
2017-01-16 03:41:50 -08:00
Gol-D-Ace 6223ed6520 Update translations from Crowdin 2017-01-07 00:23:16 +01:00
Gol-D-Ace 69f0bc244a Update translations from Crowdin 2016-12-23 20:46:47 +01:00
Cephas Reis 2278782c19 obs-filters: Fix comment messages
Split commit for jp9000/obs-studio#733
2016-12-23 02:40:00 -08:00
Cephas Reis d231f40588 obs-filters: Add "Color" option to color correction filter
Closes jp9000/obs-studio#733
2016-12-23 02:39:44 -08:00
Cephas Reis d4cd14b05c obs-filters: Improve "Color Correction" filter
Replaces the "Color Correction" filter with a newer version that uses a
matrix, adds hue and saturation, and improves the contrast option.

Closes jp9000/obs-studio#708
2016-12-20 23:08:00 -08:00
jp9000 ed85b22534 Update translations from CrowdIn 2016-11-03 13:32:52 -07:00
Gol-D-Ace aadc7263c0 Update translations from Crowdin 2016-09-28 01:17:24 +02:00
Christoph Hohmann 92b216b468 obs-filters: Fix step size for noise suppression filter 2016-08-11 20:56:38 +02:00
Gol-D-Ace cb036b2713 Update translations from Crowdin 2016-08-08 16:21:48 +02:00
jp9000 7e8ad0a08e obs-filters: Actually define TRUE/FALSE
Doing something like '#if TRUE' when 'TRUE' isn't defined is the
equivalent to '#if 0' because the preprocessor evaluates an undefined
macro as 0/false.
2016-07-27 10:18:53 -07:00
jp9000 498051b8f0 obs-filters: Fix macro check
This should be checking true or false -- not whether it's defined or
not.
2016-07-27 10:02:12 -07:00
jp9000 71dc8d6407 obs-filters: Add comments to noise suppression filter
These comments have been added to clean up the code and make it more
clear of what the code is doing.  The code felt a bit messy, and this
should help prevent the original author of the noise suppression filter
from being lost in case he decides to modify/improve the filter.
2016-07-26 05:06:26 -07:00
jp9000 6fcb5372e9 obs-filters: Remove redundant code
This variable was always being set to that value regardless a few lines
below.
2016-07-26 04:53:46 -07:00
jp9000 155ddf8996 obs-filters: Handle timestamp jumps for noise sup. filter
When buffering audio data, we don't want to buffer audio data that may
be old.  If the audio timing jumps significant and old audio data is
buffered, clear that old data.
2016-07-26 04:50:18 -07:00
jp9000 55a5664363 obs-filters: Buffer noise suppression audio data
The noise suppression filter mistakenly operated on the assumption that
input audio data would always be in 10ms segments, and would crash if
audio data was larger than that size.

Because speexdsp operates on fixed audio frame sizes only, we must
buffer audio data to fit that frame processing size.  This creates a
troublesome situation where you must buffer around that specified frame
size.

The new steps for processing are:
1. Push audio data to input circular buffer.
2. Push number of audio frames and timestamp for that audio packet to an
   'info' circular buffer.
3. Check size of input circular buffer, and while it's equal to or above
   the speexdsp frame size (10ms for minimum latency), pop from the
   input buffer to a temporary buffer (10ms frames) and process it, then
   push that temporary buffer to the output circular buffer.
4. Peek at the front of the 'info' circular buffer.
5. If the output circular buffer frame size is equal or larger than next
   expected number of frames, pop both the info and output buffer, and
   return the audio data with the expected audio frames/timestamp.
2016-07-26 04:29:50 -07:00
Simon f3d0272f57 obs-filters: Add speexdsp-based noise suppression filter 2016-07-25 20:17:13 -07:00
jp9000 6ac832fbb2 obs-filters: Fix scroll filter sampler state
When the crop filter was changed to a crop/pad filter, the sampler state
was changed to use a transparent border for the U/V addressing mode.
However, what was not realized at the time was that the scroll filter
also shared the crop effect file, and the scroll filter depended on the
old sampler state (wrap u/v).

This fixes the issue by simply setting a u/v wrap sampler state in the
scroll filter.
2016-07-08 03:03:23 -07:00
Gol-D-Ace 81adb13f59 Update translations from Crowdin 2016-07-06 01:18:27 +02:00
jp9000 9413a43869 obs-filters: Add scaling/aspect ratio filter
Allows forcing a specific resolution or aspect ratio on a source, with
user-defined sampling.
2016-06-29 08:00:52 -07:00
Olle Kelderman c7e3dfc347 obs-filters: Change 'Crop' filter to 'Crop/Pad' filter
Allows the ability to pad in addition to cropping.  Changes the name to
Crop/Pad filter.

(Additional edits by Jim: Greatly refactored/simplified filter code)

Closes jp9000/obs-studio#532
2016-06-28 02:46:36 -07:00
nd f7ac9258d4 obs-filters: Change async delay filter max delay to 20 sec
Closes jp9000/obs-studio#549
2016-05-30 10:42:16 -07:00
Gol-D-Ace fe56a12867 Update translations from Crowdin 2016-05-14 00:27:59 +02:00
jp9000 5edc0c9580 obs-filters: Fix more chroma key shader code
In aa4e18740a I mistakenly thought that I could add the variables
back in and that it would automatically cull variables that aren't used,
but that wasn't the case -- the shader parser always checks to see
whether parameters were set, and if they're not, it'll fail.  This fixes
an issue where the shader would try to access parameters that are no
longer needed and fail due to the shader parameter check.

YUV-based shader support has been removed (due to the fact that no
sources ever use YUV shading) so there's no reason to keep around the
YUV processing code.
2016-04-24 15:57:46 -07:00
jp9000 aa4e18740a obs-filters: Fix chroma key shader bug 2016-04-24 13:55:39 -07:00
jp9000 5349bbf633 obs-filters: Skip scroll filter if parent has no cx/cy
There's no point in the filter continuing its processing if there's
nothing to draw.
2016-04-23 14:39:38 -07:00
jp9000 a23d8e3f2c obs-filters: Fix scroll filter offsets becoming non-finite
If the parent source of a scroll filter has a 0 width or 0 height, the
scroll filter would do a division by zero on the size_i variable, which
would then cause the offset variable to perpetually have a non-finite
value, thus preventing the scroll filter from rendering properly after
that due to the non-finite offset value being uploaded to the shader.
2016-04-23 14:39:37 -07:00
Gol-D-Ace 5ed7081213 Update translations from Crowdin 2016-04-23 10:29:21 +02:00
jp9000 ff99ba7818 libobs: Allow filter processing function to return false
(Note: this commit also modifies the obs-filters and test-input modules)

Changes the obs_source_process_filter_begin return type so that it
returns true/false to indicate that filter processing should or should
not continue (for example if the filter is bypassed or if there's some
other sort of issue that causes the filtering to fail)
2016-04-22 10:18:12 -07:00
jp9000 9e15e3d8fd libobs: Remove need for DrawMatrix technique in effects
(Note: This commit also modifies obs-filters and text-freetype2)

This simplifies writing of effects.  DrawMatrix is no longer necessary
because there are no sources that require drawing with a color matrix
other than async sources, and async sources are automatically processed
and don't defer their initial render stage to filters.
2016-03-21 21:22:26 -07:00
jp9000 69da1151e0 Update translations from Crowdin 2016-03-19 12:08:48 -07:00
Gol-D-Ace 2b7036dc93 Add latest translations from Crowdin 2016-02-21 22:16:12 +01:00
dodgepong ea9db8249b Add latest translations from CrowdIn 2016-01-31 18:28:35 -05:00
jp9000 bd6ffd76d0 obs-filters: Make mask filter use gs_image_t helper
Prevents it from loading the entire image in the graphics thread, and
allows for animated gifs in the filter (not that anyone would ever do
that.  ..right?)
2016-01-26 11:49:24 -08:00
jp9000 4f782f2415 obs-filters: Make mask/blend image center w/aspect by default
Fixes what is arguably the most annoying feature of the mask/blend
filter, the fact that the image always stretches to the entire source.
It now centers and preserves aspect ratio by default, with an option to
make it stretch and discard aspect ratio to make it operate as it did
before.
2016-01-26 11:49:23 -08:00
jp9000 1bbb18ea3d obs-filters: Mark unused parameter 2015-11-20 14:31:01 -08:00
jp9000 78d5e27abe obs-filters: Reset cx/cy/mul/add crop vals in tick, not render
To first render the filter, the width/height values must be set, but
currently they're only set in the render function, which means that the
crop filter can never be rendered when the program first starts up.
This would cause the filter to fail to render at all under those
circumstances.

This patch moves the calculations from render to tick to ensure that
they're always called and the values are always set.
2015-11-20 14:07:14 -08:00
Gol-D-Ace 2ee1d82860 Add latest translations from Crowdin 2015-11-16 21:04:55 +01:00
Richard Stanway 6c15d814bf obs-filters: Null check filter->effect instead of filter
Detected by Coverity Scan (CID 12876, 12877, 12878, 12879)
2015-10-12 23:21:45 +02:00
dodgepong 76c18b079b Latest translations from CrowdIn 2015-09-22 23:33:29 -04:00
jp9000 6285a47726 (API Change) libobs: Pass type data to get_name callbacks
API changed from:
obs_source_info::get_name(void)
obs_output_info::get_name(void)
obs_encoder_info::get_name(void)
obs_service_info::get_name(void)

API changed to:
obs_source_info::get_name(void *type_data)
obs_output_info::get_name(void *type_data)
obs_encoder_info::get_name(void *type_data)
obs_service_info::get_name(void *type_data)

This allows the type data to be used when getting the name of the
object (useful for plugin wrappers primarily).

NOTE: Though a parameter was added, this is backward-compatible with
older plugins due to calling convention.  The new parameter will simply
be ignored by older plugins, and the stack (if used) will be cleaned up
by the caller.
2015-09-16 09:21:12 -07:00
hwdro fc19d9d11b obs-filters: Fix noise-gate calculation errors
For both cases the cur_level calculations were "wrong". For one channel
case, I assume that was only an oversight, as for two channels case
cur_level "calculation", getting the level from downmixing to mono will
result in an attenuated level than expected. One solution is to use the
highest level of both channels to drive the gate.
2015-09-09 18:07:30 +03:00
dodgepong fb679bdd02 Add latest translations from CrowdIn 2015-07-08 14:56:07 -04:00
jp9000 f8c5c7f55f obs-filters: Add gain filter
This filter simply modifies the volume of the signal as a convenient way
of modifying the volume before other filters, or amplify the volume
without having to mess with advanced audio properties.
2015-06-26 06:11:54 -07:00
jp9000 8bb84cdb3b obs-filters: Use audio-math.h for db conversions 2015-06-26 03:40:29 -07:00
jp9000 204d5f30ce obs-filters: Remove fminf/fmaxf redefinitions
These functions are already defined in math.h, so there's no need to
define them again.
2015-06-26 03:03:15 -07:00
jp9000 07ca99f523 obs-filters: Change 'db' abbreviation to 'dB' 2015-06-25 23:28:26 -07:00
jp9000 cc45b92a8e obs-filters: Add noise gate filter 2015-06-25 15:55:28 -07:00
jp9000 ecabe35f36 obs-filters: Add scroll filter 2015-06-21 01:21:22 -07:00
jp9000 eab60e04d9 obs-filters: Make crop shader wrap texture
This is mostly so that it can be used with the scroll filter, which uses
identical shaders, but needs to wrap the texture instead of clamp.
2015-06-21 01:12:02 -07:00
jp9000 aafd114e67 Add latest translations from Crowdin 2015-05-12 15:29:43 -07:00
dodgepong d0fbe3b382 Add latest translations from CrowdIn 2015-05-08 17:10:39 -04:00
jp9000 6e98fb89f4 obs-filters: Add sharpen filter 2015-05-01 02:07:18 -07:00
dodgepong a04548070c UI: Add latest translations from CrowdIn 2015-03-25 20:51:25 -04:00
jp9000 2f6ba39b41 obs-filters: Add color key filter
Masks out a specific color range in RGB color space.  Commonly used with
solid image data or animated video rather than live video.
2015-03-25 14:14:39 -07:00
jp9000 adb392e08a obs-filters: Add chroma key filter
This allows applying a mask based upon the chroma value (U/V) of a
specific color in YUV color space.  Commonly used to mask out
greenscreens and bluescreens in live video.
2015-03-25 14:14:38 -07:00
jp9000 bee5b3a2d2 obs-filters: Add color correction filter
Adds a color correction filter if one wishes to just apply
gamma/constrast/brightness/opacity/color to a source.
2015-03-25 14:12:05 -07:00
jp9000 bd1ede883d obs-filters: Add crop filter
Allows any source to be cropped, though note that this renders to
texture first, so for more optimal results, cropping values should
probably be put in to capture sources that can be cropped as they're
actually rendered by the source.
2015-03-25 14:12:05 -07:00
jp9000 9138766620 obs-filters: Add mask/blend filter
This filter allows the ability to use a texture to modify the video
output of a source, the ability to:
- apply a color-based mask (dark = transparent, light = opaque)
- apply a mask based upon the alpha of an image
- blend an image via subtraction, addition, or multiplication
2015-03-25 14:12:04 -07:00
jp9000 55534d5d8d obs-filters: Add async delay filter
Adds a filter for delaying asynchronous video/audio data, for example
from webcams, video devices, or media playback sources.  Mainly intended
to allow users to sync up their webcams to other devices.
2015-03-25 14:12:03 -07:00