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 VA_PICTURE_H264_NON_EXISTING flag #836

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

Conversation

nowrep
Copy link

@nowrep nowrep commented Sep 25, 2024

This flag indicates that the picture is marked
as “non-existing” (spec section 8.2.5.2)

Mesa impl: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31368

This flag indicates that the picture is marked
as “non-existing” (spec section 8.2.5.2)

Signed-off-by: David Rosca <[email protected]>
* This flag indicates that the picture is marked
* as “non-existing” (spec section 8.2.5.2)
*/
#define VA_PICTURE_H264_NON_EXISTING 0x00000020
Copy link
Contributor

Choose a reason for hiding this comment

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

dose it mean , you still provide the reference picture ID , but mark it as non-existing?
from my understanding, if there are no reference picture ID, it will be non-existing

Copy link
Author

Choose a reason for hiding this comment

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

Yes, picture ID is still provided but marked as non-existing. This is what apps currently do, they provide picture ID but the driver has no way knowing it should be non-existing.

It should have the same meaning as Vulkan is_non_existing: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkVideoDecodeH264DpbSlotInfoKHR.html#_description

Copy link
Contributor

Choose a reason for hiding this comment

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

thanks.
two questions:

  1. whether it also should be applied to other codec, such as VA_PICTURE_HEVC_XXX
  2. if application already know it is non_existing, why still provide valid picture_id?

Copy link
Author

Choose a reason for hiding this comment

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

  1. There is a similar flag for VVC VA_PICTURE_VVC_UNAVAILABLE_REFERENCE. Not sure about other codecs (HEVC), currently AMD only supports this for H264 so I wouldn't be able to verify it works as expected.
  2. Applications (ffmpeg/gstreamer) currently provide valid picture_id in this case, so I think this behavior should not change to not break compatibility with drivers not supporting or ignoring this new flag. So the valid picture_id should be provided and additionally the VA_PICTURE_H264_NON_EXISTING flag be set.

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