From: James Almer <jamrial@gmail.com> To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v2 03/14] vvcdec: add sps, pps, sh parser Date: Fri, 7 Jul 2023 13:29:56 -0300 Message-ID: <834be30b-ea57-521f-b13a-70e55e7b9c00@gmail.com> (raw) In-Reply-To: <CAFXK13djvY5UMh7S=qrWBbk-LB-XeC2GL-6fmjiWxEX=xPO5RA@mail.gmail.com> On 7/7/2023 12:48 PM, Nuo Mi wrote: > Hi James, > thank you for the review. > > On Fri, Jul 7, 2023 at 10:28 PM James Almer <jamrial@gmail.com> wrote: > >> On 7/7/2023 11:05 AM, Nuo Mi wrote: >>> --- >>> libavcodec/vvc/Makefile | 4 +- >>> libavcodec/vvc/vvc_data.c | 3295 +++++++++++++++++++++++++++++++++++ >>> libavcodec/vvc/vvc_data.h | 69 + >>> libavcodec/vvc/vvc_ps.c | 3436 +++++++++++++++++++++++++++++++++++++ >>> libavcodec/vvc/vvc_ps.h | 828 +++++++++ >>> libavcodec/vvc/vvcdec.h | 3 + >>> 6 files changed, 7634 insertions(+), 1 deletion(-) >>> create mode 100644 libavcodec/vvc/vvc_data.c >>> create mode 100644 libavcodec/vvc/vvc_data.h >>> create mode 100644 libavcodec/vvc/vvc_ps.c >>> create mode 100644 libavcodec/vvc/vvc_ps.h >> >> I thought the plan for v2 was to use CBS? Hence you waiting until it was >> pushed. > > No. The software decoder depends on frame split, I am waiting for it. :) Why do you need that? You can use the receive_frame() API instead of decode(), and only request new packets after you're done with the last one you got. > >> CBS can store derived values and state, and you can always pass it a >> split AU in a loop if needed. >> > We have many problems when if we use CBS as a parameter parser > 1. The derived value is only needed by the software decoder. like > VVCPH.lmcs_fwd_lut and VVCPPS.column_width. Storing it in the CBS structure > may have performance implications in on other user cases since they never > use it. for example, Metadata rewriter > 2. CBS strictly follows the spec name, making it hard to write a loop like > this > https://github.com/ffvvc/FFmpeg/blob/ae76f43e2e47426544d4dedae1cdc3e16f546458/libavcodec/vvc/vvc_ctu.c#L2136. > We can use a derived variable, but this makes the variable duplicate the > original one. You can store decoder only derived values in a decoder struct, and have CBS store derived values required for header parsing within itself (As is the case with all the relevant fields at the end of H266RawPPS), plus any other that calculated within CBS itself would simplify things for users like the decoder. > 3. There are so many intermediate names in cbs like abc_minus1. If we use > it directly, we may have need to calculate xxx_minus1 + 1 every time. If we > save abc as a derived value. It will be duplicated again. Same thing here. After getting a parsed fragment from CBS, you can derive all the minus/plus values once and store them in decoder only structs, to be used afterwards instead of those in the raw CBS structs. > 4. Using CBS will not save too much code or logic in some cases. Take the > Scaling list as an example, you need a for loop in CBS to read the syntax. > Then you need a duplicated loop in the software decoder to reconstruct the > scaling list. The core gain is to prevent the duplication of all the header parsing code, and have a single point of failure and source of bugs. The h264 and hevc decoders predate CBS, so those were obviously written as standalone modules, but this one doesn't, so ideally we should prevent duplicating huge bitstream parsing functions a third time. Look at AV1, which even if not complete (No software implementation yet) has plenty of logic to derive values and tables CBS doesn't need to care about, but the hwaccel backends (and the eventual software implementation once it's ported from libdav1d) obviously need. > > Again, if Mark agrees and nobody rejects it, I can send out v3 to use it. > > _______________________________________________ >> 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". _______________________________________________ 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-07-07 16:30 UTC|newest] Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20230707140540.10279-1-nuomi2021@gmail.com> 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 01/14] vvcdec: add thread executor Nuo Mi 2023-07-08 21:51 ` Michael Niedermayer 2023-07-10 7:41 ` Nuo Mi 2023-07-16 6:28 ` Nuo Mi 2023-07-17 22:13 ` Michael Niedermayer 2023-07-18 11:53 ` Nuo Mi 2023-07-18 14:55 ` Michael Niedermayer 2023-07-14 22:38 ` Michael Niedermayer 2023-07-16 7:07 ` Nuo Mi 2023-07-19 13:13 ` [FFmpeg-devel] [PATCH v3] " Nuo Mi 2023-07-19 13:19 ` Nuo Mi 2023-08-14 16:46 ` Michael Niedermayer 2023-08-15 14:53 ` Nuo Mi 2023-08-15 14:50 ` [FFmpeg-devel] [PATCH v4] " Nuo Mi 2023-08-16 16:35 ` Michael Niedermayer 2023-08-22 13:34 ` Nuo Mi 2023-08-16 16:42 ` Rémi Denis-Courmont 2023-08-18 15:54 ` James Almer 2023-08-22 12:03 ` Nuo Mi 2023-08-22 12:23 ` James Almer 2023-08-22 12:30 ` Nuo Mi 2023-08-22 12:32 ` James Almer 2023-08-22 13:34 ` Nuo Mi 2023-08-18 16:17 ` James Almer 2023-08-19 13:09 ` James Almer 2023-08-22 12:09 ` Nuo Mi 2023-08-22 12:20 ` Nuo Mi 2023-08-22 13:32 ` [FFmpeg-devel] [PATCH v5] " Nuo Mi 2023-08-28 17:06 ` Michael Niedermayer 2023-08-29 13:07 ` Nuo Mi 2023-08-29 12:59 ` [FFmpeg-devel] [PATCH v6] " Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 02/14] vvcdec: add vvc decoder stub Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 03/14] vvcdec: add sps, pps, sh parser Nuo Mi 2023-07-07 14:28 ` James Almer 2023-07-07 15:48 ` Nuo Mi 2023-07-07 16:29 ` James Almer [this message] 2023-07-10 7:46 ` Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 04/14] vvcdec: add cabac decoder Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 05/14] vvcdec: add reference management Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 06/14] vvcdec: add motion vector decoder Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 07/14] vvcdec: add inter prediction Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 08/14] vvcdec: add inv transform 1d Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 09/14] vvcdec: add intra prediction Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 10/14] vvcdec: add LMCS, Deblocking, SAO, and ALF filters Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 11/14] vvcdec: add dsp init and inv transform Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 12/14] vvcdec: add CTU parser Nuo Mi 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 13/14] vvcdec: add CTU thread logical Nuo Mi 2023-07-08 21:41 ` Michael Niedermayer 2023-07-09 1:04 ` Andreas Rheinhardt 2023-07-10 7:45 ` Nuo Mi 2023-07-10 15:04 ` Rémi Denis-Courmont 2023-07-11 17:28 ` Michael Niedermayer 2023-07-07 14:05 ` [FFmpeg-devel] [PATCH v2 14/14] vvcdec: add full vvc decoder 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=834be30b-ea57-521f-b13a-70e55e7b9c00@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