Re: [FFmpeg-devel] [PATCH] vulkan: use a single command buffer per command buffer pool

2025-04-17 Thread Jerome Martinez
Le 16/04/2025 à 15:26, Lynne a écrit : We violated the spec, which, despite the actual command buffer pool *not* being involved in any functions which require external synchronization of the pool, *require* external synchronization even if only the command buffers are used. This also has the eff

[FFmpeg-devel] [PATCH 01/14] avcodec/magicyuvenc: Fix setting nb_slices

2025-04-17 Thread Andreas Rheinhardt
Patches attached. - Andreas From 90f466ce00debdd8d4d557ffcd5ec2a7065d9719 Mon Sep 17 00:00:00 2001 From: Andreas Rheinhardt Date: Fri, 11 Apr 2025 22:46:57 +0200 Subject: [PATCH 01/14] avcodec/magicyuvenc: Fix setting nb_slices Do not derive it via av_cpu_count() in case AVCodecContext.slices is

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dvbsubenc: Sanity check num_rects

2025-04-17 Thread Andreas Rheinhardt
Michael Niedermayer: > On Wed, Apr 16, 2025 at 11:17:30AM +0200, Andreas Rheinhardt wrote: >> Patches attached. >> >> - Andreas > >> dvbsubenc.c |3 +++ >> 1 file changed, 3 insertions(+) >> 27ce315dbaee02f8c92c12f8c9cd0c8c7edc54fb >> 0001-avcodec-dvbsubenc-Sanity-check-num_rects.patch >> F

[FFmpeg-devel] [PATCH] fix VVC encoding with leading pictures

2025-04-17 Thread Gabriel Hege
The default behavior for VVenC (since v1.10.0) is to create an IDR with leading pictures for the first picture in decoding order (POC 32). This leads to FFmpeg generating an edit list with an empty entry, skipping the leading pictures. This patch fixes the calculation for the start_pts, while the

[FFmpeg-devel] [PATCH] avformat/mov: Reduce seek when interleaved_read is disabled

2025-04-17 Thread Zhao Zhili
From: Zhao Zhili Don't select sample with small dts when interleaved_read is disabled. --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 452690090c..cb81b6c4da 100644 --- a/libavformat/mov.c +++ b/libavformat/mov

[FFmpeg-devel] [PATCH] Fix fate-checkasm-hevc_pel failed on LA.

2025-04-17 Thread Shiyou Yin
Some loop counters were initialized incorrectly. This patch enhances the handling of loop iterations and residual parts. --- libavcodec/loongarch/hevc_mc_bi_lsx.c | 126 -- libavcodec/loongarch/hevc_mc_uni_lsx.c | 325 +++-- libavcodec/loongarch/hevcdsp_lsx.c | 233

Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict2: Add AVDictionary2 with hash-based lookup

2025-04-17 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Mittwoch, 16. April 2025 23:25 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict2: Add > AVDictionary2 with hash-based lookup > >

[FFmpeg-devel] [PATCH] libavfilter/ebur128: SIMD optimization

2025-04-17 Thread gkhayat
From: Guillaume Khayat Improve performance (+17%) of ebur_128 filter using AVX2 and FMA instruction in the body of the filter_frame function. ## Benchmark Tested with hyperfine hyperfine --warmup 2 "./ffmpeg_reference -i ~/test.wav -vn -af ebur128=peak=none:framelog=quiet -f null -" "./ffmpe

[FFmpeg-devel] [PATCH] avcodec/libvvenc: use av_vlog to print external library log messages

2025-04-17 Thread James Almer
And improve the vvencMsgLevel <-> AV_LOG_* mapping. Signed-off-by: James Almer --- libavcodec/libvvenc.c | 35 +++ 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/libavcodec/libvvenc.c b/libavcodec/libvvenc.c index 29a49ba091..c71fd78f1e 100644 ---

Re: [FFmpeg-devel] [PATCH] libavfilter/ebur128: SIMD optimization

