[FFmpeg-devel] [PATCH v3 01/17] avcodec/internal: add FFCodec.color_ranges

2024-08-30 Thread Niklas Haas
From: Niklas Haas I went through all codecs and put them into five basic categories: 1. JPEG range only 2. MPEG range only 3. Explicitly tagged 4. Broken (codec supports both but encoder ignores tags) 5. N/A (headerless or pseudo-formats) Filters in category 5 remain untouched. The rest gain an

[FFmpeg-devel] [PATCH v3 00/17] Add avcodec_get_supported_config()

2024-08-30 Thread Niklas Haas
Changes since v2: - Rebased onto master - Add length field, to be (optionally) populated by the callee. - Rewrite fftools code to take advantage of this new length field This should address the remaining feedback from Andreas. One thing I did notice though is that the `const void **out_configs`

[FFmpeg-devel] [PATCH v3 02/17] avcodec: add avcodec_get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas This replaces the myriad of existing lists in AVCodec by a unified API call, allowing us to (ultimately) trim down the sizeof(AVCodec) quite substantially, while also making this more trivially extensible. In addition to the already covered lists, add two new entries for color

[FFmpeg-devel] [PATCH v3 03/17] avcodec/encode: switch to avcodec_get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas --- libavcodec/encode.c | 90 - 1 file changed, 57 insertions(+), 33 deletions(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 34658d13d0..bc5acf985d 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -563,

[FFmpeg-devel] [PATCH v3 04/17] avcodec/allcodecs: add backcompat for new config API

2024-08-30 Thread Niklas Haas
From: Niklas Haas In order to avoid breaking older clients not yet using the new API, we need to add backwards compatibility for codecs which have switched from init_static() to get_supported_config(). This function can be removed entirely once the deprecated static fields are removed. --- liba

[FFmpeg-devel] [PATCH v3 11/17] fftools: drop unused/hacky macros

2024-08-30 Thread Niklas Haas
From: Niklas Haas Having macros initialize local variables seems strange to me, and there are no more current users of these macros. (The one that was commented out was incorrect anyway, since the macro has changed in the meantime) --- fftools/cmdutils.h | 13 - fftools/ffmpeg_f

[FFmpeg-devel] [PATCH v3 13/17] fftools/ffmpeg_filter: simplify choose_pix_fmts

2024-08-30 Thread Niklas Haas
From: Niklas Haas The only meaningful difference between choose_pix_fmts and the default code was the inclusion of an extra branch for `keep_pix_fmt` being true. However, in this case, we either: 1. Force the specific `ofp->format` that we inherited from ofilter_bind_ost, or if no format was

[FFmpeg-devel] [PATCH v3 15/17] fftools/ffmpeg_filter: switch to avcodec_get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas Signed-off-by: Anton Khirnov --- fftools/ffmpeg.h | 7 +-- fftools/ffmpeg_filter.c | 25 ++--- fftools/ffmpeg_mux_init.c | 35 ++- 3 files changed, 49 insertions(+), 18 deletions(-) diff --git a/fftools/ffmpe

[FFmpeg-devel] [PATCH v3 14/17] fftools/ffmpeg_mux_init: factor out binding filters to output streams

2024-08-30 Thread Niklas Haas
From: Anton Khirnov --- fftools/ffmpeg_mux_init.c | 137 ++ 1 file changed, 78 insertions(+), 59 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 6b101dcbbc..c6dc4a0699 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/

[FFmpeg-devel] [PATCH v3 17/17] fftools/ffmpeg_filter: remove YUVJ hack

2024-08-30 Thread Niklas Haas
From: Niklas Haas This is no longer needed, since we now correctly negotiate the required range from the mjpeg encoder via avcodec_get_supported_config(). Signed-off-by: Anton Khirnov --- fftools/ffmpeg_mux_init.c | 15 --- 1 file changed, 15 deletions(-) diff --git a/fftools/ffmp

[FFmpeg-devel] [PATCH v3 16/17] fftools/ffmpeg_filter: propagate codec yuv metadata to filters

2024-08-30 Thread Niklas Haas
From: Niklas Haas To convert between color spaces/ranges, if needed by the codec properties. Signed-off-by: Anton Khirnov --- fftools/ffmpeg.h | 4 fftools/ffmpeg_filter.c | 26 ++ fftools/ffmpeg_mux_init.c | 12 3 files changed, 42 inserti

[FFmpeg-devel] [PATCH v3 05/17] avcodec/libx265: switch to get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas --- libavcodec/libx265.c | 30 ++ 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index de0ad03ee3..513f473307 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -949,14 +949,28

[FFmpeg-devel] [PATCH v3 06/17] avcodec/libvpxenc: switch to get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas --- libavcodec/libvpxenc.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 1d5e9c33e8..228ede7c84 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -2088,13 +

[FFmpeg-devel] [PATCH v3 08/17] avcodec/mjpegenc: switch to get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas This codec's capabilities should be set dynamically based on the value of strict_std_compliance, when available. This will allow us to finally get rid of the strictness hack in ffmpeg_filter.c. --- libavcodec/mjpegenc.c | 24 ++-- 1 file changed, 22 insertio

[FFmpeg-devel] [PATCH v3 07/17] avcodec/libaomenc: switch to get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas --- libavcodec/libaomenc.c | 40 ++-- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 32bda992cb..0f7571ee7a 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.

[FFmpeg-devel] [PATCH v3 09/17] avcodec/codec_internal: nuke init_static_data()

2024-08-30 Thread Niklas Haas
From: Niklas Haas All hail get_supported_config() --- libavcodec/allcodecs.c | 7 +-- libavcodec/codec_internal.h | 8 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 60b1278830..66ea502cf4 100644 --- a/libavc

[FFmpeg-devel] [PATCH v3 10/17] fftools/opt_common: switch to avcodec_get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas While rewriting this macro, I decided to make it a bit more flexible so it can work for all of the fields (including future fields) in a more generic way, and to also print the channel layout using an AVBPrint to avoid hard-coding the assumption that the length is less than 128

[FFmpeg-devel] [PATCH v3 12/17] fftools/ffmpeg_mux_init: switch to avcodec_get_supported_config()

2024-08-30 Thread Niklas Haas
From: Niklas Haas --- fftools/ffmpeg_mux_init.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index e84fa9719f..6b101dcbbc 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c @@

Re: [FFmpeg-devel] Can't use __musl__ macro

2024-08-30 Thread Ramiro Polla
On 2024-08-30 05:50, Brad Smith wrote: On 2024-08-29 9:47 a.m., Ramiro Polla wrote: On Mon, Aug 12, 2024 at 7:16 AM Lance Fredrickson wrote: In commit 9e674b31606c805dd31b4bb754364a72a5877238 of ffmpeg this change tries to detect musl libc by way of a "__musl__" macro. This macro however, d

Re: [FFmpeg-devel] [PATCH] configure: improve check for POSIX ioctl

2024-08-30 Thread Ramiro Polla
On Thu, Aug 29, 2024 at 7:55 PM James Almer wrote: > On 8/29/2024 2:18 PM, Ramiro Polla wrote: > > On Thu, Aug 29, 2024 at 7:10 PM James Almer wrote: > >> On 8/29/2024 10:40 AM, Ramiro Polla wrote: > >>> Instead of relying on system #ifdefs which may or may not be correct, > >>> detect the POSIX

[FFmpeg-devel] [PATCH] hevc/sei: return INVALIDDATA when a referenced SPS is not available

2024-08-30 Thread Hendrik Leppkes
The code previously returned ENOMEM, despite this not being an allocation problem, but rather a bitstream problem referring to data not currently available. Fixes playback of such streams, as it allows further processing of NAL units after skipping the broken SEI NAL. --- libavcodec/hevc/sei.c |

Re: [FFmpeg-devel] [PATCH] avcodec/mpegvideoencdsp: convert stride parameters from int to ptrdiff_t

2024-08-30 Thread Ramiro Polla
On Mon, Aug 26, 2024 at 3:59 PM Ramiro Polla wrote: > > --- > libavcodec/aarch64/mpegvideoencdsp_init.c | 6 ++--- > libavcodec/aarch64/mpegvideoencdsp_neon.S | 9 +++ > libavcodec/arm/mpegvideoencdsp_init_arm.c | 4 +-- > libavcodec/mips/h263dsp_mips.h| 2 +- > libavcodec/mip

Re: [FFmpeg-devel] Can't use __musl__ macro

2024-08-30 Thread Brad Smith
On 2024-08-30 7:07 a.m., Ramiro Polla wrote: On 2024-08-30 05:50, Brad Smith wrote: On 2024-08-29 9:47 a.m., Ramiro Polla wrote: On Mon, Aug 12, 2024 at 7:16 AM Lance Fredrickson   wrote: In commit 9e674b31606c805dd31b4bb754364a72a5877238 of ffmpeg this change tries to detect musl libc by wa

Re: [FFmpeg-devel] [PATCH v3 01/17] avcodec/internal: add FFCodec.color_ranges

2024-08-30 Thread Cosmin Stejerean via ffmpeg-devel
> On Aug 30, 2024, at 3:15 AM, Niklas Haas wrote: > > N/A: > - ayuv, yuv4, y41p, v308, v210, v410, v408 (headerless) > - pgmyuv (headerless) > - prores, prores_aw, prores_ks (?) > - rawvideo, bitpacked (headerless) > - vnull, wrapped_avframe (pseudocodecs) AFAIK while ProRes doesn't have taggi

[FFmpeg-devel] [PATCH] swscale/aarch64/rgb2rgb: add deinterleaveBytes neon implementation

2024-08-30 Thread Ramiro Polla
A55 A76 deinterleave_bytes_c: 70342.0 34497.5 deinterleave_bytes_neon: 21594.5 ( 3.26x) 5535.2 ( 6.23x) deinterleave_bytes_aligned_c: 71340.8 34651.2 deinterleave_bytes_aligned_neon: 8616.8 ( 8.28x)

Re: [FFmpeg-devel] [PATCH] swscale/aarch64/rgb2rgb: add deinterleaveBytes neon implementation

2024-08-30 Thread Martin Storsjö
On Fri, 30 Aug 2024, Ramiro Polla wrote: A55 A76 deinterleave_bytes_c: 70342.0 34497.5 deinterleave_bytes_neon: 21594.5 ( 3.26x) 5535.2 ( 6.23x) deinterleave_bytes_aligned_c: 71340.8 34651.2 deinter

Re: [FFmpeg-devel] [PATCH] hevc/sei: return INVALIDDATA when a referenced SPS is not available

2024-08-30 Thread Jan Ekström
On Fri, Aug 30, 2024 at 8:40 PM Hendrik Leppkes wrote: > > The code previously returned ENOMEM, despite this not being an > allocation problem, but rather a bitstream problem referring to data not > currently available. > > Fixes playback of such streams, as it allows further processing of NAL > u

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vvcdec: filter, fix uninitialized variables for YUV400 format

2024-08-30 Thread Nuo Mi
On Fri, Aug 23, 2024 at 11:04 PM Nuo Mi wrote: > fix > ==135000== Conditional jump or move depends on uninitialised value(s) > ==135000==at 0x169FF95: vvc_deblock_bs (filter.c:699) > and > ==135000== Conditional jump or move depends on uninitialised value(s) > ==135000==at 0x16A2E72: ff_v

Re: [FFmpeg-devel] [PATCH 8/8] lavfi/af_aformat: convert to query_func2()

2024-08-30 Thread Michael Niedermayer
On Thu, Aug 29, 2024 at 10:50:52AM +0200, Anton Khirnov wrote: > --- > libavfilter/af_aformat.c | 14 -- > 1 file changed, 8 insertions(+), 6 deletions(-) Breaks fate here: Assertion !"Unreachable" failed at libavfilter/formats.c:1051 Aborted (core dumped) threads=1 make: *** [tests/

Re: [FFmpeg-devel] [PATCH v2 0/4] add bdof to the vvc decoder

2024-08-30 Thread Nuo Mi
On Sun, Aug 25, 2024 at 10:34 PM Nuo Mi wrote: > > > On Tue, Aug 20, 2024 at 9:22 PM Nuo Mi wrote: > >> Major changes since v1: >> remove hadd and pmulld as James suggested >> reduce vextracti128 >> >> I'll plan to merge next week to stay on track for the next release, > unless there are any obj