0
0
mirror of https://github.com/obsproject/obs-studio.git synced 2024-09-20 13:08:50 +02:00
Commit Graph

1738 Commits

Author SHA1 Message Date
Jim
49d178d593
Merge pull request #1830 from jpark37/bilinear-lowres-gl-fix
libobs: Fix shader for GLSL
2019-04-14 19:16:34 -07:00
James Park
f66625bf1e libobs: Fix shader for GLSL
vec4 to vec3 truncation fix.
2019-04-14 14:15:48 -07:00
Colin Edwards
7dacd58aab
Merge pull request #1795 from cg2121/f-keys-linux
libobs: Add support for F25-F35 hotkeys on Linux
2019-04-14 10:48:46 -07:00
Jim
88d439b587
Merge pull request #1754 from Xaymar/feature-remove-properties
libobs: Add function to remove properties
2019-04-14 05:15:10 -07:00
Jim
9480cc4fd2
Merge pull request #1675 from admshao/clear-linux-compiling-warnings
Clear linux compiling warnings
2019-04-14 04:21:21 -07:00
Jim
827f45acfd
Merge pull request #1672 from derrod/captions-no-throttling
libobs: Add minimum display duration to caption data
2019-04-14 04:19:07 -07:00
Jim
b2bc1e159b
Merge pull request #1589 from caffeinetv/minor-improvements
Minor improvements
2019-04-14 03:43:05 -07:00
Jim
f1399b6d18
Merge pull request #1765 from jpark37/blend-alpha
libobs: libobs-d3d11: Fix blend alpha overflow
2019-04-14 00:22:20 -07:00
James Park
69c215345a libobs: Simplify YUV conversion
Currently several shaders need "DrawMatrix" techniques to support the
possibility that the input texture is a "YUV" format. Also, "DrawMatrix"
is overloaded for translation in both directions when it is written for
RGB to "YUV" only.

A cleaner solution is to handle "YUV" to RGB up-front as part of format
conversion, and ensure only RGB inputs reach the other shaders. This is
necessary to someday perform correct scale filtering without the cost of
redundant "YUV" conversions per texture tap.

A necessary prerequisite for this is to add conversion support for
VIDEO_FORMAT_I444, and that is now in place. There was already a hack in
place to cover VIDEO_FORMAT_Y800. All other "YUV" formats already have
conversion functions.

"DrawMatrix" has been removed from shaders that only supported "YUV" to
RGB conversions. It still exists in shaders that perform RGB to "YUV"
conversions, and the implementations have been sanitized accordingly.
2019-04-11 23:00:03 -07:00
James Park
21f4dd63d4 libobs: UI: Use graphics debug markers
Add D3D/GL debug markers to make RenderDoc captures easier to tranverse.

Also add obs_source_get_name_no_null() to avoid boilerplate for safe
string formatting.

Closes obsproject/obs-studio#1799
2019-04-08 02:05:37 -07:00
James Park
2996a6c06b libobs/graphics: Support debug markers
Add support for debug markers via D3DPERF API and KHR_debug. This makes
it easier to understand RenderDoc captures.

D3DPERF is preferred to ID3DUserDefinedAnnotation because it supports
colors. d3d9.lib is now linked in to support this.

This feature is disabled by default, and is controlled by
GS_USE_DEBUG_MARKERS.

From: obsproject/obs-studio#1799
2019-04-08 02:05:37 -07:00
James Park
a3e5344cce libobs: Fix move assignment operator for ComPtr
We can't compare addresses of ComPtr for self-reference directly because
the address-of operator is overloaded, causing a compiler error. This
fix more or less matches the WRL implementation.
2019-04-08 02:05:37 -07:00
James Park
d91bd327d7 libobs: libobs-d3d11: obs-filters: No excess alpha
Currently SrcBlendAlpha and DestBlendAlpha are both ONE, and can
combine together to form two. This is not a noticeable problem for
UNORM targets because the channels are clamped, but it will likely
become a problem if FLOAT targets are more widely used.

