[FFmpeg-devel] [PATCH 1/2] swscale/output: alpha can become negative after scaling, use multiply

2024-06-16 Thread Michael Niedermayer
Fixes: left shift of negative value -3245 Fixes: 69047/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6571511551950848 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libswscale/output.c | 12 ++

[FFmpeg-devel] [PATCH 2/2] swscale/output: Avoid undefined overflow in yuv2rgb_write_full()

2024-06-16 Thread Michael Niedermayer
Fixes: signed integer overflow: -140140 * 16525 cannot be represented in type 'int' Fixes: 68859/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-4516387130245120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermaye

[FFmpeg-devel] [PATCH 1/6] aacdec_usac: apply specification fix M55715

2024-06-16 Thread Lynne via ffmpeg-devel
--- libavcodec/aac/aacdec_usac.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/libavcodec/aac/aacdec_usac.c b/libavcodec/aac/aacdec_usac.c index 98e8c1c0bc..065bc869d9 100644 --- a/libavcodec/aac/aacdec_usac.c +++ b/libavcodec/aac/aacdec_usac.c @@ -835,6 +835,11 @@ stati

[FFmpeg-devel] [PATCH 2/6] aac: expose ff_aac_sample_rate_idx() in aac.h

2024-06-16 Thread Lynne via ffmpeg-devel
The rate index is a value important to both encoders and decoders. USAC needs it as well, so put it into the shared main header. --- libavcodec/aac.h| 16 libavcodec/aac/aacdec.c | 18 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/liba

[FFmpeg-devel] [PATCH 3/6] aacdec_ac: fix an overread

2024-06-16 Thread Lynne via ffmpeg-devel
Fixes reading state->last[i + 1] in ff_aac_ac_get_context for the last array member. --- libavcodec/aac/aacdec_ac.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/aac/aacdec_ac.h b/libavcodec/aac/aacdec_ac.h index 0b98c0f0d9..b8d4ade4c6 100644 --- a/libavcodec/aac/a

[FFmpeg-devel] [PATCH 4/6] aacdec_usac: rename noise_scale to noise_bands

2024-06-16 Thread Lynne via ffmpeg-devel
This was a typo. --- libavcodec/aac/aacdec.h | 2 +- libavcodec/aac/aacdec_usac.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/aac/aacdec.h b/libavcodec/aac/aacdec.h index 86faf6454a..d1a80e9ac1 100644 --- a/libavcodec/aac/aacdec.h +++ b/libavcodec/aac/a

[FFmpeg-devel] [PATCH 5/6] aacdec_usac: remove custom rate_idx and use standard variable for it

2024-06-16 Thread Lynne via ffmpeg-devel
m4ac.sampling_index is what aacdec.c uses. --- libavcodec/aac/aacdec.h | 1 - libavcodec/aac/aacdec_usac.c | 35 ++- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/libavcodec/aac/aacdec.h b/libavcodec/aac/aacdec.h index d1a80e9ac1..e5a79a7139

[FFmpeg-devel] [PATCH 6/6] aacdec_usac, aacsbr: implement SBR support for USAC

2024-06-16 Thread Lynne via ffmpeg-devel
Currently, no eSBR features are supported. Thankfully, no encoders exist for it yet. --- libavcodec/aac/aacdec_usac.c | 119 +++--- libavcodec/aacsbr.h | 11 ++ libavcodec/aacsbr_template.c | 232 --- libavcodec/sbr.h | 32 +++-- 4

[FFmpeg-devel] [PATCH] avcodec/iirfilter: Move ff_iir_filter() to lavc/tests/iirfilter.c

2024-06-16 Thread Andreas Rheinhardt
It is only used by the test. Signed-off-by: Andreas Rheinhardt --- libavcodec/iirfilter.c | 14 -- libavcodec/iirfilter.h | 15 --- libavcodec/tests/iirfilter.c | 17 - 3 files changed, 16 insertions(+), 30 deletions(-) diff --git a/libavcodec

[FFmpeg-devel] [PATCH] swscale/aarch64: Add argb/abgr to yuv

2024-06-16 Thread Zhao Zhili
From: Zhao Zhili Test on Apple M1 with kperf: abgr_to_uv_8_c: 19.4 abgr_to_uv_8_neon: 29.9 abgr_to_uv_128_c: 146.4 abgr_to_uv_128_neon: 85.1 abgr_to_uv_1080_c: 1162.6 abgr_to_uv_1080_neon: 819.6 abgr_to_uv_1920_c: 2063.6 abgr_to_uv_1920_neon: 1435.1 abgr_to_uv_half_8_c: 16.4 abgr_to_uv_half_8_ne

