[FFmpeg-devel] RFC: new packed pixel formats (machine vision)

2024-10-14 Thread Diederick C. Niehorster
Hi All, I want to pick up a discussion i started last week (https://ffmpeg.org/pipermail/ffmpeg-devel/2024-October/334585.html) in a new thread, with the relevant information nicely organized. This is about adding pixel formats common in machine vision to ffmpeg (though i understand some formats m

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Nicolas George
James Almer (12024-10-14): > A new flag AVFILTER_FLAG_SUPPORT_COMMANDS that the user can check to ensure > a call to avfilter_process_command() will not return ENOSYS could be added. So you mean to have the same information twice in the source code of the filter: once as the process_command callba

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Alexander Strasser via ffmpeg-devel
On 2024-10-14 22:35 +0200, Anton Khirnov wrote: > Quoting Alexander Strasser via ffmpeg-devel (2024-10-14 22:21:38) > > > It is documented in the header. > > > > I figured as much but couldn't find a hint in in avfilter.h > > > > You changed it in a previous patch of this series or am I reading it

Re: [FFmpeg-devel] [PATCH 1/4] lavu/pixfmt: add AV_PIX_FMT_RGBA128

2024-10-14 Thread James Almer
On 10/14/2024 10:41 PM, Lynne via ffmpeg-devel wrote: On 14/10/2024 17:24, James Almer wrote: On 10/14/2024 12:11 PM, Lynne via ffmpeg-devel wrote: On 12/10/2024 01:01, Lynne wrote: This format is useful for doing certain lossless transforms on images, RCT in particular, which require you to e

Re: [FFmpeg-devel] [PATCH 1/4] lavu/pixfmt: add AV_PIX_FMT_RGBA128

2024-10-14 Thread Lynne via ffmpeg-devel
On 14/10/2024 17:24, James Almer wrote: On 10/14/2024 12:11 PM, Lynne via ffmpeg-devel wrote: On 12/10/2024 01:01, Lynne wrote: This format is useful for doing certain lossless transforms on images, RCT in particular, which require you to escalate the size from 16 to 32 bits to avoid overflows.

[FFmpeg-devel] [PATCH] doc/APIchanges: add missing entry for adding RGBF16

2024-10-14 Thread Martin Schitter
The missing APIchanges entry requested by A.Khirnov. Martin --- doc/APIchanges | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 5bfb52c..9ee898b 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all librarie

[FFmpeg-devel] [PATCH 2/2] doc/encoders: very basic FFv1 documentation

2024-10-14 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- doc/encoders.texi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/doc/encoders.texi b/doc/encoders.texi index 0749417db4f..5a444126b4b 100644 --- a/doc/encoders.texi +++ b/doc/encoders.texi @@ -529,6 +529,37 @@ Selected b

[FFmpeg-devel] [PATCH 1/2] libavcodec/ffv1enc: Add option to select the quantization table

2024-10-14 Thread Michael Niedermayer
Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/ffv1.h| 1 + libavcodec/ffv1enc.c | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index b98f0b36855..18f002c6312 100644 --- a/libavcodec/ffv1.h +++

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-14 Thread Michael Niedermayer
On Sat, Oct 05, 2024 at 03:38:05PM -0700, Frank Plowman wrote: > The first branch of this ternary expression was intended to avoid > having two shift operations in the case the RHS is not known at > compile time. It only works if the LHS has a signed type however, > otherwise the result is invalid

Re: [FFmpeg-devel] [PATCH] configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 11:50:15PM +0300, Martin Storsjö wrote: > While we only add the flag if the linker seems to support it, > it turns out that ld.bfd had a bug where the flag is accidentally > accepted, and the flag produces an output file named > "_warn_duplicate_libraries". > > The ld.bfd b

Re: [FFmpeg-devel] [PATCH v2 2/2] tests/fate: disable compression for zlib-based codecs

2024-10-14 Thread Michael Niedermayer
On Sun, Sep 29, 2024 at 08:36:29PM +0200, Ramiro Polla wrote: > FATE results differ when using the original zlib and zlib-ng. > > Since we don't need to test the result from zlib itself, this commit > disables compression on tests for zlib-based codecs, which ends up > giving the same results with

Re: [FFmpeg-devel] [PATCH] configure: Silence Xcode warnings about duplicate libraries

2024-10-14 Thread Martin Storsjö
On Mon, 14 Oct 2024, Martin Storsjö wrote: On Sun, 13 Oct 2024, Michael Niedermayer wrote: On Wed, Sep 25, 2024 at 03:16:40PM +0300, Martin Storsjö wrote: Since Xcode 15, macOS developer tools use a new linker. The new linker by default warns for duplicate -l options. As this is a known and e

[FFmpeg-devel] [PATCH] configure: Only try to use the -no_warn_duplicate_libraries flag on Darwin

2024-10-14 Thread Martin Storsjö
While we only add the flag if the linker seems to support it, it turns out that ld.bfd had a bug where the flag is accidentally accepted, and the flag produces an output file named "_warn_duplicate_libraries". The ld.bfd bug was fixed in binutils 2.36, in https://sourceware.org/git/?p=binutils-gdb

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread James Almer
On 10/14/2024 1:27 PM, Alexander Strasser via ffmpeg-devel wrote: On 2024-10-14 17:52 +0200, Michael Niedermayer wrote: On Mon, Oct 14, 2024 at 01:36:46PM +0200, Anton Khirnov wrote: --- fftools/opt_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/opt_c

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Anton Khirnov
Quoting Alexander Strasser via ffmpeg-devel (2024-10-14 22:21:38) > > It is documented in the header. > > I figured as much but couldn't find a hint in in avfilter.h > > You changed it in a previous patch of this series or am I reading it wrong? I don't follow, I changed what? -- Anton Khirnov

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/ffv1enc: Fix RCT with RGB64

2024-10-14 Thread Michael Niedermayer
On Thu, Oct 10, 2024 at 10:45:27PM +0200, Michael Niedermayer wrote: > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/ffv1enc.c | 8 > 1 file changed, 8 insertions(+) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133

Re: [FFmpeg-devel] [PATCH 3/5] avcodec/ffv1dec: Fix end computation with ec=2

2024-10-14 Thread Michael Niedermayer
On Thu, Oct 10, 2024 at 10:45:26PM +0200, Michael Niedermayer wrote: > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/ffv1dec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF673

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/ffv1enc: Move slice termination into threads

2024-10-14 Thread Michael Niedermayer
On Thu, Oct 10, 2024 at 10:45:25PM +0200, Michael Niedermayer wrote: > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavcodec/ffv1enc.c | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) will apply, should be a tiny bit faster [...] -- M

