Skip to content
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

va: Add encoding tuning mode #796

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

nowrep
Copy link

@nowrep nowrep commented Feb 7, 2024

This provides a hint to driver about the requested encode tuning in addition to quality level number. It can be used by hardware encoders that supports low latency encoding as a special mode instead of setting the lowest quality level.

The tuning modes matches Vulkan VkVideoEncodeTuningModeKHR, except lossless which I don't think makes sense here.

Motivation is AMD VCN encoder which has low latency mode that should be enabled for usecases like realtime game streaming, and it works with all presets (quality levels), not only with the fastest preset.

@DemiMarie
Copy link

This provides a hint to driver about the requested encode tuning in addition to quality level number. It can be used by hardware encoders that supports low latency encoding as a special mode instead of setting the lowest quality level.

The tuning modes matches Vulkan VkVideoEncodeTuningModeKHR, except lossless which I don't think makes sense here.

So there are two specific cases I can think of:

  1. The encoding is happening in real-time, so the hardware must guarantee that it can keep up with the input stream.
  2. Lossless encoding is needed, perhaps because the file will later be decompressed and re-encoded offline to a quality level that would not be possible with real-time lossy encoding.

@XinfengZhang
Copy link
Contributor

when we are talking about low latency, there are several perspectives, such as:
mini gop structure , whether some frame need to be hold
time consumption for one frame. and it is actually related with frequency logic.

looks it is not fully related with encoding tools

va/va.h Outdated Show resolved Hide resolved
@nowrep
Copy link
Author

nowrep commented Mar 12, 2024

time consumption for one frame. and it is actually related with frequency logic.

Yes, latency here meaning the time it takes to encode one frame.

@XinfengZhang
Copy link
Contributor

time consumption for one frame. and it is actually related with frequency logic.

Yes, latency here meaning the time it takes to encode one frame.

@XinfengZhang
Copy link
Contributor

Yes, latency here meaning the time it takes to encode one frame.

it means that backend driver need communication with Pcode...

@XinfengZhang
Copy link
Contributor

there are 3 quality/perf related control in vulkan, "usage" "content" "tuning" , I am wondering how to map them with quality level and tuning ...
seems it is series new interface.

This provides a hint to driver about the requested encode tuning
in addition to quality level number. It can be used by hardware
encoders that supports low latency encoding as a special mode instead
of setting the lowest quality level.
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.

None yet

3 participants