45 Commits

Author SHA1 Message Date
derrod
1fdaf121e6 obs-qsv11: Do not apply limits if CPU generation is unknown
Users with AMD CPUs and Intel dGPUs (Arc) would find that QSV is
restricted to 1200p and missing features due to to this check failing.

Once the encoder gets rewritten for AV1 support we will fix this
properly.
2022-08-17 05:42:08 -07:00
jpark37
62165b42d7 obs-qsv11: Replace CRITICAL_SECTION with SRWLOCK
Fixes initialize/destroy pattern; also slightly more performant.
2022-08-16 07:38:43 -07:00
jpark37
7406f04851 obs-qsv11: Prevent 8-bit HDR, and 10-bit anything
Don't want to silently generate lossy video.
2022-08-16 07:38:07 -07:00
Vainock
eb06594381 Use property suffixes for units everywhere 2022-07-22 08:24:51 -04:00
Norihiro Kamae
7e3656ab33 plugins: Cleanup unused-parameters
- Remove unnecessary UNUSED_PARAMETER
- Add OBS_UNUSED attribute to unused parameters
- Also removes unused variables
2022-07-19 11:01:00 -04:00
Norihiro Kamae
56c502b254 obs-qsv11: Fix timestamp for fractional frame rate
This commit rounds the timestamp to the integer multiple of fps_den.
Prior to this change, since the timestamp in MFX is defined in units of
90 kHz, timestamps for 60000/1001 fps is not accurately expressed. Also
the encoder sometimes returns the decode time stamp slightly off.
Hence, the timestamp in OBS becomes not a multiple of fps_den after
converting back from the timestamp in MFX.
2022-07-14 19:20:40 -04:00
Christine Lin
3995326647 obs-qsv11: Remove Intel discrete device ID checking
As Intel continues to add discrete graphics cards, maintaining a long
list of discrete device IDs to check against isn't wise. When i+I
platforms are detected, default to integrated graphics.
2021-11-10 20:15:52 -08:00
Richard Stanway
1444ead812 Revert "obs-ffmpeg, obs-qsv11: Disable dynamic bitrate support"
This reverts commit 1b29bfc88419515fa423804fac4411794c4df745.
2021-08-23 18:26:37 -07:00
Richard Stanway
1b29bfc884 obs-ffmpeg, obs-qsv11: Disable dynamic bitrate support
Unfortunately these encoders tend to crash or freeze after after
multiple bitrate changes. Users with dynamic bitrate enabled
experience a random encoder freeze which manifests as OBS dropping to
0kb/sec and disconnecting and it's not at all obvious that dynamic
bitrate is the cause. Disable it for now until we can figure out if
there is any workaround or bug on our end.
2021-08-20 14:51:16 -07:00
brittneysclark
d04e167ed0 obs-qsv11: Fix bug mapping old qsv settings to new
Fix for an issue found where new "Latency" and "Subjective Video
Enhancement" options where always using default settings even after
being changed in UI. This issue was introduced when mapping old QSV
settings to new ones.
2020-07-27 06:12:03 -07:00
brittneysclark
17f013d0d0 obs-qsv11: Simplify UI quality parameters
Combine MBBRC and CQM parameters into a perceptual video
enhancement box
2020-07-08 20:24:27 -07:00
brittneysclark
8e0e2dd3e9 obs-qsv11: Add latency mode to QSV settings
Simplify UI options by combining LookAhead Depth and Async Depth into
latency mode option. Ultra-low, low, and normal will set these two
encode parameters accordingly.
2020-07-08 20:24:24 -07:00
cmlin2
477199ef2c obs-qsv11: Set preference for encode to iGPU in case of i+i 2020-07-08 12:03:22 -07:00
jp9000
72a94cb6f5 Revert "Merge pull request #2993 from brittneysclark/enable_vdenc"
This reverts commit 636f0bfdfa81f843a629ec2494e2657dbeab5742, reversing
changes made to b9ea45e4982f4ec26b3f115f0e625289a8f26ae4.
2020-06-01 13:40:18 -07:00
brittneysclark
d0a539341b obs-qsv11: Simplify UI subjective quality parameters
Combine MMBRC and CQM parameters into a subjective video
enhancement box
2020-05-28 05:32:44 -07:00
brittneysclark
8ba7a8b92b obs-qsv11: Add latency mode to QSV settings
Simplify UI options by combining LookAhead Depth and Async Depth into
latency mode option. Ultra-low, low, and normal will set these two
encode parameters accordingly.
2020-05-16 04:33:20 -07:00
brittneysclark
cc896b6c03 obs-qsv11: Enable QSV texture-based encoding
Enables a pipeline for texture-based encoding with QSV. Utilizes OBS
NV12 output for encode to avoid offloading them from GPU, which will
increase performance. The option to select old QSV pipeline still
remains and will fallback if new pipeline fails.
2020-04-17 09:05:52 -07:00
Daniel Hill
b9ad1ceb64 obs-qsv11: Add all TargetUsage values
Using terminology from FFmpeg reference, implement:
https://www.intel.com/content/dam/www/public/us/en/documents/white-papers/cloud-computing-quicksync-video-ffmpeg-white-paper.pdf
2019-12-15 05:20:49 -08:00
brittneysclark
ffd0bbb1ab obs-qsv11: Enable option for Custom Quantization Matrix
Add the option to enable custom quantization matrix for game streaming
on ICL for better subject quality. Feature is only supported with AVC
high profile, so added function to detect when QSV profile is modified
and hide or show CQM UI option accordingly. Also, increase SPS/PPS
buffer sizes since matrix is stored in SPS/PPS.
2019-10-11 01:10:08 -07:00
jp9000
c5178a5d1e obs-qsv11: Do not enable b-frames on sandy/ivy bridge
B-frames on sandy/ivy bridge do not work, so disable for those
platforms.
2019-08-26 08:13:24 -07:00
jp9000
806ab5a022 libobs: Mark encoders that support dynamic bitrate
(This commit also modifies mac-vth264, obs-ffmpeg, obs-qsv11, and
obs-x264)
2019-08-18 03:14:38 -07:00
brittneysclark
0610bc7570 obs-qsv: Enable high profile for QSV H.264
Changing QSV H.264 default profile from "main" to "high"
2019-07-19 02:51:49 -07:00
brittneysclark
2f62831a96 obs-qsv: Enable LA_CBR as QSV rate control
Allow user to choose look ahead CBR as the rate control method for QSV.
Also, changes look ahead depth default to 15 when used.
2019-07-16 07:46:02 -07:00
brittneysclark
8717a66991 obs-qsv: Enable Content Adaptive Quantization
Allow user to enable Content Adaptive Quantization (MMBRC) if CPU is SKL
or newer
2019-07-13 00:10:16 -07:00
brittneysclark
b675bed90b obs-qsv: Enable B-frames and B-pyramid for encoder
Enable B-Pyramid frames to improve quality for high motion content.
B-pyramid allows a B-frame to choose closer frames for reference which
may have higher correlation.