Re: [FFmpeg-devel] [PATCH] lavu/common: Fix AV_CEIL_RSHIFT for unsigned LHS

2024-10-14 Thread Frank Plowman
Ping Here is a demo of the issue: https://godbolt.org/z/hYnYvbcjE On 05/10/2024 23:38, Frank Plowman wrote: > The first branch of this ternary expression was intended to avoid > having two shift operations in the case the RHS is not known at > compile time. It only works if the LHS has a signed

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/ffv1enc: allow manually specifying the crc type

2024-10-14 Thread Michael Niedermayer
On Fri, Oct 11, 2024 at 09:44:37AM +0200, Jerome Martinez wrote: > Le 10/10/2024 à 22:45, Michael Niedermayer a écrit : > > [...] > > > > @@ -1266,7 +1268,7 @@ static int encode_frame(AVCodecContext *avctx, > > AVPacket *pkt, > > #define OFFSET(x) offsetof(FFV1Context, x) > > #define VE AV_OP

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread James Almer
On 10/14/2024 1:36 PM, Nicolas George wrote: Alexander Strasser via ffmpeg-devel (12024-10-14): Learning question: How can we see this is a private field? I suppose “revert everything and start again properly designing things without loss of feature” will not be appreciated? No, it wont. Als

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Alexander Strasser via ffmpeg-devel
On 2024-10-14 19:22 +0200, Anton Khirnov wrote: > Quoting Alexander Strasser via ffmpeg-devel (2024-10-14 18:27:24) > > On 2024-10-14 17:52 +0200, Michael Niedermayer wrote: > > > On Mon, Oct 14, 2024 at 01:36:46PM +0200, Anton Khirnov wrote: > > > > --- > > > > fftools/opt_common.c | 4 +--- > > >

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Validate subpartitioning structure

2024-10-14 Thread Frank Plowman
Thank you for your reply. On 14/10/2024 16:16, Nuo Mi wrote: > On Mon, Oct 14, 2024 at 3:14 AM Frank Plowman wrote: > >> On 13/10/2024 05:43, Nuo Mi wrote: >>> On Sun, Oct 6, 2024 at 6:49 AM Frank Plowman >> wrote: >>> H.266 (V3) section 6.3.3 dictates that the division of the picture into

Re: [FFmpeg-devel] [PATCH v4 2/3] avutil: add RGBF16 pix_fmt

2024-10-14 Thread Anton Khirnov
Quoting Martin Schitter (2024-10-14 10:33:11) > --- > libavutil/pixdesc.c | 25 + > libavutil/pixfmt.h | 4 > libavutil/version.h | 2 +- > tests/ref/fate/imgutils | 4 > tests/ref/fate/sws-pixdesc-query | 11 +++

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 08:33:50PM +0200, Niklas Haas wrote: > On Mon, 14 Oct 2024 19:49:21 +0200 Michael Niedermayer > wrote: > > On Mon, Oct 14, 2024 at 06:39:21PM +0200, Michael Niedermayer wrote: > > > On Mon, Oct 14, 2024 at 06:02:45PM +0200, Niklas Haas wrote: > > > > On Mon, 14 Oct 2024 16

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Niklas Haas
On Mon, 14 Oct 2024 19:49:21 +0200 Michael Niedermayer wrote: > On Mon, Oct 14, 2024 at 06:39:21PM +0200, Michael Niedermayer wrote: > > On Mon, Oct 14, 2024 at 06:02:45PM +0200, Niklas Haas wrote: > > > On Mon, 14 Oct 2024 16:55:39 +0200 Michael Niedermayer > > > wrote: > > > > On Mon, Oct 14,

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Niklas Haas
On Mon, 14 Oct 2024 18:39:21 +0200 Michael Niedermayer wrote: > On Mon, Oct 14, 2024 at 06:02:45PM +0200, Niklas Haas wrote: > > On Mon, 14 Oct 2024 16:55:39 +0200 Michael Niedermayer > > wrote: > > > On Mon, Oct 14, 2024 at 03:37:27PM +0200, Niklas Haas wrote: > > > > From: Niklas Haas > > >

Re: [FFmpeg-devel] [PATCH v4 0/3] Float16/32 support impovements (v4)

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 10:33:09AM +0200, Martin Schitter wrote: > Changes v4: Fix fate test error caused by changes pix_fmt order. > > Martin > > Martin Schitter (3): > swscale/input: add input support for RGBF32 > avutil: add RGBF16 pix_fmt > swscale/input: add input support for RGBF16 w

Re: [FFmpeg-devel] [PATCH] lavc/avcodec: fix global/private option precendence

2024-10-14 Thread Dale Curtis
Thanks for the fix! Sorry for the breakage. - dale On Sun, Oct 13, 2024 at 3:01 PM Cameron Gutman wrote: > On Sun, Oct 13, 2024 at 8:29 AM Anton Khirnov wrote: > > > > Broken after 7753a9d62725d5bd8313e2d249acbe1c8af79ab1. Apply only the > > whitelist early, and the rest with a single call to

Re: [FFmpeg-devel] PATCH] Make H.274 film grain support optional for H.264. Saves ~779kb.

