From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH 4/6] lavc: APV decoder
Date: Mon, 21 Apr 2025 11:09:32 -0300
Message-ID: <600a8c44-00ee-469a-9cfe-d30104185228@gmail.com> (raw)
In-Reply-To: <20250419190712.1265201-5-sw@jkqxz.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 3486 bytes --]
On 4/19/2025 4:07 PM, Mark Thompson wrote:
> ---
> configure | 1 +
> libavcodec/Makefile | 1 +
> libavcodec/allcodecs.c | 1 +
> libavcodec/apv_decode.c | 327 +++++++++++++++++++++++++++++++++++++++
> libavcodec/apv_decode.h | 80 ++++++++++
> libavcodec/apv_dsp.c | 136 ++++++++++++++++
> libavcodec/apv_dsp.h | 37 +++++
> libavcodec/apv_entropy.c | 200 ++++++++++++++++++++++++
> 8 files changed, 783 insertions(+)
> create mode 100644 libavcodec/apv_decode.c
> create mode 100644 libavcodec/apv_decode.h
> create mode 100644 libavcodec/apv_dsp.c
> create mode 100644 libavcodec/apv_dsp.h
> create mode 100644 libavcodec/apv_entropy.c
>
> diff --git a/configure b/configure
> index ca404d2797..ee270b770c 100755
> --- a/configure
> +++ b/configure
> @@ -2935,6 +2935,7 @@ apng_decoder_select="inflate_wrapper"
> apng_encoder_select="deflate_wrapper llvidencdsp"
> aptx_encoder_select="audio_frame_queue"
> aptx_hd_encoder_select="audio_frame_queue"
> +apv_decoder_select="cbs_apv"
> asv1_decoder_select="blockdsp bswapdsp idctdsp"
> asv1_encoder_select="aandcttables bswapdsp fdctdsp pixblockdsp"
> asv2_decoder_select="blockdsp bswapdsp idctdsp"
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index a5f5c4e904..e674671460 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -244,6 +244,7 @@ OBJS-$(CONFIG_APTX_HD_DECODER) += aptxdec.o aptx.o
> OBJS-$(CONFIG_APTX_HD_ENCODER) += aptxenc.o aptx.o
> OBJS-$(CONFIG_APNG_DECODER) += png.o pngdec.o pngdsp.o
> OBJS-$(CONFIG_APNG_ENCODER) += png.o pngenc.o
> +OBJS-$(CONFIG_APV_DECODER) += apv_decode.o apv_entropy.o apv_dsp.o
> OBJS-$(CONFIG_ARBC_DECODER) += arbc.o
> OBJS-$(CONFIG_ARGO_DECODER) += argo.o
> OBJS-$(CONFIG_SSA_DECODER) += assdec.o ass.o
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index f10519617e..09f06c71d6 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -47,6 +47,7 @@ extern const FFCodec ff_anm_decoder;
> extern const FFCodec ff_ansi_decoder;
> extern const FFCodec ff_apng_encoder;
> extern const FFCodec ff_apng_decoder;
> +extern const FFCodec ff_apv_decoder;
> extern const FFCodec ff_arbc_decoder;
> extern const FFCodec ff_argo_decoder;
> extern const FFCodec ff_asv1_encoder;
> diff --git a/libavcodec/apv_decode.c b/libavcodec/apv_decode.c
> new file mode 100644
> index 0000000000..066b5a9735
> --- /dev/null
> +++ b/libavcodec/apv_decode.c
[...]
> +static int apv_decode_tile_component(AVCodecContext *avctx, void *data,
> + int job, int thread)
> +{
> + APVRawFrame *input = data;
> + APVDecodeContext *apv = avctx->priv_data;
> + const CodedBitstreamAPVContext *apv_cbc = apv->cbc->priv_data;
> + const APVDerivedTileInfo *tile_info = &apv_cbc->tile_info;
> +
> + int tile_index = job / apv_cbc->num_comp;
> + int comp_index = job % apv_cbc->num_comp;
> +
> + int sub_w = comp_index == 0 ? 1 : apv_cbc->sub_width_c;
> + int sub_h = comp_index == 0 ? 1 : apv_cbc->sub_height_c;
There's no need for these two in the CBS private context. You can
achieve the same thing using log2_chroma_w and log2_chroma_h from the
AVPixFmtDescriptor for the pixel format.
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]
[-- Attachment #2: Type: text/plain, Size: 251 bytes --]
_______________________________________________
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:[~2025-04-21 14:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-19 19:06 [FFmpeg-devel] [PATCH 0/6] APV support Mark Thompson
2025-04-19 19:06 ` [FFmpeg-devel] [PATCH 1/6] lavc: APV codec ID and descriptor Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 2/6] lavf: APV demuxer Mark Thompson
2025-04-20 16:07 ` Derek Buitenhuis
2025-04-20 16:20 ` James Almer
2025-04-20 16:57 ` Mark Thompson
2025-04-20 18:59 ` James Almer
2025-04-21 0:54 ` Michael Niedermayer
2025-04-21 14:59 ` Mark Thompson
2025-04-21 15:22 ` Andreas Rheinhardt
2025-04-21 21:30 ` Michael Niedermayer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 3/6] lavc/cbs: APV support Mark Thompson
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 4/6] lavc: APV decoder Mark Thompson
2025-04-21 14:09 ` James Almer [this message]
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 5/6] lavc/apv: AVX2 transquant for x86-64 Mark Thompson
2025-04-19 20:34 ` Mark Thompson
2025-04-19 21:16 ` James Almer
2025-04-20 1:48 ` James Almer
2025-04-19 19:07 ` [FFmpeg-devel] [PATCH 6/6] lavc: APV metadata bitstream filter Mark Thompson
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=600a8c44-00ee-469a-9cfe-d30104185228@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