Adjusts packet priority to avoid dropping referable B-frames

A check has been added to ensure feature is enabled only on platforms
with MSDK API 1.8 or higher - addresses crashing issues.
2019-07-12 23:35:16 -07:00
jp9000
f53df7da64 clang-format: Apply formatting
Code submissions have continually suffered from formatting
inconsistencies that constantly have to be addressed.  Using
clang-format simplifies this by making code formatting more consistent,
and allows automation of the code formatting so that maintainers can
focus more on the code itself instead of code formatting.
2019-06-23 23:49:10 -07:00
Clayton Groeneveld
31b73f8025 UI: Add ability to set properties spinbox suffix 2019-05-02 08:54:14 -07:00
Clayton Groeneveld
1160ee767a UI: Increment bitrates by 50 2019-04-30 06:54:02 -05:00
jp9000
4c7860056e Revert "Merge pull request #1418 from cabirdme/qsv_feature_add"
This reverts commit 3c22cf35c9802240c4775d98d360601ff2b67905, reversing
changes made to c7dab6c92ba7380b0d91f4a34b1f507a512d581b.

This is being reverted due to many people being unable to start up the
QSV encoder with these changes.
2019-03-05 15:21:09 -08:00
jp9000
92cb20e7a2 Revert "obs-qsv: Enable b-pyramid & change packet priority"
This reverts commit 33ff46a10e9c9844737990c567ffe497ef2cbd6f.

