Skip to content

fix: write the H.264 and H.265 headers for VA-API drivers that need them - #371

Merged
devopvoid merged 2 commits into
mainfrom
fix/vaapi-packed-headers
Oct 15, 2026
Merged

devopvoid merged 2 commits into
mainfrom
fix/vaapi-packed-headers

Conversation

@devopvoid

@devopvoid devopvoid commented Oct 14, 2026 •

Copy link
Copy Markdown
Owner

Intel's iHD driver writes no parameter sets or slice headers, so VA-API H.264 fell back to software and H.265 failed. Both encoders now write these headers and pass them to the driver as packed headers.

Also fixes H.265 on real GPUs:

  • low-delay B instead of P-frames on Intel
  • diff_cu_qp_delta_depth set to match iHD's per-block QP
  • coded size aligned to 16 and cropped through the SPS, for AMD/Mesa

VA-API H.265 encoding no longer needs webrtc.hardware.vaapiExperimental.

@devopvoid
devopvoid force-pushed the fix/vaapi-packed-headers branch from 08b8b86 to c2ed103 Compare October 14, 2026 23:04
Alex added 2 commits October 15, 2026 01:08
Intel's iHD driver writes no parameter sets or slice headers, so the encoders
now write them and pass them as packed headers. H.265 also uses low-delay B
frames on Intel, the QP depth iHD expects, and a 16-aligned coded size cropped
through the SPS for Mesa.
webrtc.hardware.vaapiExperimental now only turns on VA-API decoding.
@devopvoid
devopvoid force-pushed the fix/vaapi-packed-headers branch from c2ed103 to 689bdc0 Compare October 14, 2026 23:08
@devopvoid
devopvoid added this pull request to stack #373 October 14, 2026 23:45
@devopvoid
devopvoid merged commit 79ccd51 into main Oct 15, 2026
25 checks passed
@devopvoid
devopvoid deleted the fix/vaapi-packed-headers branch October 15, 2026 14:09
SendableMetatype added a commit to EduGeyser/webrtc-java that referenced this pull request Oct 15, 2026
Brings in the work upstream added from October 11 to 15: hardware video
codecs on every platform, through Media Foundation, VideoToolbox, VA-API
and NVDEC, with WebRTC built with H.265 (devopvoid#346 to devopvoid#348, devopvoid#352, devopvoid#353, devopvoid#356,
devopvoid#359, devopvoid#371 to devopvoid#377); HEVC and AV1 decoding in the media player, with
dav1d and Vulkan Video (devopvoid#331, devopvoid#345); encoded frame injectors (devopvoid#365);
receiver source changes and audio packet infos (devopvoid#366); audio codec
factories (devopvoid#340); network thread observers called on a callback thread
(devopvoid#364); screen capture with ScreenCaptureKit (devopvoid#354); Windows audio
devices that mix more than two channels (devopvoid#358); autoninja (devopvoid#357); and
the release channels of the docs site (devopvoid#361).

Fork-side adaptations:
- The factory keeps the CreatePeerConnectionFactory overload without a
  worker thread, and still switches device capture on the network
  thread. devopvoid#355 copies WebRTC's factory setup and has the audio module
  learn a worker thread, which only matters for a worker thread distinct
  from the network thread, and WebRTC is removing those. The audio codec
  factories and hardware codec switches of devopvoid#340 and devopvoid#359 go to that
  overload.
- WebRTC stays on a commit on main, so the move to branch 8059 (devopvoid#360)
  and its fixed clang package are left out.
- The data channels variant builds WebRTC without H.265 and without the
  extra targets, leaves out the audio codec factory bindings and
  addTransceiverOfType, and skips the new tests that need audio or
  video.
- dav1d is built against the sysroot on native Linux builds as well, as
  FFmpeg is. CI installs Meson for the full variant only, checks out the
  dav1d submodule, and adds its commit to the FFmpeg cache key. The
  fork's Windows SDK step stays, without upstream's second one.
- The release workflow records the docs' version in the tagged commit,
  as upstream's now does. The docs site still builds from main, since
  this fork publishes none.
- The Maven files stay deleted: Jetty is bumped in the version catalog,
  and the docs lockfile takes upstream's bumps on top of the fork's
  newer VitePress.
- The media module's README builds with Gradle.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant