va: Add VA_PICTURE_H264_NON_EXISTING flag#836
Conversation
| * This flag indicates that the picture is marked | ||
| * as “non-existing” (spec section 8.2.5.2) | ||
| */ | ||
| #define VA_PICTURE_H264_NON_EXISTING 0x00000020 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
thanks.
two questions:
- whether it also should be applied to other codec, such as VA_PICTURE_HEVC_XXX
- if application already know it is non_existing, why still provide valid picture_id?
There was a problem hiding this comment.
- 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. - 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_EXISTINGflag be set.
|
Looks like Intel also supports this flag for H264, implemented in Mesa https://gitlab.freedesktop.org/mesa/mesa/-/blob/992ada2f8fb9c5dbafe7f119f4a680df92b144aa/src/intel/vulkan/genX_cmd_video.c?page=2#L1033 but seems not used in intel-media-driver. So it should be useful also for Intel. |
912cb10 to
88dc763
Compare
XinfengZhang
left a comment
There was a problem hiding this comment.
this PR LGTM, but I still prefer that application dont set non_existing frame into libva. application could detect the gaps between frame_num.
then use an existing frame or an empty frame as the non_existing one. to do the concealment. of course, if some HW could detect the non-existing frame and do a HW level concealment , it is another story.
This flag indicates that the picture is marked as “non-existing” (spec section 8.2.5.2) Signed-off-by: David Rosca <david.rosca@amd.com>
88dc763 to
bf81025
Compare
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