From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 03/14] vvcdec: add parameter parser for sps, pps, ph, sh
Date: Sun, 15 Oct 2023 10:54:54 +0200
Message-ID: <AS8P250MB074416DF8856F31E90E17EB18FD0A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <TYSPR06MB64338039F706C6D856EDF144AAEBA@TYSPR06MB6433.apcprd06.prod.outlook.com>
Nuo Mi:
> ---
> libavcodec/vvc/Makefile | 3 +-
> libavcodec/vvc/vvc_ps.c | 1325 +++++++++++++++++++++++++++++++++++++++
> libavcodec/vvc/vvc_ps.h | 274 ++++++++
> libavcodec/vvc/vvcdec.h | 4 +
> 4 files changed, 1605 insertions(+), 1 deletion(-)
> create mode 100644 libavcodec/vvc/vvc_ps.c
> create mode 100644 libavcodec/vvc/vvc_ps.h
>
> diff --git a/libavcodec/vvc/Makefile b/libavcodec/vvc/Makefile
> index 104b17db29..3ea430f61a 100644
> --- a/libavcodec/vvc/Makefile
> +++ b/libavcodec/vvc/Makefile
> @@ -2,4 +2,5 @@ clean::
> $(RM) $(CLEANSUFFIXES:%=libavcodec/vvc/%)
>
> OBJS-$(CONFIG_VVC_DECODER) += vvc/vvcdec.o \
> - vvc/vvc_data.o
> + vvc/vvc_data.o \
> + vvc/vvc_ps.o
> diff --git a/libavcodec/vvc/vvc_ps.c b/libavcodec/vvc/vvc_ps.c
> new file mode 100644
> index 0000000000..c180a401f0
> --- /dev/null
> +++ b/libavcodec/vvc/vvc_ps.c
> @@ -0,0 +1,1325 @@
> +/*
> + * VVC parameter set parser
> + *
> + * Copyright (C) 2023 Nuo Mi
> + * Copyright (C) 2022 Xu Mu
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2.1 of the License, or (at your option) any later version.
> + *
> + * FFmpeg is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with FFmpeg; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +#include "libavcodec/cbs_h266.h"
> +#include "libavutil/imgutils.h"
> +#include "vvc_data.h"
> +#include "vvc_ps.h"
> +#include "vvcdec.h"
> +
> +
> +typedef void (*free_fn)(uint8_t *data);
> +
> +static void ps_free(void *opaque, uint8_t *data)
> +{
> + free_fn free = (free_fn)opaque;
> +
> + free(data);
> + av_freep(&data);
> +}
> +
> +static AVBufferRef* ps_alloc(size_t size, free_fn free)
> +{
> + AVBufferRef *buf;
> + uint8_t *data = av_mallocz(size);
> +
> + if (!data)
> + return NULL;
> +
> + buf = av_buffer_create(data, size, ps_free, free, 0);
> + if (!buf)
> + av_freep(&data);
> +
> + return buf;
> +}
All this should be replaced by RefStruct. You will have to partially
replace it anyway, because CBS has been ported to RefStruct.
- Andreas
_______________________________________________
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 8:53 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 ` Andreas Rheinhardt [this message]
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
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=AS8P250MB074416DF8856F31E90E17EB18FD0A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM \
--to=andreas.rheinhardt@outlook.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