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.
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.
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.
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.
Closesobsproject/obs-studio#1341
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.