Commit graph

206 commits

Author SHA1 Message Date
Translation Updater 8999d9fef9 Update translations from Crowdin 2024-06-07 09:47:58 +00:00
derrod 7a870fd923 obs-qsv11: Fix QSV failing on multi-vendor multi-GPU systems
Adds index correction present in QSV test binary to Windows encoder
initialization as well. This is necessary when the adapter index of the
Intel GPU is not the same as the "implementation" index in MFX.
2024-06-01 19:40:33 -04:00
Kurt Kartaltepe 68768e13ae obs-qsv11: Fix adapter detection and fallback to sysmem
Pass down texture/host memory choice for fallback encoders. During
fallback we don't (can't) initialize a shared texture pool and should
use the regular host memory path.

This fixes usage on multi-GPU systems, and enables texture encoders.
2024-04-20 17:06:46 -07:00
Kurt Kartaltepe ebea709381 obs-qsv11: Implement texture encoder on Linux
Implements the texture allocator for QSV using VA-API surfaces and
implement encode_texture2 for using OpenGL textures directly.
2024-04-20 17:06:46 -07:00
PatTheMav 2bc4c69ee9 plugins: Fix compile errors introduced by CMake build framework 3.0 2024-04-13 23:48:38 -04:00
derrod f47fc81d32 obs-qsv11: Remove adaptive CQM option
Without setting the ScenarioInfo to game streaming, which was removed
in 03b70f0672, this is a no-op and its
existence is just confusing to users.
2024-04-07 02:07:59 +02:00
Gale 4c6e2a6722 obs-qsv11: Fix for QSV AV1 in multi-GPU system 2024-04-06 17:06:31 -07:00
Kurt Kartaltepe 4a903d5f85 obs-qsv11: Check all encoders are Intel devices
On Linux, we enumerate all VA-API devices, which incorrectly enables
QSV AV1/HEVC encoders when AMD devices report these capabilities.
2024-03-21 15:43:13 -04:00
Translation Updater 10b02e11d0 Update translations from Crowdin 2024-03-12 18:11:06 +00:00
Vainock 7ae66c72fd Update translations from Crowdin 2024-02-28 14:20:05 -05:00
Kurt Kartaltepe e1b4c026df obs-qsv11: Disable texture encoder on linux
After adding proper adapter enumeration the linux code ends up entering
the texture encoding paths, but these paths are not correctly
implemented on linux yet.

fixes #10221
2024-02-09 20:19:55 -05:00
Translation Updater ac484a066f Update translations from Crowdin 2024-01-29 20:47:38 +00:00
Kurt Kartaltepe 14f068a6b2 obs-qsv11: Use the new gs_enum_adapters 2024-01-27 17:51:33 -06:00
Ryan Foster 2874b8f1cc obs-qsv11: Use 2 tile columns in QSV AV1 for 4K+
When resolution is 4K or higher, use 2 tile columns for QSV AV1.
2024-01-23 17:31:31 -05:00
Rodney 0510d673d3 obs-qsv11: Add ROI support 2024-01-11 13:36:35 +01:00
PatTheMav eae5cc1e38 plugins: Update CMake formatting with manual format choices 2023-12-19 17:59:44 -05:00
Translation Updater f674d17168 Update translations from Crowdin 2023-12-05 22:04:31 +00:00
Ryan Foster 20ffdda89a obs-qsv11: Migrate target usage settings
Calling update_targetusage in update_params only updates the setting
when an encoder session is initialized. Calling update_targetusage in
rate_control_modified, like update_latency and update_enhancements, will
update the setting when the Settings window is loaded. This will cause
the updated setting to be reflected in the UI.
2023-10-28 15:45:53 -04:00
Ryan Foster b29a44a67d obs-qsv11: Log more QSV settings
QSV logging was missing many of its settings. Let's fix that.
2023-10-17 22:36:22 -04:00
Translation Updater 0d450a34a0 Update translations from Crowdin 2023-10-10 13:34:41 +00:00
Ryan Foster 0866688953 obs-qsv11: Use translatable strings for target usage
For Target Usage, instead of doing string comparisons against long
descriptive strings, use translatable strings for descriptive UI text
and simple designations for values used for comparisons and storage.
This is similar to what we do for NVENC Presets.
2023-10-04 16:22:24 -04:00
Ryan Foster 9b1d6032e3 obs-qsv11: Remove D3D9 fallback
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit. As far as I can tell, this code was mostly
for Windows 7/8/8.1 and it was part of the initial implementation. It
should no longer be needed.
2023-10-04 15:24:56 -04:00
Ryan Foster 53dee8f990 obs-qsv11: Remove D3D9 allocator
On Windows 10 and up, D3D11 should never fail, so the D3D9 code should
no longer be possible to hit and should no longer be needed.

