From: Nuo Mi <nuomi2021@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH v3 12/14] vvcdec: add CTU parser Date: Sun, 15 Oct 2023 18:31:50 +0800 Message-ID: <CAFXK13dr7pfgshq1xGXL-WsXg=g1YcdJAA5e8G5r69tCJYEcOg@mail.gmail.com> (raw) In-Reply-To: <AS8P250MB0744CCE7D46520F4F8F5F1F18FD0A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> On Sun, Oct 15, 2023 at 6:16 PM Andreas Rheinhardt < andreas.rheinhardt@outlook.com> wrote: > Nuo Mi: > > --- > > libavcodec/vvc/vvc_ctu.c | 2398 +++++++++++++++++++++++++++++++++++++- > > libavcodec/vvc/vvc_ctu.h | 11 + > > 2 files changed, 2404 insertions(+), 5 deletions(-) > > > > diff --git a/libavcodec/vvc/vvc_ctu.c b/libavcodec/vvc/vvc_ctu.c > > index d46a522a0d..a212d3a44a 100644 > > --- a/libavcodec/vvc/vvc_ctu.c > > +++ b/libavcodec/vvc/vvc_ctu.c > > @@ -22,8 +22,2379 @@ > > ... > > > +static TransformUnit* alloc_tu(VVCFrameContext *fc, CodingUnit *cu) > > +{ > > + TransformUnit *tu; > > + AVBufferRef *buf = av_buffer_pool_get(fc->tu_pool); > > + if (!buf) > > + return NULL; > > + > > + tu = (TransformUnit *)buf->data; > > + tu->next = NULL; > > + tu->buf = buf; > > + > > + if (cu->tus.tail) > > + cu->tus.tail->next = tu; > > + else > > + cu->tus.head = tu; > > + cu->tus.tail = tu; > > + > > + return tu; > > +} > > + > > ... > > > +static CodingUnit* alloc_cu(VVCLocalContext *lc, const int x0, const > int y0) > > +{ > > + VVCFrameContext *fc = lc->fc; > > + const VVCSPS *sps = fc->ps.sps; > > + const VVCPPS *pps = fc->ps.pps; > > + const int rx = x0 >> sps->ctb_log2_size_y; > > + const int ry = y0 >> sps->ctb_log2_size_y; > > + CTU *ctu = fc->tab.ctus + ry * pps->ctb_width + rx; > > + CodingUnit *cu; > > + > > + AVBufferRef *buf = av_buffer_pool_get(fc->cu_pool); > > + if (!buf) > > + return NULL; > > + cu = (CodingUnit *)buf->data; > > + cu->next = NULL; > > + cu->buf = buf; > > Do I see this correctly that the CodingUnits and TransformUnits are not > refcounted to be shared, but only to use the AVBufferPool API? > > Anyway, switching to the (not yet merged) RefStruct pool API simplifies > this (e.g. it will allow to remove the AVBufferRef pointers from the > structures). > Yes. You are right. That's wonderful. I will wait for the API. > > > + > > + if (lc->cu) > > + lc->cu->next = cu; > > + else > > + ctu->cus = cu; > > + lc->cu = cu; > > + > > + return cu; > > +} > > + > > _______________________________________________ > 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". > _______________________________________________ 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:[~2023-10-15 10:32 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20230902160741.19197-1-nuomi2021@gmail.com> 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 02/14] vvcdec: add vvc_data Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 03/14] vvcdec: add parameter parser for sps, pps, ph, sh Nuo Mi 2023-09-05 13:07 ` [FFmpeg-devel] [PATCH v4] " Nuo Mi 2023-10-15 8:54 ` [FFmpeg-devel] [PATCH v3 03/14] " Andreas Rheinhardt 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 04/14] vvcdec: add cabac decoder Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 05/14] vvcdec: add reference management Nuo Mi 2023-10-15 9:45 ` Andreas Rheinhardt 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 06/14] vvcdec: add motion vector decoder Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 07/14] vvcdec: add inter prediction Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 08/14] vvcdec: add inv transform 1d Nuo Mi 2023-10-15 9:49 ` Andreas Rheinhardt 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 09/14] vvcdec: add intra prediction Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 10/14] vvcdec: add LMCS, Deblocking, SAO, and ALF filters Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 11/14] vvcdec: add dsp init and inv transform Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 12/14] vvcdec: add CTU parser Nuo Mi 2023-10-15 10:17 ` Andreas Rheinhardt 2023-10-15 10:31 ` Nuo Mi [this message] 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 13/14] vvcdec: add CTU thread logical Nuo Mi 2023-09-02 16:07 ` [FFmpeg-devel] [PATCH v3 14/14] vvcdec: add full vvc decoder Nuo Mi 2023-09-02 16:14 ` Nuo Mi 2023-09-04 14:28 ` Michael Niedermayer 2023-09-04 14:34 ` Michael Niedermayer 2023-09-05 13:16 ` Nuo Mi 2023-10-15 1:26 ` 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='CAFXK13dr7pfgshq1xGXL-WsXg=g1YcdJAA5e8G5r69tCJYEcOg@mail.gmail.com' \ --to=nuomi2021@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