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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions va/va.h
Original file line number Diff line number Diff line change
Expand Up @@ -3584,6 +3584,11 @@ typedef struct _VAPictureH264 {
#define VA_PICTURE_H264_BOTTOM_FIELD 0x00000004
#define VA_PICTURE_H264_SHORT_TERM_REFERENCE 0x00000008
#define VA_PICTURE_H264_LONG_TERM_REFERENCE 0x00000010
/** \brief Non existing picture
* 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.


/** H.264 Picture Parameter Buffer */
/*
Expand Down