2024-10-14 Thread Dale Curtis
Any issues remaining with this patch? Thanks in advance for applying. - dale On Sun, Sep 22, 2024 at 4:30 PM Michael Niedermayer wrote: > On Wed, Aug 14, 2024 at 08:29:37AM +0200, Christophe Gisquet wrote: > > Hi, > > > > Le mar. 13 août 2024 à 23:39, Dale Curtis a > écrit : > > > > > > On Tue

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 06:39:21PM +0200, Michael Niedermayer wrote: > On Mon, Oct 14, 2024 at 06:02:45PM +0200, Niklas Haas wrote: > > On Mon, 14 Oct 2024 16:55:39 +0200 Michael Niedermayer > > wrote: > > > On Mon, Oct 14, 2024 at 03:37:27PM +0200, Niklas Haas wrote: > > > > From: Niklas Haas >

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Anton Khirnov
Quoting Alexander Strasser via ffmpeg-devel (2024-10-14 18:27:24) > On 2024-10-14 17:52 +0200, Michael Niedermayer wrote: > > On Mon, Oct 14, 2024 at 01:36:46PM +0200, Anton Khirnov wrote: > > > --- > > > fftools/opt_common.c | 4 +--- > > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > >

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 06:02:45PM +0200, Niklas Haas wrote: > On Mon, 14 Oct 2024 16:55:39 +0200 Michael Niedermayer > wrote: > > On Mon, Oct 14, 2024 at 03:37:27PM +0200, Niklas Haas wrote: > > > From: Niklas Haas > > > > > > And preserve the public SwsContext as separate name. The motivation

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Nicolas George
Alexander Strasser via ffmpeg-devel (12024-10-14): > Learning question: How can we see this is a private field? I suppose “revert everything and start again properly designing things without loss of feature” will not be appreciated? Regards, -- Nicolas George _

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Alexander Strasser via ffmpeg-devel
On 2024-10-14 17:52 +0200, Michael Niedermayer wrote: > On Mon, Oct 14, 2024 at 01:36:46PM +0200, Anton Khirnov wrote: > > --- > > fftools/opt_common.c | 4 +--- > > 1 file changed, 1 insertion(+), 3 deletions(-) > > > > diff --git a/fftools/opt_common.c b/fftools/opt_common.c > > index 021ed75272

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Niklas Haas
On Mon, 14 Oct 2024 16:55:39 +0200 Michael Niedermayer wrote: > On Mon, Oct 14, 2024 at 03:37:27PM +0200, Niklas Haas wrote: > > From: Niklas Haas > > > > And preserve the public SwsContext as separate name. The motivation here > > is that I want to turn SwsContext into a public struct, while ke