2025-04-17 Thread Andreas Rheinhardt
gkha...@spectre-music.com: > From: Guillaume Khayat > > Improve performance (+17%) of ebur_128 filter using AVX2 and FMA instruction > in the body of the filter_frame function. > > ## Benchmark > > Tested with hyperfine > > hyperfine --warmup 2 "./ffmpeg_reference -i ~/test.wav -vn -af > ebu

[FFmpeg-devel] [PATCH v3 1/5] libavcodec/vc2enc: Split out common functions between software and hardware encoders

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/Makefile| 2 +- libavcodec/vc2enc.c| 513 + libavcodec/vc2enc_common.c | 376 +++ libavcodec/vc2enc_common.h | 196 ++ 4 files changed, 581 insertions(+), 506 deletions

Re: [FFmpeg-devel] [PATCH v3] libavutil: Add AVMap

2025-04-17 Thread Michael Niedermayer
Hi On Thu, Apr 17, 2025 at 07:57:46PM +0200, Nicolas George wrote: > Michael Niedermayer (HE12025-04-17): > > +AVMap *av_map_new(AVMapCompareFunc cmp_keyvalue, int cmp_flags, > > AVMapCopyFunc copy, AVMapFreeFunc freef) > > +{ > > +AVMap *s = av_mallocz(sizeof(*s)); > > +if (!s) > > +

Re: [FFmpeg-devel] [PATCH v2 09/10] fftools/graphprint: Add execution graph printing

2025-04-17 Thread Michael Niedermayer
Hi On Wed, Apr 16, 2025 at 10:12:19AM +, softworkz wrote: > From: softworkz > > The key benefits are: > > - Different to other graph printing methods, this is outputting: > - all graphs with runtime state > (including auto-inserted filters) > - each graph with its inputs and outputs

Re: [FFmpeg-devel] [PATCH 2/3] doc/dict2: Add doc and api change for AVDictionary2

2025-04-17 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Donnerstag, 17. April 2025 01:41 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH 2/3] doc/dict2: Add doc and api > change for AVDictionary2 > > H

[FFmpeg-devel] [PATCH v3 04/11] fftools/tf_internal: Use ac_default_item_name

2025-04-17 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/textformat/tf_internal.h | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/fftools/textformat/tf_internal.h b/fftools/textformat/tf_internal.h index 7b326328cb..e145bc83bb 100644 --- a/fftools/textformat/tf_internal.h +

[FFmpeg-devel] [PATCH v3 08/11] fftools/resources: Add resource manager files

2025-04-17 Thread softworkz
From: softworkz Signed-off-by: softworkz --- ffbuild/common.mak | 28 ++- fftools/Makefile | 3 +- fftools/resources/.gitignore | 4 + fftools/resources/Makefile | 27 +++ fftools/resources/graph.css | 353 +++ fftools/resources/gra

Re: [FFmpeg-devel] [PATCH v2 02/10] fftools/textformat: Quality improvements

2025-04-17 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of > softworkz . > Sent: Mittwoch, 16. April 2025 13:33 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 02/10] fftools/textformat: > Quality improvements > > > > > -Ori

Re: [FFmpeg-devel] SW's Patchsets Overview

2025-04-17 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of > softworkz . > Sent: Montag, 14. April 2025 17:45 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] SW's Patchsets Overview > > Hello, > > > this is a follow-up to the list of patc

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.

2025-04-17 Thread Lynne
On 18/04/2025 01:55, IndecisiveTurtle wrote: From: IndecisiveTurtle 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

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.

2025-04-17 Thread James Almer
On 4/17/2025 8:55 PM, IndecisiveTurtle wrote: From: IndecisiveTurtle 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 optimize

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.

2025-04-17 Thread James Almer
On 4/17/2025 10:11 PM, Lynne wrote: On 18/04/2025 01:55, IndecisiveTurtle wrote: From: IndecisiveTurtle 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

[FFmpeg-devel] [PATCH v3] avcodec: Fix fate-checkasm-hevc_pel failed on LA.

