[FFmpeg-cvslog] vulkan/h264: set non-existing flag for invalid gaps

Dave Airlie git at videolan.org
Mon Jun 12 23:15:29 EEST 2023


ffmpeg | branch: master | Dave Airlie <airlied at redhat.com> | Mon Jun 12 14:38:44 2023 +1000| [3b0ed2365c089f9eb9a462805796636edc53ff44] | committer: Lynne

vulkan/h264: set non-existing flag for invalid gaps

This flag is used to indicate to the hw frames in the gaps,
vaapi constructs it from a bunch of implicit API information
around surface ids. vulkan should just send it explicitly.

Reviewed-by: Lynne <dev at lynne.ee>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3b0ed2365c089f9eb9a462805796636edc53ff44
---

 libavcodec/vulkan_h264.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavcodec/vulkan_h264.c b/libavcodec/vulkan_h264.c
index 0548232971..4cfd83fc19 100644
--- a/libavcodec/vulkan_h264.c
+++ b/libavcodec/vulkan_h264.c
@@ -68,7 +68,14 @@ static int vk_h264_fill_pict(AVCodecContext *avctx, H264Picture **ref_src,
             .top_field_flag    = is_field ? !!(picture_structure & PICT_TOP_FIELD)    : 0,
             .bottom_field_flag = is_field ? !!(picture_structure & PICT_BOTTOM_FIELD) : 0,
             .used_for_long_term_reference = pic->reference && pic->long_ref,
-            .is_non_existing = 0,
+            /*
+             * flags.is_non_existing is used to indicate whether the picture is marked as
+             * “non-existing” as defined in section 8.2.5.2 of the ITU-T H.264 Specification;
+             * 8.2.5.2 Decoding process for gaps in frame_num
+             * corresponds to the code in h264_slice.c:h264_field_start,
+             * which sets the invalid_gap flag when decoding.
+             */
+            .is_non_existing = pic->invalid_gap,
         },
     };
 



More information about the ffmpeg-cvslog mailing list