Commit Graph

2545 Commits

Author SHA1 Message Date
jp9000
cf6f7f416a libobs: Update version to 28.1.1 2022-10-31 22:55:13 -07:00
jp9000
de36705ebc libobs: Update version to 28.1.0 2022-10-31 14:27:54 -07:00
jpark37
26e91cf962 libobs: Force SRGB conversion for tonemapped video
Fixes case where video capture is darkened when both luma wipe and scale
filtering are set.
2022-10-31 14:20:21 -07:00
jpark37
93e1efbde2 libobs: Fix blend method in studio mode
Property was not being copied over.
2022-10-31 11:25:33 +01:00
Richard Stanway
a282b1c64d libobs: Add ifdef for Windows-only variable assignment 2022-10-15 16:17:46 -07:00
jp9000
3dfcdb8c07 Revert "libobs: Update version to 28.1.0"
This reverts commit 9baf7f4a8f.
2022-10-11 19:37:32 -07:00
jp9000
9baf7f4a8f libobs: Update version to 28.1.0 2022-10-11 17:11:47 -07:00
jpark37
e119a7024d libobs: Sample video at default chroma location
Expect left for 4:2:0 SDR and 4:2:2, and top-left for 4:2:0 HDR.

MJPEG will be a half-pixel off, but we'll live with that for now.
2022-10-09 16:15:16 -07:00
jpark37
2a76ffaf02 libobs/graphics: Precompute more accurate matrix
This is generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
jpark37
51c452e937 libobs: Precompute more accurate matrices
These are generated with .NET BigInteger fractions, and late divide.
2022-10-05 08:36:29 -07:00
jp9000
77b11c16f1 libobs: Update version to 28.0.3 2022-10-01 17:39:24 -07:00
jp9000
4741a9aa50 libobs: Add function to get encoder pause offset 2022-09-30 13:07:19 -07:00
jpark37
3dd0f895f8 libobs/media-io: Restore color range conversion
FFmpeg needs color range during context init to handle conversions.
sws_setColorspaceDetails after the fact is too late.
2022-09-26 21:26:01 -07:00
jpark37
5af9c87e1b libobs/media-io: Avoid scaler for range diff
Green tint appears when using converting full NV12 to limited NV12 with
swscale, so just avoid creating scaler by color range for now.
2022-09-24 16:45:01 -07:00
jpark37
a34fae0327 libobs,UI: Swap red/blue render/output channels
Don't need to unswizzle channels for DeckLink output in the future.
2022-09-24 16:06:34 -07:00
Kurt Kartaltepe
615728fa3b libobs/util: Reject plugins linking Qt5 library for Linux
Since obs-studio switched to Qt6, old plugins linking Qt5 should be
rejected. On Linux system, OBS and it's plugins link the system
libraries so that obs could be crashed by such plugins that links Qt5
when Qt5 functions are called.

Co-authored-by: Norihiro Kamae <norihiro@nagater.net>
2022-09-19 10:01:18 -03:00
jpark37
bb02620169 libobs: Add support for reading NV12/YUY2 PQ/HLG
8-bit HDR shouldn't exist, but OBS looks broken, so just support it.
2022-09-17 16:36:31 -07:00
jpark37
1a7e5babc2 libobs: Add support for reading I420 HLG
Sony cameras can create 8-bit HLG videos for some reason.
2022-09-16 03:04:23 -07:00
jpark37
70f8e83353 libobs/media-io: Create scaler in more cases
Check for other data mismatches the scaler can fix up.
2022-09-10 15:36:27 -07:00
jpark37
1ddabc5c7c libobs: Remove unnecessary branch
Fast path for output texture shouldn't care what the effect is.
2022-09-10 15:34:29 -07:00
jp9000
4563413d15 libobs: Update version to 28.0.1 2022-09-02 19:06:23 -07:00
jp9000
3cde5dd48a libobs: Update version to 28.0.0 2022-08-30 20:17:35 -07:00
jpark37
b4cc32c4c9 libobs: Extend NVIDIA anti-flicker to desktops 2022-08-29 10:02:32 -07:00
jpark37
37389ff243 libobs: Avoid display clear workaround if possible 2022-08-27 16:32:50 -07:00
jp9000
07df6548fd libobs: Increase texture encode buffering
Seems to solve lag encountered on the new AMF encoder. The SubmitInput
call in the AMF encoder can occasionally stall for quite a long amount
of time, but most take microseconds, so we can compensate by simply
increasing the buffering (3 to 10 textures).
2022-08-27 14:29:28 -07:00
PatTheMav
2bb0818fb4 libobs: Use system header notation for pthread.h include
Using a relative path for the pthread.h header by w32-pthreads breaks
compilation of plugins which include threading.h from libobs (as
w32-pthreads will exist at a different location relative to the
libobs header).

As w32-pthreads (and its include directory) is added to the libobs
target by CMake, the pthread.h header will be found even when using
system header notation.

Fixes https://github.com/obsproject/obs-studio/issues/7155
2022-08-24 05:40:37 -07:00
derrod
44eb8ffbb6 libobs: Fix Windows 10/11 Gamemode/HAGS detection
It seems that the older key still exists on Win 11 and 10 but is always
set to 0, so use the newer to start with and fall back to the old one if
necessary.

Additionally, if the key for HAGS and GameMode do not exist assume
they're on as this is the default on Win 11. On Windows 10 game mode is
also on by default in recent versions.