2025-04-17 Thread Shiyou Yin
Some loop counters were initialized incorrectly. This patch enhances the handling of loop iterations and residual parts. --- libavcodec/loongarch/hevc_mc_bi_lsx.c | 299 ++-- libavcodec/loongarch/hevc_mc_uni_lsx.c| 325 +- libavcodec/loongarch/hevcdsp_in

Re: [FFmpeg-devel] [PATCH] libavfilter/ebur128: SIMD optimization

2025-04-17 Thread James Almer
On 4/17/2025 2:07 PM, Andreas Rheinhardt wrote: gkha...@spectre-music.com: From: Guillaume Khayat Improve performance (+17%) of ebur_128 filter using AVX2 and FMA instruction in the body of the filter_frame function. ## Benchmark Tested with hyperfine hyperfine --warmup 2 "./ffmpeg_referen

Re: [FFmpeg-devel] [PATCH v3] libavutil: Add AVMap

2025-04-17 Thread Nicolas George
Michael Niedermayer (HE12025-04-17): > +AVMap *av_map_new(AVMapCompareFunc cmp_keyvalue, int cmp_flags, > AVMapCopyFunc copy, AVMapFreeFunc freef) > +{ > +AVMap *s = av_mallocz(sizeof(*s)); > +if (!s) > +return NULL; > + > +s->copy = copy; > +s->freef = fre

[FFmpeg-devel] [PATCH v3 02/11] fftools/textformat: Quality improvements

2025-04-17 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/textformat/avtextformat.c | 111 +++--- fftools/textformat/avtextformat.h | 6 +- fftools/textformat/tf_default.c | 8 ++- fftools/textformat/tf_ini.c | 2 +- fftools/textformat/tf_json.c | 8 ++-

Re: [FFmpeg-devel] [PATCH v2 09/10] fftools/graphprint: Add execution graph printing

2025-04-17 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Donnerstag, 17. April 2025 20:42 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 09/10] fftools/graphprint: Add > execution graph printing > >

[FFmpeg-devel] [PATCH v3 01/11] fftools/textformat: Formatting and whitespace changes

2025-04-17 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/textformat/avtextformat.c | 104 +++-- fftools/textformat/avtextformat.h | 16 ++--- fftools/textformat/avtextwriters.h | 11 ++- fftools/textformat/tf_compact.c| 91 ++--- fftools/textform

[FFmpeg-devel] [PATCH v3 00/11] Execution Graph Printing

2025-04-17 Thread ffmpegagent
Shortest cover letter for my longest-running FFmpeg patchset: * Apply * Build * Add the "-sg" switch to any FFmpeg command line * Press 'q' when you don't want to wait SG = Show Graph Documentation and examples can be found here: https://github.com/softworkz/ffmpeg_output_apis/wiki Versio

[FFmpeg-devel] [PATCH v3 10/11] fftools/graphprint: Add execution graph printing

2025-04-17 Thread softworkz
From: softworkz The key benefits are: - Different to other graph printing methods, this is outputting: - all graphs with runtime state (including auto-inserted filters) - each graph with its inputs and outputs - all filters with their in- and output pads - all connections between all

[FFmpeg-devel] [PATCH v3 03/11] fftools/textformat: Introduce common header and deduplicate code

2025-04-17 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/textformat/avtextwriters.h | 2 +- fftools/textformat/tf_compact.c| 32 --- fftools/textformat/tf_default.c| 27 +++--- fftools/textformat/tf_flat.c | 25 +++-- fftools/textformat/tf_ini.c| 24 +++--

[FFmpeg-devel] [PATCH v3 06/11] fftools/ffmpeg_filter: Move some declaration to new header file

2025-04-17 Thread softworkz
From: softworkz to allow filtergraph printing to access the information. Signed-off-by: softworkz --- fftools/ffmpeg_filter.c | 190 +--- fftools/ffmpeg_filter.h | 234 2 files changed, 235 insertions(+), 189 deletions(-) cr

[FFmpeg-devel] [PATCH v3 07/11] avfilter/avfilter: Add avfilter_link_get_hw_frames_ctx()

2025-04-17 Thread softworkz
From: softworkz Signed-off-by: softworkz --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 9 + libavfilter/avfilter.h | 12 3 files changed, 24 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 22aa6fa5c7..4f60bbbe3d 100644 --- a/doc/APIchanges

