Skip to content

feat: encode H.264 and H.265 temporal layers with VA-API - #381

Merged
devopvoid merged 7 commits into
mainfrom
feat/vaapi-h26x-temporal-layers
Oct 15, 2026
Merged

devopvoid merged 7 commits into
mainfrom
feat/vaapi-h26x-temporal-layers

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

The VA-API H.264 and H.265 encoders take L1T2 and L1T3 too. H.265 carries the temporal id in its NAL units and keeps only lower layer pictures in its reference picture sets; H.264 leaves the top layer unreferenced, allows gaps in frame_num and reorders the reference list. Each layer gets its own rate control only where the driver has one that works (not H.264: Intel has none, AMD overshoots with it). The H.264 encoder now uses the shared VaapiEncodeSession.

Builds on #380, which this branch contains; merge it after #379 and #380.

The VA-API AV1 encoder now takes L1T2 and L1T3, with WebRTC's reference
structure and a rate control for each layer, rather than leaving them to
libaom. A frame it cannot encode now falls back to libaom.
The VA-API VP9 encoder takes L1T2 and L1T3 too, which Intel GPUs encode,
in error resilient mode and with the VP9 information of flexible mode, as
libvpx does. The AV1 and VP9 encoders share the layer handling.
The VA-API H.264 and H.265 encoders take L1T2 and L1T3 too. H.265 carries
the temporal id in its NAL units and keeps only lower layer pictures in
its reference picture sets; H.264 leaves the top layer unreferenced,
allows gaps in frame_num and reorders the reference list. Each layer gets
its own rate control only where the driver has one that works. The H.264
encoder now uses the shared VaapiEncodeSession.
@devopvoid
devopvoid merged commit 923a4aa into main Oct 15, 2026
10 of 17 checks passed
@devopvoid
devopvoid deleted the feat/vaapi-h26x-temporal-layers branch October 15, 2026 22:37
SendableMetatype added a commit to EduGeyser/webrtc-java that referenced this pull request Oct 18, 2026
Brings in the work upstream added from October 15 to 17: temporal
layers in the VA-API encoders and VP9 spatial layers in the VA-API
decoder (devopvoid#379 to devopvoid#381, devopvoid#383, devopvoid#388); a standalone voice activity
detector, and checks against using a disposed one (devopvoid#394); the removal
of Logging.logThreads (devopvoid#395); upstream's 0.20.0 release and its release
workflow changes (devopvoid#391 to devopvoid#393); and docs (devopvoid#378, devopvoid#382, devopvoid#384 to devopvoid#386,
devopvoid#389, devopvoid#390).

Fork-side adaptations:
- Logging keeps this fork's design, in which thread IDs and timestamps
  come from system properties read at load time. devopvoid#395's thread IDs that
  are always on and its runtime Logging.logTimestamps are left out. Its
  logging test change, which logs at INFO, is taken.
- The common WebRTC patches of devopvoid#394 are applied on every platform, as
  upstream does. The data channels desktop capture patch joins the patch
  list before it is recorded, so the build record covers it too.
- The data channels variant leaves out the standalone voice activity
  detector, and its test carries the media tag.
- The release workflow stays this fork's Gradle one. Upstream's
  Maven-based split into preparation and tag-scoped publication
  (release-publish.yml and the publish action) is left out, and so is
  its release notes link to jrtc.dev, which documents upstream's
  packages.
- The Maven files stay deleted, and the README and the docs' version
  stay this fork's own.
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