This is being reverted due to many people being unable to start up the
QSV encoder with these changes.
2019-03-05 15:20:42 -08:00
brittneysclark
33ff46a10e obs-qsv: Enable b-pyramid & change packet priority
- Enable b-pyramid frames
- Adjust packet priority to avoid dropping referencable B frames

Closes obsproject/obs-studio#1520
2019-01-25 12:13:22 -08:00
Jim
3c22cf35c9
Merge pull request #1418 from cabirdme/qsv_feature_add
obs-qsv: Expose additional QSV encoder settings through GUI
2018-09-16 08:17:12 -07:00
Bird, Christopher
99b8c8390f obs-qsv: enable High Profile for QSV h264
- New QSV Default -> H264 High profile.  Previous Default -> H264 Main profile
2018-09-10 10:23:43 -07:00
Richard Stanway
144d23a9cc
obs-qsv11: Protect context variable in clear_data 2018-08-11 02:57:23 +02:00
Bird, Christopher
58812bc0b3 obs-qsv: Expose additional QSV encoder settings through GUI
- Allow user to change # of B frames. New Default -> 1
- Allow user to enable Content Adaptive Quantization (MBBRC) if CPU is Skylake or newer.
- Allow user to choose LA_CBR as a rate control.
- LA depth: New Default -> 15, only when LA rate control is used.
2018-08-08 10:39:57 -07:00
Bird, Christopher
3a08e858a6 obs-qsv: Allow for multiple QSV encoders
Allow multiple QSV encoders, usefull for live + recorded parallel
sessions.  The first QSV encoder will create a DirectX device and return
a handle / pointer.  Any additional QSV encoder will use that same
pointer to the DirectX device.  We keep track of the number of open
QSV encoders so that we wait to close the DirectX resources after all
encoders are closed.

Closes obsproject/obs-studio#1341
2018-07-18 17:16:01 -07:00
jp9000
e230f77311 obs-qsv11, obs-x264: Allow bframe count overriding
Allows the ability to override bframes (useful for specific protocols)
2017-07-14 12:39:20 -07:00
Richard Stanway
34ee1a87c3
obs-qsv11: Fix SEI crash caused by dangling pointer 2017-05-04 21:44:42 +02:00
Ryan Foster
be98cee2a0 Fix various typos across multiple modules 2017-04-25 22:39:42 -04:00
Richard Stanway
a1083d4252 obs-qsv11: Fix various issues detected by Coverity 2017-02-25 17:18:55 +01:00
jp9000
edfc2bed05 obs-qsv11: Manually mark priority bits for QSV frames
QSV frame priority bits are not being marked correctly; their priorities
are always marked either low or disposable, whereas I-frames should be
marked as highest (3), P-frames should be marked as high (2), and other
frames should be marked as either low or disposable.  This helps ensure
that the correct frames are dropped when frames need to be dropped.
2016-11-14 17:34:46 -08:00
jp9000
c7923bcbe4 obs-qsv11: Add deprecated warning for forced CBR mode
Using the "cbr" parameter is now considered deprecated in favor of using
"rate_control" to set the rate control method.
2016-05-11 13:12:31 -07:00
jp9000
61ab648bac obs-qsv11: Fix QSV rescaling
When using per-encoder rescaling, QSV would overwrite the current
encoder scale value in the get_video_info callback with the base video
width/height instead of using the current encoder width/height.
2016-04-28 16:01:38 -07:00
jp9000
bc38427862 obs-qsv11: Rename encoder 2016-04-23 07:34:12 -07:00
Seung-Woo Kim
3e4bcf06bc obs-qsv11: Add native obs-studio QSV encoder 2016-04-19 08:29:22 -07:00