Revert "obs-qsv11: Use d3d9 allocator on Win7"

This reverts commit b276b1633e.
2023-10-04 15:24:56 -04:00
Kurt Kartaltepe 9d4b916248 obs-qsv11: Redo session data releasing for Linux
This reverts the changes to Windows where Release() was called every
time, since we need share a single DX context across multiple encoders.

Instead introduce a ReleaseSessionData() function and some platform
specific session data that will be passed to it. We use this to track
the VA-API display and fd to release them at the right time. Leaking
displays will also lead to cache pollution in the intel-media-driver
crashing users so we cannot do that.

fixes #9611
2023-09-29 11:56:53 -04:00
Neal Gompa 63f3b0d46c obs-qsv11: Add license declaration file 2023-09-19 13:35:49 -04:00
Ryan Foster 03b70f0672 obs-qsv11: Fix unusual CBR bitrate issues
For some reason, using MFX_SCENARIO_GAME_STREAMING causes the keyframe
quants to be higher than other frames, which is not desirable. In turn,
this causes bitrate to be higher than the target bitrate for a sustained
period of time after each keyframe.

Not setting the scenario removes this behavior and returns CBR to
somewhat reasonable levels of consistency.

Co-authored by: Chris (Flaeri) <flaeri@otterbro.com>
2023-09-18 13:04:04 -04:00
gxalpha e46c68726e obs-qsv11: Fix target usage migration string comparisons
Fixes problems with the astrcmpi logic, as well as a typo that said
"vertfast" instead "veryfast".
Also makes the method a void because it always returns true and isn't
checked anyways.
2023-09-16 14:33:09 -07:00
Kurt Kartaltepe 543be8cf29 obs-qsv11: Ensure default devices are Intel devices 2023-09-05 15:34:37 -04:00
Richard Stanway d3ab68c5ca plugins: Quote program paths used in os_process_pipe_create
These end up being passed to CreateProcessW, so paths with spaces in the
name may be open to misinterpretation by the OS.
2023-08-26 16:44:53 -07:00
Kurt Kartaltepe 8e7b697447 obs-qsv11: Fixup session releasing for Linux 2023-08-26 16:40:46 -07:00
Kurt Kartaltepe 368082d6c0 obs-qsv11: Use device enumeration for choosing DRM device
Trying to use the display server as the QSV device was found to be
generally wrong in beta, so instead lets save defaults from the earlier
device enumeration similar to obs-ffmpeg-vaapi which is known to work
well.
2023-08-26 16:40:46 -07:00
Kurt Kartaltepe fc6a15e13a obs-qsv11: Mark internal functions static 2023-08-26 16:40:46 -07:00
Richard Stanway 609b1ab011 obs-qsv11: Fix crash in QSV test process
The code assumed MFXCreateSession would always succeed, but it fails on
systems with no QSV implementations, causing a crash when we call
MFXClose later. Additional success checks for the other API calls were
also added.
2023-08-18 17:55:00 -07:00
Kurt Kartaltepe 32c07929b0 obs-qsv11: Drop Windows guards on LowPower settings
Setting AdaptiveCQM to ON when LowPower is OFF crashes the
intel-oneapi-gpu implementation on Linux when using the AV1 encoder.
But using the same LowPower settings as Windows works so lets drop the
current guards.
2023-08-17 10:27:16 -04:00
Kurt Kartaltepe b6b8f5b80a obs-qsv11: Fix VPL initialization on intel-mediaSDK
VPL does not have a consistent initialization process for the various
backends it dispatches to. So this resolves the new VPL dispatcher
failing to initialize the video session when it dispatches to
intel-mediaSDK backend. On the oneVPL-intel-gpu backend VA-API sessions
are correctly initialized so this wasnt noticed when tested on newer
hardware.
2023-08-16 15:40:02 -04:00
Kurt Kartaltepe 4d3f9323b5 obs-qsv11: Fix InitParams low power fallback 2023-08-16 15:40:02 -04:00
Translation Updater ecf914dd67 Update translations from Crowdin 2023-08-13 14:09:15 +00:00
Ryan Foster 046560eadc obs-qsv11: Fix adapter enumeration in test app
MFXEnumImplementations expects the adapter index to be within a range of
valid Intel adapters produced by MFXLoad and the config filter. If a
system has one non-Intel high performance GPU and one Intel iGPU, OBS
and the test app will see the Intel iGPU as index 1 due to high
performance hints, but MFXEnumImplementations will expect only one valid
index, 0. In this scenario, passing a value of 1 to
MFXEnumImplementations will cause it to abort and return
MFX_ERR_NOT_FOUND (Provided index is out of possible range). This causes
subsequent capabilities testing to fail.