Re: [FFmpeg-devel] [PATCH] avcodec/iirfilter: Move ff_iir_filter() to lavc/tests/iirfilter.c

2024-06-16 Thread Paul B Mahol
On Sun, Jun 16, 2024 at 2:07 PM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > It is only used by the test. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/iirfilter.c | 14 -- > libavcodec/iirfilter.h | 15 --- > libavcodec/tests/iirfi

Re: [FFmpeg-devel] FFmpeg 4.2.10 and 4.4.5

2024-06-16 Thread Michael Niedermayer
Hi On Fri, Jun 14, 2024 at 09:21:21PM +0200, Michael Niedermayer wrote: > On Thu, Jun 13, 2024 at 10:41:19PM +0200, Michael Niedermayer wrote: > > On Thu, Jun 13, 2024 at 12:14:54PM +0200, Michael Niedermayer wrote: > > > Hi all > > > > > > I intend to make 5.1.5 and 4.3.7 releases "soon"(1) for d

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Invalidate PPSs which refer to a changed SPS

2024-06-16 Thread Nuo Mi
On Sun, Jun 16, 2024 at 12:38 AM Frank Plowman wrote: > n 15/06/2024 13:24, Nuo Mi wrote: > > On Sat, Jun 15, 2024 at 2:35 PM Christophe Gisquet < > > christophe.gisq...@gmail.com> wrote: > > > >> Le ven. 14 juin 2024, 11:39, Frank Plowman a > >> écrit : > >> > >>> When the SPS associated with a

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Invalidate PPSs which refer to a changed SPS

2024-06-16 Thread Mark Thompson
On 15/06/2024 17:37, Frank Plowman wrote: > n 15/06/2024 13:24, Nuo Mi wrote: >> On Sat, Jun 15, 2024 at 2:35 PM Christophe Gisquet < >> christophe.gisq...@gmail.com> wrote: >> >>> Le ven. 14 juin 2024, 11:39, Frank Plowman a >>> écrit : >>> When the SPS associated with a particular SPS ID ch

Re: [FFmpeg-devel] lavfi: add perlin noise generator

2024-06-16 Thread Stefano Sabatini
On date Thursday 2024-06-13 16:45:48 +0100, Andrew Sayers wrote: > Some documentation nitpicks. Nothing jumped out about the code, but I don't > know the algorithm well enough to spot anything deep. > > > From 9932cfc19500acbd0685eb2cc8fd88e9af3f5dbd Mon Sep 17 00:00:00 2001 > > From: Stefano Sab

Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Discuss AV_OPT_FLAG_RUNTIME_PARAM more explicitly

2024-06-16 Thread Stefano Sabatini
On date Thursday 2024-06-06 17:02:06 +0100, Andrew Sayers wrote: > After a struct is initialized, only options with the > AV_OPT_FLAG_RUNTIME_PARAM flag can be modified. > > Make that clearer, for the sake of readers who would otherwise > assume all options can be modified at any time. > --- > li

[FFmpeg-devel] [PATCH] avformat: split off generic NAL function helpers into their own file

2024-06-16 Thread James Almer
Signed-off-by: James Almer --- libavformat/Makefile | 2 +- libavformat/avc.c | 164 +--- libavformat/avc.h | 37 --- libavformat/flvenc.c | 3 +- libavformat/hevc.c | 7 +- libavformat/hlsenc.c

