[FFmpeg-devel] [PATCH v1 17/19] avcodec/vvc: support fields

toqsxw at gmail.com toqsxw at gmail.com
Tue Apr 1 20:16:14 EEST 2025


From: Wu Jianhua <toqsxw at outlook.com>

passed files:
    FIELD_A_Panasonic_4.bit
    FIELD_B_Panasonic_2.bit

Signed-off-by: Wu Jianhua <toqsxw at outlook.com>
---
 libavcodec/vvc/refs.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavcodec/vvc/refs.c b/libavcodec/vvc/refs.c
index cfbc2977c0..79967b77d3 100644
--- a/libavcodec/vvc/refs.c
+++ b/libavcodec/vvc/refs.c
@@ -160,6 +160,14 @@ static VVCFrame *alloc_frame(VVCContext *s, VVCFrameContext *fc)
         frame->ref_width   = pps->r->pps_pic_width_in_luma_samples  - win->left_offset   - win->right_offset;
         frame->ref_height  = pps->r->pps_pic_height_in_luma_samples - win->bottom_offset - win->top_offset;
 
+        if (fc->sei.frame_field_info.present) {
+            if (fc->sei.frame_field_info.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD)
+                frame->frame->flags |= AV_FRAME_FLAG_TOP_FIELD_FIRST;
+            if (fc->sei.frame_field_info.picture_struct == AV_PICTURE_STRUCTURE_TOP_FIELD ||
+                fc->sei.frame_field_info.picture_struct == AV_PICTURE_STRUCTURE_BOTTOM_FIELD)
+                frame->frame->flags |= AV_FRAME_FLAG_INTERLACED;
+        }
+
         frame->progress = alloc_progress();
         if (!frame->progress)
             goto fail;
-- 
2.44.0.windows.1



More information about the ffmpeg-devel mailing list