Skip to content

Fixes and improvements for AV1 VAAPI encoding#6

Open
cadubentzen wants to merge 3 commits intodiscord:discord-0.0.5from
cadubentzen:vaapi-av1
Open

Fixes and improvements for AV1 VAAPI encoding#6
cadubentzen wants to merge 3 commits intodiscord:discord-0.0.5from
cadubentzen:vaapi-av1

Conversation

@cadubentzen
Copy link
Copy Markdown

@cadubentzen cadubentzen commented Mar 12, 2026

Depends on discord/cros-libva#3

  1. fix division by 0 in predictor
  2. vaapi: cache packed header support in encoder backend
  • Query and cache packed header capabilities at config creation
  • Add packed headers bitmask to VAConfigAttrib during config setup
  • Simplify supports_packed_header to use cached value
  1. av1: implement vaapi encoding improvements
  • Add packed header support for AV1 sequence and frame headers
  • Probe AV1 features before using them
  • Add total_bits tracking to BitWriter for OBU size calculation
  • Improve AV1 predictor with rate control support

With those changes, AV1 VAAPI encoding can work in the Discord client. Tested with:

  • AMD Radeon Pro W7500
  • Lunar Lake (Intel Arc Graphics 130V / 140V)

- Query and cache packed header capabilities at config creation
- Add packed headers bitmask to VAConfigAttrib during config setup
- Simplify supports_packed_header to use cached value
- Add packed header support for AV1 sequence and frame headers
- Probe AV1 features before using them
- Add total_bits tracking to BitWriter for OBU size calculation
- Improve AV1 predictor with rate control support
@cadubentzen
Copy link
Copy Markdown
Author

cc @mikepavone @josh-stratton

Copy link
Copy Markdown

@mikepavone mikepavone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

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.

2 participants