This change switches DestBlendAlpha to INVSRCALPHA, and starts
backgrounds as opaque black instead of transparent black. The blending
behavior of stacked transparents is preserved without overflowing the
alpha channel.
2019-04-07 18:16:56 -07:00
Jim
a0ead6f974
Merge pull request #1800 from cg2121/add-pragma-once
UI, libobs, text-freetype2: Add missing pragma once in header files
2019-04-06 23:40:43 -07:00
Michael Fabian 'Xaymar' Dirks
9bb276feab libobs: Add function to remove properties
Allows removing a property from a properties list in get_properties or
modified callback to enable dynamic property generation. The behavior
is undefined if the UI properties list is not refreshed by returning
true from the modified callback.
2019-04-06 15:33:46 +02:00
Jim
9eb01a1229
Merge pull request #1808 from jpark37/area-filter-gl-flip
libobs: Fix and simplify Area scale filter
2019-04-04 18:19:02 -07:00
James Park
c4819678c9 libobs: Fix and simplify Area scale filter
It appears there's a projection flip that is applied in some situations,
like the preview pane in studio mode, and the shader math fails when
it's active causing the output color to be zero. This fixes the math for
GLSL (with a tiny redundancy penalty to HLSL), and cleans up some
unnecessary code along the way.

Use abs() to avoid zero area in case the OpenGL projection flip is
active. Also simplify the math, and remove the unnecessary sampler
state.
2019-04-04 08:39:54 -07:00
jp9000
7ef4e10c89 libobs: Update version to 23.1.0 2019-04-04 06:46:51 -07:00
Clayton Groeneveld
d1be93ae69 UI, libobs, text-freetype2: Add missing pragma once in header files 2019-04-01 02:48:28 -05:00
Jim
2d442452b7
Merge pull request #1796 from cg2121/fix-hotkeys-not-showing
UI: Fix issue where space/esc hotkeys would be blank
2019-03-31 20:44:04 -07:00
Clayton Groeneveld
e321005b02 UI: Fix issue where space/esc hotkeys would be blank
This also modifies libobs.

This only happened on Linux.

Fixes https://obsproject.com/mantis/view.php?id=1018
2019-03-31 05:10:02 -05:00
Clayton Groeneveld
9930b294b9 libobs: Add support for F25-F35 hotkeys on Linux
Fixes https://obsproject.com/mantis/view.php?id=1257
2019-03-31 03:41:16 -05:00
Shaolin
721302bf00 libobs: Clear all compiler warnings 2019-03-29 06:29:04 -03:00
jp9000
d18c62b2b5 libobs, image-source: Fix ABI break in image_file_t structure
In commit a776a6cf07, the image_file_t structure (which is a public
structure) had a member variable added to it, which broke ABI.
2019-03-28 22:30:20 -07:00
jp9000
b1f04a47cf libobs: Change internal version to 23.0.3 (temporarily)
While performing a release candidate, it is important to use an actual
version before the actual release candidate version so that the
auto-updater will know to update to 23.1.0
2019-03-28 16:44:07 -07:00
jp9000
11c0d6e976 libobs: Update version to 23.1.0 2019-03-26 22:05:52 -07:00
Jim
7066055cf3
Merge pull request #1761 from jpark37/gl-fixes
libobs: Fix invalid max_anisotropy value
2019-03-26 14:14:06 -07:00
James Park
746820e35a libobs: Fix Area scale filter for GLSL
Remove const qualifiers because they are syntax errors for GLSL when
used like in C.
2019-03-23 13:16:50 -07:00
jp9000
70b8f0aa65 libobs: Fix ABI break
OBS_EFFECT_AREA from 7d811499e was inserted in the middle of the enum,
which breaks ABI for any binaries that use
OBS_EFFECT_PREMULTIPLIED_ALPHA or OBS_EFFECT_BILINEAR_LOWRES.
2019-03-22 03:46:42 -07:00
Jim
5b4a965fd7
Merge pull request #1762 from Dmitry-Me/fixOutputSpecifiers
libobs: Fix output type specifiers
2019-03-20 02:43:36 -07:00
Dmitry-Me
eea71e5e7f libobs: Fix output type specifiers 2019-03-19 18:29:09 +03:00
James Park
cb67192077 libobs: Fix invalid max_anisotropy value
max_anisotropy is initialized to zero, but the minimum value is 1.
2019-03-19 01:26:28 -07:00
Michael Fabian 'Xaymar' Dirks
3cac828a3e libobs: Fix obs_property_float_set_limits
This function incorrectly checked for an Integer type instead of a
Float type, causing it to do nothing.
2019-03-16 04:30:33 +01:00
Dmitry-Me
b835d7ec05 libobs: Fix effect parsing log specifiers
Closes #1649
2019-03-14 00:04:15 -05:00
Colin Edwards
5c16a96770
Merge pull request #1715 from jpark37/area-filter
Add "Area" scale filter
2019-03-13 23:30:25 -05:00
jp9000
a776a6cf07 libobs/graphics: Add memory usage member to image file
Allows estimating the required memory usage of an image.
2019-03-13 01:11:18 -07:00
jp9000
a2829643f4 libobs: Add function to get libobs object data 2019-03-13 00:50:19 -07:00
jp9000
2f90bcf684 libobs: Fix frame not being cleared
Fixes the remaining case where a frame from the previous
recording/stream could show up at the beginning of the next
recording/stream on the same running session when using the new version
of NVENC.  Textures are being converted for both raw and texture-based
encoders, so this variable which determines whether a texture is ready
and has been converted should be cleared in both cases.
2019-03-12 12:54:47 -07:00
James Park
7d811499e0 Add "Area" scale filter
This new scale filter computes pixels by weighing the coverage area of
source pixels over the target pixel. This algorithm works well for both
upsampling and downsampling, but was mainly designed to upscale
high-quality low-resolution sources like RGB/HDMI retro consoles. I've
heard of people using odd workarounds like scaling up to very high
resolutions before scaling back down to preserve pixel shartpness. This
algorithm directly addresses this use-case in a much more direct
fashion.

