[FFmpeg-devel] 回复: [PATCH v1 17/19] avcodec/vvc: support fields
Nuo Mi
nuomi2021 at gmail.com
Wed Apr 23 16:54:46 EEST 2025
Hi Andreas,
Thank you for the review.
Hi Jianhua,
Thank you for the patches. I will merge this weekend if there are no
objections.
On Wed, Apr 2, 2025 at 2:11 AM Wu Jianhua <toqsxw at outlook.com> wrote:
> Andreas Rheinhardt <andreas.rheinhardt at outlook.com>:
> > toqsxw at gmail.com:
> >> 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;
> >
> > Does this output the fields separately? Normally, FFmpeg/libavcodec only
> > outputs actual frames and marks these with the AV_FRAME_FLAG_INTERLACED
> > flag if the content is interlaced. AV_FRAME_FLAG_INTERLACED does not
> > mean that it is a single field.
> >
> >- Andreas
>
> The vvc decoder will output the each single fields and need to use the
> filter 'tinterlace' to output the actual frames,
> so I don't need to mark it with AV_FRAME_FLAG_INTERLACED flag, right?
>
> Jianhua
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list