Also changes "10" to "10/11" just for correctness.
2022-08-24 05:08:04 -07:00
jpark37
f88300a613 libobs: Emulate clear with draw for displays
Laptops that render OBS displays on NVIDIA, and display through Intel
have been seen flickering, and we think the driver is not properly
handling swap chain buffers that have been cleared but not drawn to. To
work around this, we use a draw to simulate a render target clear. This
is not as efficient, so hopefully NVIDIA will fix this soon.
2022-08-24 05:01:08 -07:00
Richard Stanway
8227dccf77 libobs: Initialize main_view video mix before video thread
Fixes a race condition where the video thread would exit because it sees
no active mixes, causing OBS to freeze on startup.

Fixes #7095
2022-08-20 01:27:47 -07:00
jp9000
6abf89af21 Revert "libobs: Correctly set texture size"
This reverts commit 90a409fe58.

Reverts #7077 for now. This really shouldn't be done so close to
release. This crash technically only happens under very niche scenarios,
and the fix seems to have some other potential issues. Prematurely
merged by Jim.
2022-08-18 11:04:11 -07:00
tududweb
90a409fe58 libobs: Correctly set texture size
Correctly set texture size according to the frame to be rendered this time.
Fixes the mismatch between frame and texture when async-delay-filter on.
2022-08-18 03:43:22 -07:00
Chip Bradford
590fa1ffe6 UI: Free virtual cam memory on shutdown 2022-08-17 23:21:28 -07:00
jpark37
6494d46111 libobs: Use nal_ref_idc for H.264 priority
H.264 spec only mentions zero/non-zero, but RFC 6184 uses 0/1/2/3 values
for prioritization. Go back to reading packet field for priority.
2022-08-17 05:30:16 -07:00
Ed Maste
25d308c727 libobs: Read /etc/os-release on FreeBSD
Previously FreeBSD had an optional port that installed /etc/os-release
so it was already available on many FreeBSD systems, but os-release is
now provided by the base system and will be universally available.
2022-08-16 18:40:48 -04:00
gxalpha
bad54448ce libobs: Fix format specifier warning 2022-08-14 23:45:34 +02:00
Chip Bradford
eb1cc8d076 libobs: Fix gpu thread termination when additional video mixes are added 2022-08-13 01:33:34 -07:00
jpark37
64ef93a29d libobs: Fix filter color space passthrough
Need to chain against target instead of parent.
2022-08-13 01:32:42 -07:00
Norihiro Kamae
33e6ad3cc9 libobs: Remove unnecessary UTF characters 2022-08-13 00:49:17 -07:00
Jim
9e15114750 Merge pull request #6577 from chippydip/multiple-video-mixes
libobs: Add support for multiple video mixes
2022-08-09 21:37:48 -07:00
jpark37
fb146fa370 libobs: Remove display GPU markers without draws 2022-08-09 20:21:27 -07:00
PatTheMav
43a49dca47 cmake: Fix CMake package export templates for CMake 3.24
CMake 3.24 implemented changes that break dependency discovery of the
exported libraries built by OBS.
2022-08-09 19:48:03 -04:00
Richard Stanway
86963f65d2 libobs, win-capture: Don't export ms_get_obfuscated_func
Since this was included in things like the inject helper and game
capture DLLs, it added an additional export to those programs. Instead,
simply share the source files directly in the projects that need it.

Co-authored-by: jpark37 <jpark37@users.noreply.github.com>
2022-08-07 19:41:23 +02:00
Norihiro Kamae
c42047cb68 libobs: Fix missing pair of GS_DEBUG_MARKER
The conditional branch added by 4fe6803fe resulted GS_DEBUG_MARKER_END
is not called when the branch condition is failed.
2022-08-06 17:24:56 -07:00
jpark37
4fe6803fe4 libobs: Prevent D3D11 projectors from tearing
Some users stream projectors, so don't let them tear. Use the waitable
object to check the flip queue, and only flip if there's space.

Metal and Vulkan can probably perform similar flip throttling once OBS
starts using them.
2022-08-06 16:16:20 -07:00
jpark37
0e5420750b libobs: Implement H.264/HEVC priority parsing
Parsing priority while serializing/discarding packet data is too gross.
2022-08-01 08:15:29 -07:00
jpark37
5361d936ce libobs: Implement obs_parse_hevc_packet 2022-07-31 17:38:25 -07:00
jpark37
55f35d1d89 libobs: Consolidate H.264 priority scheme
The spec for nal_ref_idc doesn't indicate that it should be used for
priority like x264 seems to be using it for. NVENC seems to pass
different values, so let's not rely on it.

The new scheme might be naive, but we can iterate on it, and apply
evenly to all H.264 encoders.
2022-07-31 17:38:25 -07:00
Chip Bradford
0a87797a21 libobs: Format changes for multiple video mixes 2022-07-31 15:35:37 -07:00
Chip Bradford
7e39ee291c libobs: Add support for multiple video mixes
Split render_texture and derived fields in obs_core_video into new
obs_core_video_mix struct. Add new APIs to add additional obs_view to the render loop, each with a separate render_texture / obs_core_video_mix.
2022-07-31 15:35:36 -07:00
jpark37
3a43fc4a07 libobs: Use left chroma location for SDR
Top-left chroma should be for Rec. 2020/2100.
2022-07-31 00:10:50 -07:00