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.
Closesjp9000/obs-studio#747
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.
Closesjp9000/obs-studio#739
When using this filter in/on OpenGL situations can cause crashes with an
"int to vec4" cast. This fix should resolve that issue.
Closesjp9000/obs-studio#739
Replaces the "Color Correction" filter with a newer version that uses a
matrix, adds hue and saturation, and improves the contrast option.
Closesjp9000/obs-studio#708
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.
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.
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.
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.
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.
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)
Closesjp9000/obs-studio#532
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.
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.
(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)
(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.
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?)
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.
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.