[FFmpeg-devel] [PATCH v3 05/11] fftools/textformat: Add function avtext_print_integer_flags()

2025-04-17 Thread softworkz
From: softworkz This function works analog to the avtext_print_string() which already has a flags parameter. Signed-off-by: softworkz --- fftools/textformat/avtextformat.c | 21 + fftools/textformat/avtextformat.h | 2 ++ 2 files changed, 23 insertions(+) diff --git a/fft

[FFmpeg-devel] [PATCH v3 11/11] fftools/graphprint: Now, make it a Killer-Feature!

2025-04-17 Thread softworkz
From: softworkz remember this: -sg <= show-graph Signed-off-by: softworkz --- doc/ffmpeg.texi | 4 + fftools/Makefile | 1 + fftools/ffmpeg.c | 2 +- fftools/ffmpeg.h | 1 + fftools/ffmpeg_filter.c | 2 +- fftools/ffmpeg_opt.c

Re: [FFmpeg-devel] [PATCH v2 02/10] fftools/textformat: Quality improvements

2025-04-17 Thread softworkz .
> -Original Message- > From: ffmpeg-devel On Behalf Of > softworkz . > Sent: Mittwoch, 16. April 2025 13:33 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 02/10] fftools/textformat: > Quality improvements > > > > > -Ori

[FFmpeg-devel] [PATCH v3] 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.

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle 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

Re: [FFmpeg-devel] [PATCH 2/2] libavformat/takdec.c: Fix msan error.

2025-04-17 Thread Thierry Foucu
On Mon, Apr 7, 2025 at 11:10 AM wrote: > From: Thierry Foucu > > Make sure we are reading 16 bytes for the MD5 > --- > libavformat/takdec.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/libavformat/takdec.c b/libavformat/takdec.c > index 21fff3fcbf..61b9f001c4 100

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

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle 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

[FFmpeg-devel] [PATCH v2] avcodec: Fix fate-checkasm-hevc_pel failed on LA.

2025-04-17 Thread Shiyou Yin
Some loop counters were initialized incorrectly. This patch enhances the handling of loop iterations and residual parts. --- libavcodec/loongarch/hevc_mc_bi_lsx.c | 126 -- libavcodec/loongarch/hevc_mc_uni_lsx.c | 325 +++-- libavcodec/loongarch/hevcdsp_lsx.c | 233

Re: [FFmpeg-devel] [PATCH 2/2] libavformat/takdec.c: Fix msan error.

2025-04-17 Thread James Almer
On 4/17/2025 4:08 PM, Thierry Foucu wrote: On Mon, Apr 7, 2025 at 11:10 AM wrote: From: Thierry Foucu Make sure we are reading 16 bytes for the MD5 --- libavformat/takdec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/takdec.c b/libavformat/takdec.c

[FFmpeg-devel] [PATCH v3 4/5] libavcodec/vulkan: Add modifications to common shader for VC2 vulkan encoder

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vulkan/common.comp | 54 --- 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/libavcodec/vulkan/common.comp b/libavcodec/vulkan/common.comp index 10af9c0623..db216a2ac6 100644 --- a/libavcodec/vulkan/common.comp

[FFmpeg-devel] [PATCH v3 3/5] libavcodec/vc2enc: Pass quant array as argument to init function

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle --- libavcodec/vc2enc.c| 2 +- libavcodec/vc2enc_common.c | 18 +- libavcodec/vc2enc_common.h | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libavcodec/vc2enc.c b/libavcodec/vc2enc.c index 2e849eb09e..c0f542e116 100644 --

[FFmpeg-devel] [PATCH v3 2/5] libavcodec/vc2enc: Switch quant to int

2025-04-17 Thread IndecisiveTurtle
From: IndecisiveTurtle Prevents compiler from mistaking it as a string Also makes passing it to the GPU in a buffer easier --- libavcodec/vc2enc_common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc2enc_common.h b/libavcodec/vc2enc_common.h index eaaf5ac99c..