-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
feat(linux): Add Vulkan video encoder #4603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
neatnoise
wants to merge
28
commits into
LizardByte:master
Choose a base branch
from
neatnoise:vulkan-pr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+1,554
−28
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
e5e3307
Add Vulkan video encoder for Linux
neatnoise 2fed3a6
fix: correct Vulkan VBR rc_mode value from 3 to 4 per Vulkan spec
neatnoise 8f66c60
fix: correct VBR default in web config.html from 3 to 4
neatnoise bb56f0c
feat(linux): improve vulkan encoder, add rgb2nv12 shader
neatnoise 2f5d27e
fix: address review feedback - ordering, translations, remove ifdef g…
neatnoise 24b6521
vulkan: disable SEI/AUD units to match VAAPI behavior
neatnoise 12ee4da
vulkan: optimize encoder frame path
neatnoise 44d63dd
vulkan: use 2x1 horizontal chroma subsampling
neatnoise 9d0e0b8
vulkan: cursor compositing for KMS, 10-bit format support
neatnoise 477f101
vulkan: fix multi-plane DMA-BUF import and chroma subsampling
neatnoise 6c2a6c6
vulkan: add VRAM encoding support to wlgrab, clean up portalgrab and …
neatnoise cfd1040
vulkan: add HDR/P010 support, rename shader to rgb2yuv
neatnoise f228c40
fix(vulkan): enable VBV buffer limit to prevent bitrate excursions
neatnoise 61c0d4b
vulkan: fix VBR bitrate overshoot by clearing rc_min_rate
neatnoise 2dccc85
vulkan: reduce VBR bitrate overshoots
neatnoise 8aa8ef8
refactor: address code smells in vulkan encoder and related files
neatnoise 1c62090
vulkan: revert rc_max_rate cap to match Mar 8 overshoot state
neatnoise 779d5f2
vulkan: remove NO_RC_BUF_LIMIT from h264_vulkan to match Mar 8 state
neatnoise bf7b484
fix: resolve CI lint and test failures for Vulkan encoder
neatnoise 0c115e7
Sort vk_rc keys alphabetically and reorder vulkan/vaapi sections
neatnoise f6f9702
Fix y_invert handling for Vulkan encoder with wlroots GLES2 capture
neatnoise 3dcf7e2
Fix corrupted image (colored boxes) in wlroots Vulkan capture
neatnoise c97a6e4
Build Vulkan shaders at compile time instead of shipping pre-compiled…
neatnoise fd36a50
fix: use Vulkan headers from build-deps, improve portability
neatnoise 0872a09
style: move vulkan.h include to top of file
neatnoise e3cd494
fix: use find_program for shader compiler, fix packaging deps
neatnoise dac503b
fix: cmake-lint errors, clang-format, and alphabetical locale keys
neatnoise 6c55303
fix: cmake-lint E1120 and C0307 in binary_to_c.cmake
neatnoise File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # binary_to_c.cmake - Convert a binary file to a C uint32_t initializer list. | ||
| # Input: SPV_FILE - path to SPIR-V binary | ||
| # Output: OUT_FILE - path to write C initializer (e.g. {0x07230203, ...}) | ||
|
|
||
| file(READ "${SPV_FILE}" data HEX) | ||
| string(LENGTH "${data}" hex_len) | ||
| math(EXPR num_bytes "${hex_len} / 2") | ||
| math(EXPR num_words "${num_bytes} / 4") | ||
| math(EXPR last "${num_words} - 1") | ||
|
|
||
| set(_out "{") | ||
| set(_idx 0) | ||
| while(_idx LESS_EQUAL last) | ||
| math(EXPR off "${_idx} * 8") | ||
| math(EXPR off1 "${off} + 2") | ||
| math(EXPR off2 "${off} + 4") | ||
| math(EXPR off3 "${off} + 6") | ||
| string(SUBSTRING "${data}" ${off} 2 b0) | ||
| string(SUBSTRING "${data}" ${off1} 2 b1) | ||
| string(SUBSTRING "${data}" ${off2} 2 b2) | ||
| string(SUBSTRING "${data}" ${off3} 2 b3) | ||
| # little-endian to uint32_t | ||
| string(APPEND _out "0x${b3}${b2}${b1}${b0}") | ||
| if(NOT _idx EQUAL last) | ||
| string(APPEND _out ",") | ||
| endif() | ||
| math(EXPR _col "(${_idx} + 1) % 8") | ||
| if(_col EQUAL 0) | ||
| string(APPEND _out "\n") | ||
| endif() | ||
| math(EXPR _idx "${_idx} + 1") | ||
| endwhile() | ||
| string(APPEND _out "}\n") | ||
|
|
||
| file(WRITE "${OUT_FILE}" "${_out}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.