Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: James Almer <jamrial@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Subject: Re: [FFmpeg-devel] [PATCH v3 5/5] lavc: implement a Vulkan-based VC-2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths.
Date: Thu, 17 Apr 2025 22:18:36 -0300
Message-ID: <520bf06e-7a5e-4e18-94fc-1c5aff022f1e@gmail.com> (raw)
In-Reply-To: <20250417235543.227108-5-47210458+raphaelthegreat@users.noreply.github.com>


[-- Attachment #1.1.1: Type: text/plain, Size: 2715 bytes --]

On 4/17/2025 8:55 PM, IndecisiveTurtle wrote:
> From: IndecisiveTurtle <geoster3d@gmail.com>
> 
> Performance wise, encoding a 1080p 1-minute video is performed in about 2.5 minutes with the cpu encoder running on my Ryzen 5 4600H, while it takes about 30 seconds on my NVIDIA GTX 1650
> 
> Haar shader has a subgroup optimized variant that applies when configured wavelet depth allows it
> ---
>   configure                                    |   1 +
>   libavcodec/Makefile                          |   3 +
>   libavcodec/allcodecs.c                       |   1 +
>   libavcodec/vc2enc_vulkan.c                   | 959 +++++++++++++++++++
>   libavcodec/vulkan/vc2_dwt_haar.comp          |  82 ++
>   libavcodec/vulkan/vc2_dwt_haar_subgroup.comp |  75 ++
>   libavcodec/vulkan/vc2_dwt_hor_legall.comp    |  82 ++
>   libavcodec/vulkan/vc2_dwt_upload.comp        |  96 ++
>   libavcodec/vulkan/vc2_dwt_ver_legall.comp    |  78 ++
>   libavcodec/vulkan/vc2_encode.comp            | 169 ++++
>   libavcodec/vulkan/vc2_slice_sizes.comp       | 170 ++++
>   11 files changed, 1716 insertions(+)
>   create mode 100644 libavcodec/vc2enc_vulkan.c
>   create mode 100644 libavcodec/vulkan/vc2_dwt_haar.comp
>   create mode 100644 libavcodec/vulkan/vc2_dwt_haar_subgroup.comp
>   create mode 100644 libavcodec/vulkan/vc2_dwt_hor_legall.comp
>   create mode 100644 libavcodec/vulkan/vc2_dwt_upload.comp
>   create mode 100644 libavcodec/vulkan/vc2_dwt_ver_legall.comp
>   create mode 100644 libavcodec/vulkan/vc2_encode.comp
>   create mode 100644 libavcodec/vulkan/vc2_slice_sizes.comp

[...]

> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index f10519617e..054b0d958b 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -365,6 +365,7 @@ extern const FFCodec ff_vc1image_decoder;
>   extern const FFCodec ff_vc1_mmal_decoder;
>   extern const FFCodec ff_vc1_qsv_decoder;
>   extern const FFCodec ff_vc1_v4l2m2m_decoder;
> +extern const FFCodec ff_vc2_vulkan_encoder;

Should be under the software one.

>   extern const FFCodec ff_vc2_encoder;
>   extern const FFCodec ff_vcr1_decoder;
>   extern const FFCodec ff_vmdvideo_decoder;
> diff --git a/libavcodec/vc2enc_vulkan.c b/libavcodec/vc2enc_vulkan.c
> new file mode 100644
> index 0000000000..d90d65e36d
> --- /dev/null
> +++ b/libavcodec/vc2enc_vulkan.c

[...]

> +const FFCodec ff_vc2_vulkan_encoder = {
> +    .p.name         = "vc2_vulkan",
> +    CODEC_LONG_NAME("SMPTE VC-2"),
> +    .p.type         = AVMEDIA_TYPE_VIDEO,
> +    .p.id           = AV_CODEC_ID_DIRAC,
> +    .p.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_HARDWARE,

This encoder is not DR1.


[-- 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".

  parent reply	other threads:[~2025-04-18  1:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-17 23:55 [FFmpeg-devel] [PATCH v3 1/5] libavcodec/vc2enc: Split out common functions between software and hardware encoders IndecisiveTurtle
2025-04-17 23:55 ` [FFmpeg-devel] [PATCH v3 2/5] libavcodec/vc2enc: Switch quant to int IndecisiveTurtle
2025-04-17 23:55 ` [FFmpeg-devel] [PATCH v3 3/5] libavcodec/vc2enc: Pass quant array as argument to init function IndecisiveTurtle
2025-04-17 23:55 ` [FFmpeg-devel] [PATCH v3 4/5] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder IndecisiveTurtle
2025-04-17 23:55 ` [FFmpeg-devel] [PATCH v3 5/5] lavc: implement a Vulkan-based VC-2 encoder Implements a Vulkan based dirac encoder. Supports Haar and Legall wavelets and should work with all wavelet depths IndecisiveTurtle
2025-04-18  1:11   ` Lynne
2025-04-18  1:19     ` James Almer
2025-04-18  1:18   ` James Almer [this message]
2025-04-18  9:17   ` Andreas Rheinhardt
2025-04-18  9:32   ` Andreas Rheinhardt
2025-04-18  8:39 ` [FFmpeg-devel] [PATCH v3 1/5] libavcodec/vc2enc: Split out common functions between software and hardware encoders Andreas Rheinhardt

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=520bf06e-7a5e-4e18-94fc-1c5aff022f1e@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