feat(encode): native QSV backend — libvpl-sys + qsv.rs (Phases 0-3 of design/native-qsv-encoder.md)

Vendored MIT VPL dispatcher (static, trimmed tree, pin 674d015b/v2.17.0) built
via cmake+bindgen behind new feature 'qsv' (pf-encode + punktfunk-host forward).
qsv.rs: dispatcher session on the capture adapter (LUID-matched), SetHandle
D3D11, AsyncDepth=1/GopRefDist=1/VDEnc/CBR + HRD-off low-latency config,
GetSurfaceForEncode + GPU CopySubresourceRegion input (zero-copy, no readback
path), bounded sync-point poll, in-place reset with teardown escalation, no-IDR
bitrate retarget (Reset + StartNewSequence=OFF), 10-bit P010 HEVC-Main10/AV1,
HDR mastering/CLL SEI-OBU at IDR + BT.2020/PQ VSI, LTR-RFI via mfxExtRefListCtrl
(AMF slot policy port, Query-gated per codec, wire-index FrameOrder pinning).
Dispatch: native-first with ffmpeg fallback + PUNKTFUNK_QSV_FFMPEG hatch;
probes (can_encode_10bit / windows_codec_support / windows_backend_is_probed)
now answer natively for QSV.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 19:34:18 +02:00
parent bbe4380b41
commit 55e7f3fca9
88 changed files with 29515 additions and 16 deletions
+30
View File
@@ -0,0 +1,30 @@
# Thin driver over the vendored Intel VPL tree (vendor/libvpl): build the
# dispatcher as a static archive, nothing else. Replaces upstream's top-level
# CMakeLists.txt (which also wires examples/env/install machinery).
cmake_minimum_required(VERSION 3.13.0)
if(MSVC)
cmake_policy(SET CMP0091 NEW)
endif()
file(STRINGS "vendor/libvpl/version.txt" version_txt)
project(vpl VERSION ${version_txt})
set(BUILD_SHARED_LIBS OFF)
set(BUILD_TESTS OFF)
set(INSTALL_DEV OFF)
set(INSTALL_LIB OFF)
set(INSTALL_EXAMPLES OFF)
# Defines ONEVPL_EXPERIMENTAL inside the dispatcher — must match the bindgen
# flag in build.rs (the D3D11 import API lives behind it).
set(BUILD_EXPERIMENTAL ON)
set(CMAKE_POSITION_INDEPENDENT_CODE true)
# One predictable place for the archive; MSVC multi-config generators still
# append a per-config subdir (Release/) — build.rs searches both.
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR})
# api/ first: it exports API_VERSION_MAJOR/MINOR + the vpl-api interface
# target into this scope, which libvpl/ then consumes (same ordering contract
# as upstream's top-level).
add_subdirectory(vendor/libvpl/api)
add_subdirectory(vendor/libvpl/libvpl)