KhronosGroup / KhronosGroup/Vulkan-Docs

vulkan/video: created image width/height vs pictureAccessGranularity

Open
#2,135 2 comments 0 reactions 0 assignees View on GitHub
Video
Dominant language
JavaScript
Stars
3.3k
Forks
549
Avg merge
5d 5h
Merged PRs (30d)
2

Description

Lynne and myself have been debugging a corner case and I think we should get some feedback.

The problem is if you have video output, that is going to be reused as a sampler input using the same VkImage. The problem is if the decode image has a non-aligned height (1080 vs 1088).

Initially we allocated the image and align w/h to pictureAccessGranularity (the nv decoder demo also does this). Now the hw decoders often fill the extra space with garbage, so if you then try to a linear sampling from the image, the last lines can end up corrupted as there is no height value at 1080 to tell he sampler to ignore samples outside it.

We've solved this by ignoring pictureAccessGranularity and having the driver figure it out internally. If you ask for 1920x1080 decode, the driver will scale up the internal storage to 1088, but the user w/h will be used for the sampler.

Now we want to make sure this is correct behaviour, and maybe @zlatinski can fix the nv decoder to do that if it is, or if this is against the spec, we have a bigger problem to fix.

Contributor guide

Open the contributing guide

Research direction

No repository file or test is named. Start by reviewing the Vulkan video decode requirements for pictureAccessGranularity and the created image extent when the same VkImage is sampled, then compare the behavior described with the referenced NVIDIA decoder demo. Done means the specification gives an unambiguous answer and identifies whether the decoder guidance or specification needs updating.

Written by the indexing model from the issue text.

Assessment

Domain
api, computer-graphics
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.