[FFmpeg-devel] [PATCH v3 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-06-16 Thread Andrew Sayers
AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM is fine by me, here's a patch. I've added a "@deprecated" comment for the old name, but would this need to be queued up for 8.0? Technically this is a backwards-incompatible change to the existing API, even though it doesn't change the ABI or generate warnings

[FFmpeg-devel] [PATCH v3 1/3] lavu/opt: Rename AV_OPT_FLAG_RUNTIME_PARAM to ...POST_INIT_SETTABLE_PARAM

2024-06-16 Thread Andrew Sayers
The old name could be misread as the opposite of "AV_OPT_FLAG_READONLY" - some things can be set at runtime, others are read-only. Clarify that this refers to options that can be set after the struct is initialized. --- libavutil/opt.h | 10 +- 1 file changed, 9 insertions(+), 1 deletion(

[FFmpeg-devel] [PATCH v3 2/3] lavu/opt: Mention AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM in more places

2024-06-16 Thread Andrew Sayers
An inattentive user might not see the explanation at the top of this file. Paste the explanation to all the places they might see it. --- libavutil/opt.h | 21 + 1 file changed, 21 insertions(+) diff --git a/libavutil/opt.h b/libavutil/opt.h index e050d126ed..06cbe3c336 100644

[FFmpeg-devel] [PATCH v3 3/3] all: s/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g

2024-06-16 Thread Andrew Sayers
Use the new name for the macro throughout the codebase. Patch generated with the following command: sed -i -e 's/AV_OPT_FLAG_RUNTIME_PARAM/AV_OPT_FLAG_POST_INIT_SETTABLE_PARAM/g' \ $( git grep -l AV_OPT_FLAG_RUNTIME_PARAM | grep -v '^libavutil/opt.h' | grep -v '^doc/APIchanges$' ) --- libav

Re: [FFmpeg-devel] [PATCH v3 0/3] s/RUNTIME/POST_INIT_SETTABLE/

2024-06-16 Thread Paul B Mahol
Pointless. Commit log spam. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

[FFmpeg-devel] Development process for explaining contexts (was Re: [PATCH v6 1/4] doc: Explain what "context" means)

2024-06-16 Thread Andrew Sayers
Meta note #1: I've replied in this thread but changed the subject line. That's because it needs to stay focussed on solving this thread's problem, but may be of more general interest. Meta note #2: Stefano, I appreciate your feedback, but would rather wait for [1] to get sorted out, then formulate

Re: [FFmpeg-devel] Development process for explaining contexts (was Re: [PATCH v6 1/4] doc: Explain what "context" means)

2024-06-16 Thread Paul B Mahol
Avoid filling some of bellow points: https://erikbern.com/2023/12/13/simple-sabotage-for-software.html Especially part of rewriting public or internal API just for rewrite. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman

[FFmpeg-devel] [PATCH 1/6] swscale/yuv2rgb: fix conversion for widths not aligned to 8

2024-06-16 Thread Ramiro Polla
The C code for some pixel formats (rgb555, rgb565, rgb444, and monob) was not converting the last pixels on widths not aligned to 8. NOTE: the last pixel for odd widths is still not converted for any of the pixel formats in the C code for yuv2rgb except for monob. --- libswscale/yuv2rgb.c |

[FFmpeg-devel] [PATCH 2/6] swscale/yuv2rgb: add macros to simplify code generation

2024-06-16 Thread Ramiro Polla
--- libswscale/yuv2rgb.c | 574 +-- 1 file changed, 113 insertions(+), 461 deletions(-) diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index e641c765c7..7386d3a2a2 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -72,13 +72,13 @@ co

[FFmpeg-devel] [PATCH 3/6] swscale/yuv2rgb: fix yuv422p input in C code

2024-06-16 Thread Ramiro Polla
The C code was silently ignoring the second chroma line on yuv422p input. --- libswscale/yuv2rgb.c | 228 +-- 1 file changed, 196 insertions(+), 32 deletions(-) diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 7386d3a2a2..1ea87ac17a 100644 ---

[FFmpeg-devel] [PATCH 4/6] swscale/yuv2rgb: reindent after previous commit

2024-06-16 Thread Ramiro Polla
--- libswscale/yuv2rgb.c | 78 ++-- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 1ea87ac17a..977eb3a7dd 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -593,45 +593,45 @@ Sw

[FFmpeg-devel] [PATCH 5/6] checkasm: add tests for yuv2rgb

2024-06-16 Thread Ramiro Polla
--- tests/checkasm/Makefile | 2 +- tests/checkasm/checkasm.c | 1 + tests/checkasm/checkasm.h | 1 + tests/checkasm/sw_yuv2rgb.c | 205 tests/fate/checkasm.mak | 1 + 5 files changed, 209 insertions(+), 1 deletion(-) create mode 100644 tes

[FFmpeg-devel] [PATCH 6/6] swscale/yuv2rgb/x86: remove mmx/mmxext yuv2rgb functions

2024-06-16 Thread Ramiro Polla
These functions are either slower or barely faster than the C LUT yuv2rgb code. --- libswscale/x86/yuv2rgb.c | 51 - libswscale/x86/yuv2rgb_template.c | 4 -- libswscale/x86/yuv_2_rgb.asm | 93 +-- 3 files changed, 3 insertions(+), 145 del

[FFmpeg-devel] [PATCH 2/9] avcodec/mpeg4audio: Check that there is enough space for the first 3 elements in ff_mpeg4audio_get_config_gb()

2024-06-16 Thread Michael Niedermayer
Fixes: out of array access Fixes: 68863/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-4833546039525376 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mpeg4audio.c | 4 1 file cha

[FFmpeg-devel] [PATCH 3/9] avformat/iamf_parse: Try to use less space after the array

2024-06-16 Thread Michael Niedermayer
Fixes: out of array access Fixes: 68584/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6256656668229632 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iamf_parse.c | 3 +++ 1 file chan

[FFmpeg-devel] [PATCH 4/9] avformat/iamf_parse: Layer, thou shalt not be 0

2024-06-16 Thread Michael Niedermayer
Fixes: out of array access Fixes: 68302/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4665793796177920 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iamf_parse.c | 2 +- 1 file chang

[FFmpeg-devel] [PATCH 1/9] avcodec/targaenc: Allocate space for the palette

2024-06-16 Thread Michael Niedermayer
Fixes: out of array access Fixes: 68927/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TARGA_fuzzer-5105665067515904 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/targaenc.c | 5 - 1

[FFmpeg-devel] [PATCH 5/9] avformat/mov: Check extend and base offset

2024-06-16 Thread Michael Niedermayer
Fixes: signed integer overflow: 2314885530818453536 + 9151314442816847872 cannot be represented in type 'long' Fixes: 68359/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6571950311800832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg S

[FFmpeg-devel] [PATCH 6/9] avcodec/libvpxenc: Cleanup on error

2024-06-16 Thread Michael Niedermayer
This or fifo needs to be freed on errors explicitly I have not verified that its always safe to call vpx_free() this needs to be checked before applying this Fixes: memleak Fixes: 68937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBVPX_VP8_fuzzer-4830831016214528 Found-by: continuous fuz

[FFmpeg-devel] [PATCH 7/9] MAINTAINERS: Update the entries for the release maintainer for FFmpeg

2024-06-16 Thread Michael Niedermayer
Ive been told that someone at the BCN video tech meetup claimed to be the "release maintainer for FFmpeg". If you have any doubt who maintains releases, just do something like the following and look at the output: VER=5.1 echo commiters ; git shortlog --group=committer -s n$VER..release/$VER -n

[FFmpeg-devel] [PATCH 8/9] avcodec/smcenc: width < 4 is unsupported

2024-06-16 Thread Michael Niedermayer
Fixes: out of array read Fixes: 68939/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMC_fuzzer-587804104884224 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/smcenc.c | 3 +++ 1 file chan

[FFmpeg-devel] [PATCH 9/9] avcodec/r210enc: Use av_rescale for bitrate

2024-06-16 Thread Michael Niedermayer
Fixes: signed integer overflow: 281612954574848 * 65344 cannot be represented in type 'long' Fixes: 68956/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_R210_fuzzer-6459074458746880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off

Re: [FFmpeg-devel] [PATCH 6/6] swscale/yuv2rgb/x86: remove mmx/mmxext yuv2rgb functions

2024-06-16 Thread James Almer
On 6/16/2024 7:28 PM, Ramiro Polla wrote: These functions are either slower or barely faster than the C LUT yuv2rgb code. --- libswscale/x86/yuv2rgb.c | 51 - libswscale/x86/yuv2rgb_template.c | 4 -- libswscale/x86/yuv_2_rgb.asm | 93 +--

[FFmpeg-devel] [PATCH v2] avcodec/jpeg2000dec: Add support for placeholder passes, CAP, and CPF markers

2024-06-16 Thread Osamu Watanabe
This v2 - fixes the regression indicated in Message-ID: <20240615201144.GB4991@pb2> by counting the number of necessary terminations for non HT code blocks with the existing code. - drops the commit that was recently merged. Signed-off-by: Osamu Watanabe --- libavcodec/jpeg2000.h | 10 +

[FFmpeg-devel] [PATCH 1/2] avutil/executor: Allowing thread_count be zero

2024-06-16 Thread Zhao Zhili
From: Zhao Zhili When thread_count be zero, it will be run on current thread like !HAVE_THREADS. --- libavutil/executor.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/libavutil/executor.c b/libavutil/executor.c index 26691fe157..fb20104b58 10

[FFmpeg-devel] [PATCH 2/2] avcodec/vvc: Don't create new thread when thread_count is 1

2024-06-16 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/vvc/dec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c index f5603306f3..4ce2b1c6bd 100644 --- a/libavcodec/vvc/dec.c +++ b/libavcodec/vvc/dec.c @@ -1024,7 +1024,7 @@ static av_cold int vvc_deco

Re: [FFmpeg-devel] [PATCH 2/9] avcodec/mpeg4audio: Check that there is enough space for the first 3 elements in ff_mpeg4audio_get_config_gb()

2024-06-16 Thread Andreas Rheinhardt
Michael Niedermayer: > Fixes: out of array access > Fixes: > 68863/clusterfuzz-testcase-minimized-ffmpeg_dem_IAMF_fuzzer-4833546039525376 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libav

Re: [FFmpeg-devel] [PATCH] avcodec/loongarch/Makefile: Fix vc1dsp_lasx.o build criterion

2024-06-16 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Fixes ticket #11057. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/loongarch/Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/loongarch/Makefile b/libavcodec/loongarch/Makefile > index 07da2964e4..92c8b35906 100644 > -