From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] avcodec/vvcdec: fix seeking for open GOP Date: Sat, 3 Feb 2024 08:54:46 -0300 Message-ID: <8a476c5d-d37b-49d2-a553-e59ce33b0b5b@gmail.com> (raw) In-Reply-To: <TYSPR06MB643335CF683E01E8EC21AE0AAA412@TYSPR06MB6433.apcprd06.prod.outlook.com> On 2/3/2024 7:34 AM, Nuo Mi wrote: > how to reproduce: > wget https://media.xiph.org/video/derf/y4m/students_cif.y4m > vvencapp --input students_cif.y4m --preset faster --output students.266 > MP4Box -add students.266:fps=30000/1001:par=12:11 -new students.mp4 Can't you do this with ffmpeg? mp4 muxing support was added recently, and we have a parser to find frame boundaries from raw bitstreams. > ffplay testudents.mp4 > --- > libavcodec/vvc/vvc_refs.c | 6 ++++++ > libavcodec/vvc/vvc_refs.h | 1 + > libavcodec/vvc/vvcdec.c | 6 ++++++ > 3 files changed, 13 insertions(+) > > diff --git a/libavcodec/vvc/vvc_refs.c b/libavcodec/vvc/vvc_refs.c > index bf503e429e..e1895d1cca 100644 > --- a/libavcodec/vvc/vvc_refs.c > +++ b/libavcodec/vvc/vvc_refs.c > @@ -80,6 +80,12 @@ void ff_vvc_clear_refs(VVCFrameContext *fc) > VVC_FRAME_FLAG_SHORT_REF | VVC_FRAME_FLAG_LONG_REF); > } > > +void ff_vvc_flush_dpb(VVCFrameContext *fc) > +{ > + for (int i = 0; i < FF_ARRAY_ELEMS(fc->DPB); i++) > + ff_vvc_unref_frame(fc, &fc->DPB[i], ~0); > +} > + > static void free_progress(FFRefStructOpaque unused, void *obj) > { > FrameProgress *p = (FrameProgress *)obj; > diff --git a/libavcodec/vvc/vvc_refs.h b/libavcodec/vvc/vvc_refs.h > index cd3b5f5632..eba4422fb4 100644 > --- a/libavcodec/vvc/vvc_refs.h > +++ b/libavcodec/vvc/vvc_refs.h > @@ -33,6 +33,7 @@ int ff_vvc_frame_rpl(VVCContext *s, VVCFrameContext *fc, SliceContext *sc); > int ff_vvc_slice_rpl(VVCContext *s, VVCFrameContext *fc, SliceContext *sc); > void ff_vvc_unref_frame(VVCFrameContext *fc, VVCFrame *frame, int flags); > void ff_vvc_clear_refs(VVCFrameContext *fc); > +void ff_vvc_flush_dpb(VVCFrameContext *fc); > > typedef enum VVCProgress { > VVC_PROGRESS_MV, > diff --git a/libavcodec/vvc/vvcdec.c b/libavcodec/vvc/vvcdec.c > index 83ee472ce6..1a050600eb 100644 > --- a/libavcodec/vvc/vvcdec.c > +++ b/libavcodec/vvc/vvcdec.c > @@ -922,9 +922,15 @@ static av_cold void vvc_decode_flush(AVCodecContext *avctx) > { > VVCContext *s = avctx->priv_data; > int got_output = 0; > + VVCFrameContext *last; > > while (s->nb_delayed) > wait_delayed_frame(s, NULL, &got_output); > + > + last = get_frame_context(s, s->fcs, s->nb_frames - 1); > + ff_vvc_flush_dpb(last); > + > + s->eos = 1; > } > > static av_cold int vvc_decode_free(AVCodecContext *avctx) _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-02-03 11:54 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-02-03 10:34 Nuo Mi 2024-02-03 11:54 ` James Almer [this message] 2024-02-03 12:17 ` Nuo Mi 2024-02-03 12:21 ` James Almer 2024-02-03 13:19 ` Nuo Mi 2024-02-05 14:16 ` Nuo Mi
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=8a476c5d-d37b-49d2-a553-e59ce33b0b5b@gmail.com \ --to=jamrial@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git