VAAPI HEVC Main10 hardware depth encoding example #5597
Merged
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.
High level overview
Add link in "Community Projects" section pointing to realsense-depth-to-vaapi-hevc10.
The example is added in the middle, just after realsense-ir-to-vaapi-h264, where it fits best logically.
The project
realsense-depth-to-vaapi-hevc10
The warning - the repository itself warns about using video codec for depth map encoding, and points to HEVC 3D extension reference software encoder.
The project is example of hardware encoding D400 depth stream to HEVC Main10 (10 bit) profile using VAAPI (at least Kaby Lake).
This is a purely hardware based pipeline (no depth processing on the host).
The encoding
The encoding takes advantage of:
Depth Units
may be used to control precision/range trade-offThe P010LE has data only in 10 MSB, zeroes in 6 LSB (ignored values).
Realsense
Depth Units
control precision/range trade-off. We are losing 6 bits of precision in the process of encoding. Example trade-offs (with current production firmware):For range: 65472 in binary is 10 ones followed by 6 zeroes.
For precision: we discard 6 bits of data (64 times worse precision than set in
Depth Units
).Rationale
Depth encoding with video codec will be far from perfect, with possible artifacts. Nonetheless this pipeline allows real-time encoding practically using no CPU resources. The data may be streamed using low bandwidth wireless connection.