To avoid this, let's track how many non-Intel adapters we see and
subtract that number from adapterIdx to only pass valid index to
MFXEnumImplementations.
2023-08-10 11:47:15 -04:00
Gale 550ccc63f2 obs-qsv11: Fix RepeatPPS bug 2023-08-09 18:12:47 -04:00
Gale 5bfc2e5150 obs-qsv11: Remove AVBR, QVBR, and VCM 2023-08-09 18:12:47 -04:00
Gale a790302dbd obs-qsv11: Refactor and tune Look-ahead settings
Enable Low Power Look-ahead (VDENC LA) after Intel Arc Graphics. Change
LA_DEPTH defaults (60 frames for normal latency and 30 frames for low
latency). Keep VME Look-ahead only for certain Intel platforms (ICL,
TGL, ADL, and RPL). Disable VME LA for HEVC
2023-08-09 18:12:47 -04:00
Gale 1d95575088 obs-qsv11: Update Target Usage options
Update target usage setting names from legacy names to VPL names.
2023-08-09 18:12:47 -04:00
Gale c9fd128d74 obs-qsv11: Fix bitstream bug
Fix InitBufferSize and BufferSize bug: change Bit to Byte.
2023-08-09 18:12:47 -04:00
Gale 6533b3e138 obs-qsv11: Adjust Gop and keyint_sec parameters
* Change GopPicSize default to 240
 * Remove GopOptFlag
 * Change keyint_sec default from 3 to 0
 * Reduce keyint_sec minimum value from 1 to 0 (for auto)
2023-08-09 18:12:47 -04:00
Gale 6dada921c9 obs-qsv11: Adjust Subjective Video Enhancements
Disable MBBRC (macro block level bitrate control) because it can reduce
objective quality metrics like VMAF.

Use AdaptiveCQM for CBR and VBR.
2023-08-09 18:12:47 -04:00
Gale 99c456b777 obs-qsv11: Add AV1 meta data
Enable content light meta data over the AV1 stream.
2023-08-09 18:12:47 -04:00
Gale 5b6967c359 obs-qsv11: Improve AV1 quality parameters
Enable B-frames for AV1 for Intel Arc Graphics and Meteor Lake Platform.
2023-08-09 18:12:47 -04:00
Gale 61a3e4365b obs-qsv11: Remove MSDK headers 2023-08-07 13:23:26 -04:00
Gale dbbbcd8c57 obs-qsv11: Add VPL changes 2023-08-07 13:23:26 -04:00
Norihiro Kamae 9ca55eea43 obs-qsv11: Downgrade minimum required CMake version 2023-07-29 16:07:54 -07:00