The Area scale filter does a better job of preserving the thickness of
thin features than the Point filter.

The Area scale filter does not look at source pixels that lie outside
of the target pixel, leading to a much sharper image than Bilinear,
Bicubic, and Lanczos filters.

This filter should interpolate pixels in linear space, but OBS is not
equipped to do that at the moment.

libobs: Add GPU effect, and wire up scene serialization.

obs-filters: Add Area as an option for scale_filter.

UI: Add Area as an option for both scene items, and canvas downscaling.
2019-03-06 20:53:15 -08:00
jp9000
ec9e48f3c7 libobs: Remove unnecessary count check 2019-03-06 07:43:22 -08:00
jp9000
fbe382a15c libobs: Fix code styling 2019-03-06 07:27:16 -08:00
jp9000
cd3d64215e libobs: Fix first frame when output restarted
When all outputs stop, and then the output starts back up again at a
later point after that, the last frame data or two from the previous
output session would end up as the first frame or two of the proceeding
output.  This was because certain rendering variables were not being
properly cleared when a new output starts back up.
2019-03-05 19:20:18 -08:00
jp9000
7f01fee8c2 libobs: Always query shared texture handle for encoding
Always query the texture's shared handle in case the texture had to be
rebuilt from a driver crash.
2019-03-04 04:54:25 -08:00
Colin Edwards
84b87df161
Merge pull request #1686 from pkviet/mono_upmix
libobs/media-io: Fix mono upmix
2019-03-03 22:38:59 -06:00
Michael Fabian 'Xaymar' Dirks
c633413f06 libobs: Tell filters that we want to load
Previously only sources would receive a load signal, but sources and
filters would receive a save signal. This meant that filters that had
a save signal to store something on disk would never receive a load
signal to load it from disk.

With this both sources and filters will now receive save and load
signals, allowing both to work the same way.
2019-03-01 20:36:31 +01:00
jp9000
15b8ebb5e6 libobs: Update version to 23.0.1 2019-02-26 12:16:06 -08:00
jp9000
17e85f04fd libobs: Add func to get encoder caps by encoder pointer 2019-02-26 08:02:57 -08:00
pkv
918fc6d6c2 libobs/media-io: Fix mono upmix
A mono source is currently upmixed by swresampler in the following way:
- for stereo output, FL=FR=input/sqrt(2)
- for other speaker layouts of the outputs, FC=input, other channels
are zeroed.

In the case of stereo output, this leads to a 3dB level decrease which
users have issue with [1].
The obvious fix of adding a 3dB gain is reported to be adding distortions
on some setups [2].
Note that the "Downmix to Mono" does not fix this upmix problem, since
it just makes all output channels identical by summing all input channels
and normalizing (by dividing by the number of output channels). This last
normalization step results in a level reduction for a mono input.

[1] This fixes https://obsproject.com/mantis/view.php?id=960.
[2] See also: https://obsproject.com/forum/threads/please-allow-for-mono-recording-of-microphones-ill-explain-why.84834
2019-02-24 14:00:57 +01:00
jp9000
88247dae36 libobs: Update version to 23.0.0 2019-02-20 22:16:45 -08:00
derrod
b8b2b7e2e3 libobs: Add minimum display duration to caption data
Adds display_duration declaring the minimum duration a caption text
is not going to be overwritten by a new one. To keep the functions
backwards-compatible obs_output_output_caption_text2 was added while
obs_output_output_caption_text1 continues having a 2 second default.
2019-02-20 06:05:08 +01:00