Re: [FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 01:36:46PM +0200, Anton Khirnov wrote: > --- > fftools/opt_common.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/fftools/opt_common.c b/fftools/opt_common.c > index 021ed75272..34da2cee7d 100644 > --- a/fftools/opt_common.c > +++ b/fftools/op

[FFmpeg-devel] [PATCH] avcodec/vvc/thread: Check frame to be non NULL

2024-10-14 Thread Nuo Mi
Fixes: NULL pointer dereference Fixes: 71303/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-4875859050168320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reported-by: Michael Niedermayer --- libavcodec/vvc/dec.c | 2 +- 1 fil

Re: [FFmpeg-devel] [PATCH 1/4] lavu/pixfmt: add AV_PIX_FMT_RGBA128

2024-10-14 Thread James Almer
On 10/14/2024 12:11 PM, Lynne via ffmpeg-devel wrote: On 12/10/2024 01:01, Lynne wrote: This format is useful for doing certain lossless transforms on images, RCT in particular, which require you to escalate the size from 16 to 32 bits to avoid overflows. APIchanges will be done alongside when

Re: [FFmpeg-devel] [PATCH 1/3] fate/vcodec: stop using the deprecated v308 codec

2024-10-14 Thread James Almer
On 10/14/2024 11:59 AM, Anton Khirnov wrote: Quoting James Almer (2024-10-14 15:47:12) stddev and PSNR values change by the removal of format conversion and because of the added sws_flags. Either or will have the same effect even on their own. Signed-off-by: James Almer --- We could alternativ

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Validate subpartitioning structure

2024-10-14 Thread Nuo Mi
On Mon, Oct 14, 2024 at 3:14 AM Frank Plowman wrote: > On 13/10/2024 05:43, Nuo Mi wrote: > > On Sun, Oct 6, 2024 at 6:49 AM Frank Plowman > wrote: > > > >> H.266 (V3) section 6.3.3 dictates that the division of the picture into > >> subpictures must be exhaustive and mutually exclusive, i.e. th

Re: [FFmpeg-devel] [PATCH 1/4] lavu/pixfmt: add AV_PIX_FMT_RGBA128

2024-10-14 Thread Lynne via ffmpeg-devel
On 12/10/2024 01:01, Lynne wrote: This format is useful for doing certain lossless transforms on images, RCT in particular, which require you to escalate the size from 16 to 32 bits to avoid overflows. APIchanges will be done alongside when comitting. --- libavutil/pixdesc.c | 27 +

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: add proper maps for XV3{0, 6}

2024-10-14 Thread Lynne via ffmpeg-devel
On 14/10/2024 16:50, James Almer wrote: Signed-off-by: James Almer --- libavutil/hwcontext_vulkan.c | 9 - libavutil/vulkan.c | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 47e21fda83

Re: [FFmpeg-devel] [PATCH 1/3] fate/vcodec: stop using the deprecated v308 codec

2024-10-14 Thread Anton Khirnov
Quoting James Almer (2024-10-14 15:47:12) > stddev and PSNR values change by the removal of format conversion and because > of the added sws_flags. Either or will have the same effect even on their own. > > Signed-off-by: James Almer > --- > We could alternatively just remove this test as it will

Re: [FFmpeg-devel] [PATCH v2 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 03:37:27PM +0200, Niklas Haas wrote: > From: Niklas Haas > > And preserve the public SwsContext as separate name. The motivation here > is that I want to turn SwsContext into a public struct, while keeping the > internal implementation hidden. Additionally, I also want to

[FFmpeg-devel] [PATCH] avutil/hwcontext_vulkan: add proper maps for XV3{0, 6}

2024-10-14 Thread James Almer
Signed-off-by: James Almer --- libavutil/hwcontext_vulkan.c | 9 - libavutil/vulkan.c | 3 ++- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 47e21fda83..465308271e 100644 --- a/libavutil/hwcontext

[FFmpeg-devel] [PATCH] lavf/mxfdec: Set a scan direction explicitly

2024-10-14 Thread Tomas Härdin
Passes fate-mxf /Tomas From 6e47a43251226c88484f99d18c6b052bb1f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Mon, 14 Oct 2024 16:45:35 +0200 Subject: [PATCH] lavf/mxfdec: Set a scan direction explicitly This prevents a theoretical case where seeks to a gap in an inde

[FFmpeg-devel] [PATCH 3/3] fate/vcodec: add a test for v410 pixel format raw video

2024-10-14 Thread James Almer
Signed-off-by: James Almer --- tests/fate/vcodec.mak | 6 ++ tests/ref/vsynth/vsynth1-v410 | 4 tests/ref/vsynth/vsynth2-v410 | 4 tests/ref/vsynth/vsynth3-v410 | 4 tests/ref/vsynth/vsynth_lena-v410 | 4 5 files changed, 22 insertions(+) create mo

[FFmpeg-devel] [PATCH 2/3] fate/vcodec: stop using the deprecated v408 codec

2024-10-14 Thread James Almer
Signed-off-by: James Almer --- tests/fate/vcodec.mak | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/fate/vcodec.mak b/tests/fate/vcodec.mak index 99a0e0a75f..6a0a6a894a 100644 --- a/tests/fate/vcodec.mak +++ b/tests/fate/vcodec.mak @@ -451,9 +451,10 @@ fate-vsynth%

[FFmpeg-devel] [PATCH 1/3] fate/vcodec: stop using the deprecated v308 codec

2024-10-14 Thread James Almer
stddev and PSNR values change by the removal of format conversion and because of the added sws_flags. Either or will have the same effect even on their own. Signed-off-by: James Almer --- We could alternatively just remove this test as it will become a duplicate of the filter-pixdesc one, given i

Re: [FFmpeg-devel] [PATCH 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Niklas Haas
On Mon, 14 Oct 2024 15:09:07 +0200 Michael Niedermayer wrote: > On Sun, Oct 13, 2024 at 09:15:38PM +0200, Niklas Haas wrote: > > On Sun, 13 Oct 2024 19:31:05 +0200 Michael Niedermayer > > wrote: > > > On Fri, Oct 11, 2024 at 12:26:49AM +0200, Niklas Haas wrote: > > > > From: Niklas Haas > > >

[FFmpeg-devel] [PATCH v2 14/19] swscale/internal: expose sws_init_single_context() internally

2024-10-14 Thread Niklas Haas
From: Niklas Haas Used by the graph API swscale wrapper, for now. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale_internal.h | 4 libswscale/utils.c| 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale_i

[FFmpeg-devel] [PATCH v2 13/19] swscale: organize and better document flags

2024-10-14 Thread Niklas Haas
From: Niklas Haas Group them into an enum rather than random #defines, and document their behavior a bit more obviously. Of particular note, I discovered that SWS_DIRECT_BGR is not referenced anywhere else in the code base. As such, I have moved it to the deprecated section, alongside SWS_ERROR_

[FFmpeg-devel] [PATCH v2 12/19] swscale: expose SwsContext publicly

2024-10-14 Thread Niklas Haas
From: Niklas Haas Following in the footsteps of the work in the previous commit, it's now relatively straightforward to expose the options struct publicly as SwsContext. This is a step towards making this more user friendly, as well as following API conventions established elsewhere. Sponsored-b

[FFmpeg-devel] [PATCH v2 16/19] swscale: introduce new, dynamic scaling API

2024-10-14 Thread Niklas Haas
From: Niklas Haas As part of a larger, ongoing effort to modernize and partially rewrite libswscale, it was decided and generally agreed upon to introduce a new public API for libswscale. This API is designed to be less stateful, more explicitly defined, and considerably easier to use than the ex

[FFmpeg-devel] [PATCH v2 09/19] swscale/internal: use static_assert for enforcing offsets

2024-10-14 Thread Niklas Haas
From: Niklas Haas Instead of sprinkling av_assert0 into random init functions. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale_internal.h | 11 +++ libswscale/utils.c| 3 ++- libswscale/x86/swscale.c | 4 3 files changed, 13 i

[FFmpeg-devel] [PATCH v2 10/19] swscale/x86: use dedicated int for self-modifying MMX dstW

2024-10-14 Thread Niklas Haas
From: Niklas Haas I want to pull options out of SwsInternal, so we need to make this field a dedicated int that gets updated as appropriate in ff_swscale(). Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale.c | 1 + libswscale/swscale_internal.h | 3 +

[FFmpeg-devel] [PATCH v2 19/19] avfilter/vf_scale: switch to new swscale API

2024-10-14 Thread Niklas Haas
From: Niklas Haas Most logic from this filter has been co-opted into swscale itself, allowing the resulting filter to be substantially simpler as it no longer has to worry about context initialization, interlacing, etc. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libavfilt

[FFmpeg-devel] [PATCH v2 08/19] swscale/options: cosmetic changes

2024-10-14 Thread Niklas Haas
From: Niklas Haas Reorganize the list, fix whitespace, make indentation consistent, and rename some descriptions for clarity, consistency or informativeness. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/options.c | 86 ++--

[FFmpeg-devel] [PATCH v2 18/19] tests/swscale: add a benchmarking mode

2024-10-14 Thread Niklas Haas
From: Niklas Haas With the ability to set the thread count as well. This benchmark includes the constant overhead of context initialization. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/tests/swscale.c | 93 -- 1 file changed,

[FFmpeg-devel] [PATCH v2 17/19] tests/swscale: rewrite on top of new API

2024-10-14 Thread Niklas Haas
From: Niklas Haas This rewrite cleans up the code to use AVFrames and the new swscale API. The log format has also been simplified and expanded to account for the new options. (Not yet implemented) The self testing code path has also been expanded to test the new swscale implementation against t

[FFmpeg-devel] [PATCH v2 15/19] swscale/graph: add new high-level scaler dispatch mechanism

2024-10-14 Thread Niklas Haas
From: Niklas Haas This interface has been designed from the ground up to serve as a new framework for dispatching various scaling operations at a high level. This will eventually replace the old ad-hoc system of using cascaded contexts, as well as allowing us to plug in more dynamic scaling passe

[FFmpeg-devel] [PATCH v2 07/19] swscale: add sws_is_noop()

2024-10-14 Thread Niklas Haas
From: Niklas Haas Exactly what it says on the tin. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale.h | 6 ++ libswscale/utils.c | 14 ++ 2 files changed, 20 insertions(+) diff --git a/libswscale/swscale.h b/libswscale/swscale.h index ba94

[FFmpeg-devel] [PATCH v2 06/19] swscale: add new frame testing API

2024-10-14 Thread Niklas Haas
From: Niklas Haas Replacing the old sws_isSupported* API with a more consistent family of functions that follows the same signature and naming convention, including a placeholder for testing the color space parameters that we don't currently implement conversions for. These functions also perfor

[FFmpeg-devel] [PATCH v2 05/19] swscale/utils: add SwsFormat abstraction and helpers

2024-10-14 Thread Niklas Haas
From: Niklas Haas Groups together all relevant color metadata from an AVFrame. While we could use AVFrame directly, keeping it a separate struct has three advantages: 1. Functions accepting an SwsFormat will definitely not care about the data pointers. 2. It clearly separates sanitized and ra

[FFmpeg-devel] [PATCH v2 04/19] swscale: add sws_free_context()

2024-10-14 Thread Niklas Haas
From: Niklas Haas Merely a convenience wrapper around sws_freeContext(). The name change is for parity with the other sws_* functions. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale.h | 7 +++ libswscale/utils.c | 10 ++ 2 files changed, 17 i

[FFmpeg-devel] [PATCH v2 03/19] swscale: slightly reorder header

2024-10-14 Thread Niklas Haas
From: Niklas Haas I want to start grouping "legacy" functions which I tend to deprecate together, away from the new ones. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale.h | 34 +- 1 file changed, 17 insertions(+), 17 deletion

[FFmpeg-devel] [PATCH v2 01/19] swscale: publicly typedef struct SwsContext

2024-10-14 Thread Niklas Haas
From: Niklas Haas Slightly more convenient, especially for the upcoming refactor which will turn SwsContext into a public struct. Sponsored-by: Sovereign Tech Fund Signed-off-by: Niklas Haas --- libswscale/swscale.h | 36 ++-- 1 file changed, 18 insertions(+), 1

[FFmpeg-devel] [PATCH v2 00/19] swscale: major refactoring and new API

2024-10-14 Thread Niklas Haas
Changes since v1: - Addressed build failures on certain platforms - Rewrote format handling code to support different sized fields - Rewrote noop cases to be more robust and efficient - Add extra paratemer validation for incoming frames - Various other minor/cosmetic fixes Of note, this version l

Re: [FFmpeg-devel] [PATCH] configure: Silence Xcode warnings about duplicate libraries

2024-10-14 Thread Martin Storsjö
On Sun, 13 Oct 2024, Michael Niedermayer wrote: On Wed, Sep 25, 2024 at 03:16:40PM +0300, Martin Storsjö wrote: Since Xcode 15, macOS developer tools use a new linker. The new linker by default warns for duplicate -l options. As this is a known and expected thing, not to be considered an issue,

Re: [FFmpeg-devel] [PATCH 05/19] swscale/utils: add SwsFormat abstraction and helpers

2024-10-14 Thread Michael Niedermayer
On Mon, Oct 14, 2024 at 11:57:02AM +0200, Niklas Haas wrote: > On Fri, 11 Oct 2024 00:26:52 +0200 Niklas Haas wrote: [...] > > +} > > + > > +switch (frame->format) { > > +case AV_PIX_FMT_YUVJ420P: > > +case AV_PIX_FMT_YUVJ411P: > > +case AV_PIX_FMT_YUVJ422P: > > +case AV_PI

Re: [FFmpeg-devel] [PATCH 02/19] swscale: rename SwsContext to SwsInternal

2024-10-14 Thread Michael Niedermayer
On Sun, Oct 13, 2024 at 09:15:38PM +0200, Niklas Haas wrote: > On Sun, 13 Oct 2024 19:31:05 +0200 Michael Niedermayer > wrote: > > On Fri, Oct 11, 2024 at 12:26:49AM +0200, Niklas Haas wrote: > > > From: Niklas Haas > > > > > > And preserve the public SwsContext as separate name. The motivation

Re: [FFmpeg-devel] [PATCH 3/3] fate/filter-video: add tests for packed YUV in yuvtestsrc

2024-10-14 Thread Michael Niedermayer
On Sat, Oct 12, 2024 at 05:10:16PM -0300, James Almer wrote: > Signed-off-by: James Almer > --- > tests/fate/filter-video.mak | 6 ++ > tests/ref/fate/filter-yuvtestsrc-ayuv | 10 ++ > tests/ref/fate/filter-yuvtestsrc-vuyx | 10 ++ > 3 files changed, 26 insertions(+

[FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_demux: use proper logging contexts everywhere

2024-10-14 Thread Anton Khirnov
--- fftools/ffmpeg_demux.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 364f148f60..0fd095d8ae 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -240,7 +240,7 @@ static void ts_discontinuity_d

[FFmpeg-devel] [PATCH 3/4] fftools/opt_common: stop accessing a private field

2024-10-14 Thread Anton Khirnov
--- fftools/opt_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index 021ed75272..34da2cee7d 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -808,7 +808,6 @@ int show_filters(void *optctx, const char *opt,

[FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_filter: use proper logging contexts

2024-10-14 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 63 +++-- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 4524a3e535..6508240cd3 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -325,7 +3

[FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_sched: be smarter about flushing the pre-muxing queues

2024-10-14 Thread Anton Khirnov
These per-stream FIFOs hold the packets before every stream is initialized and the header can be written. Once that happens, current code will flush each stream's queue one after the other. However, in case we buffered a lot of data for multiple streams, this may cause the muxer to overflow max_int

Re: [FFmpeg-devel] [PATCH] avfilter/vf_xpsnr: remove duplicated DSP infranstructure

2024-10-14 Thread Helmrich, Christian
Hi, thanks for taking a look, but I don't understand the two "unsigned error = main_line[j] - ref_line[j];" you added. Inline: Fully reuse the existing one from vf_psnr, instead of halfways. Signed-off-by: James Almer --- libavfilter/Makefile| 4 +-- libavfilter/psnr.c

Re: [FFmpeg-devel] [PATCH 05/19] swscale/utils: add SwsFormat abstraction and helpers

2024-10-14 Thread Niklas Haas
On Fri, 11 Oct 2024 00:26:52 +0200 Niklas Haas wrote: > From: Niklas Haas > > Groups together all relevant color metadata from an AVFrame. While we could > use AVFrame directly, keeping it a separate struct has three advantages: > > 1. Functions accepting an SwsFormat will definitely not care abo

Re: [FFmpeg-devel] [PATCH 00/19] swscale: major API refactor and new graph dispatch

2024-10-14 Thread Niklas Haas
On Fri, 11 Oct 2024 00:26:47 +0200 Niklas Haas wrote: > This patch series introduces the new API that was discussed in my previous > series, and starts working towards a new, graph-based scaler dispatch > mechanism. This currently piggybacks off of existing swscale logic, but I > plan on increment

Re: [FFmpeg-devel] [PATCH] avcodec/decode: clean-up if get_hw_frames_parameters fails

2024-10-14 Thread Thomas Guillem via ffmpeg-devel
Ping. On Mon, Oct 7, 2024, at 17:43, Thomas Guillem via ffmpeg-devel wrote: > Fixes the following assert: > > [7f1df83d17e0] vaapi generic error: > avcodec_get_hw_frames_parameters failed: -22 > Assertion p_dst->hwaccel_threadsafe || (!dst->hwaccel && > !dst->internal->hwaccel_priv_data) fa

[FFmpeg-devel] [PATCH v4 3/3] swscale/input: add input support for RGBF16

2024-10-14 Thread Martin Schitter
--- libswscale/input.c | 101 ++- libswscale/utils.c | 2 + libswscale/version.h | 2 +- 3 files changed, 103 insertions(+), 2 deletions(-) diff --git a/libswscale/input.c b/libswscale/input.c index e2af1d5..9beb72b 100644 --- a/libswscale/input.c +

[FFmpeg-devel] [PATCH v4 2/3] avutil: add RGBF16 pix_fmt

2024-10-14 Thread Martin Schitter
--- libavutil/pixdesc.c | 25 + libavutil/pixfmt.h | 4 libavutil/version.h | 2 +- tests/ref/fate/imgutils | 4 tests/ref/fate/sws-pixdesc-query | 11 +++ 5 files changed, 45 insertions(+), 1 deletion(-)

[FFmpeg-devel] [PATCH v4 1/3] swscale/input: add input support for RGBF32

2024-10-14 Thread Martin Schitter
--- libswscale/input.c | 72 -- libswscale/utils.c | 2 ++ 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/libswscale/input.c b/libswscale/input.c index 35c1fb7..e2af1d5 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -1170,6

[FFmpeg-devel] [PATCH v4 0/3] Float16/32 support impovements (v4)

2024-10-14 Thread Martin Schitter
Changes v4: Fix fate test error caused by changes pix_fmt order. Martin Martin Schitter (3): swscale/input: add input support for RGBF32 avutil: add RGBF16 pix_fmt swscale/input: add input support for RGBF16 libavutil/pixdesc.c | 25 + libavutil/pixfmt.h |