27 Commits

Author SHA1 Message Date
Shlee
dc4de4db11 obs-qsv11: Fix memory leaks
Closes obsproject/obs-studio#3298
2021-11-02 05:57:01 -07:00
Lin
f4a76f9daa obs-qsv11: Fix bframe=0 not working
Fixes obsproject/obs-studio#3979.
2021-01-11 11:52:07 -08:00
brittneysclark
28af453320 obs-qsv11: Enable VDEnc on ICL+
Enable AVC VDEnc (fixed function encode) on ICL+
2020-07-08 20:24:27 -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
45df89ef93 obs-qsv11: Enable VDEnc on ICL+
Enable AVC VDEnc (fixed function encode) on ICL+
2020-05-16 05:29: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
skyboy
0c87670ee8 obs-qsv11: Fix QuickSync LA_ICQ encoder settings 2020-03-28 07:31:22 -04: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
brittneysclark
00c06446d7 obs-qsv: Remove check for AsyncDepth in InitParams
AsyncDepth = 1 does not mean low latency so we can use default
MaxDecFrameBuffering
2019-07-19 02:33:01 -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
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
Colin Edwards
4f6d167951 obs-qsv11: Fix crash on destructor after init failure 2019-02-28 20:11:21 -06:00
Colin Edwards
d8f254550f obs-qsv11: Don't try to free non allocated array on destruction 2019-02-28 17:56:12 -06: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
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
Dmitry-Me
ddb239faa1 obs-qsv11: Initialize member variable 2018-08-06 17:18:59 +03: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
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
Alexandre Biny
b276b1633e obs-qsv11: Use d3d9 allocator on Win7
Use a d3d9 device and allocator to encode in QSV.

This fixes a random crash that could only happen on Windows 7. The QSV
Deviced returned a DEVICE_FAILURE after a random amount of time with the
old method.

This fix is totally based on Shinck's QSVHelper.exe patch for OBS
Classic (see
https://obsproject.com/forum/threads/0-633b-qsvhelper-exe-was-killed-encode-failed.19230/page-3#post-161984
for more information)

This is more like a proof of concept, but that fix is currently stable
and tested more than 50 hours, with a single session of +14 hours.

That commit doesn't respect all OBS Guidelines. It is currently
recommended to wait for a more "cleaner" implementation.
2016-12-23 07:49:12 -08:00
jp9000
a39cde9d08 obs-qsv11: Fix win7 crash when fake monitor isn't forced
When using QSV is used on a windows 7 machine with a dedicated card, you
have to fake a monitor connection to your Intel graphics to be able to
use QSV.  If you do not, the initialization will fail with an error.
The error for that situation is not handled properly, and a variable
will be used while null.  Instead, the function should safely return
after that error is received.

Also, do not call ClearData in the destructor unless QSV has been
properly initialized (if m_pmfxENC is null).
2016-04-19 12:29:50 -07:00
Seung-Woo Kim
3e4bcf06bc obs-qsv11: Add native obs-studio QSV encoder 2016-04-19 08:29:22 -07:00