Re: [FFmpeg-devel] [PATCH] Set native order for wav channel layouts up until 8 channels.

2024-02-27 Thread Romain Beauxis
Le sam. 24 févr. 2024 à 19:27, Michael Niedermayer a écrit : > > On Fri, Feb 23, 2024 at 02:41:06PM -0600, Romain Beauxis wrote: > > The new default channel layout for the various RIFF/WAV decoders is not > > backward compatible. > > > > Historically, most decoders will expect the channel layouts

Re: [FFmpeg-devel] [PATCH v6 12/13] avcodec/libx264: add support for writing out CLL and MDCV

2024-02-27 Thread Jan Ekström
On Wed, Feb 28, 2024 at 12:24 AM Andreas Rheinhardt wrote: > > Jan Ekström: > > Both of these two structures were first available with X264_BUILD > > 163, so make relevant functionality conditional on the version > > being at least such. > > > > Keep handle_side_data available in all cases as

Re: [FFmpeg-devel] [PATCH v6 06/13] avutil/frame: add helper for adding existing side data to set

2024-02-27 Thread James Almer
On 2/27/2024 7:12 PM, Jan Ekström wrote: --- libavutil/frame.c | 49 +++ libavutil/frame.h | 19 ++ 2 files changed, 68 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index d9741240e7..99c9ce4119 100644 ---

[FFmpeg-devel] [PATCH 2/2] avcodec/vorbisdec: Check remaining data in vorbis_residue_decode_internal()

2024-02-27 Thread Michael Niedermayer
Fixes: timeout Fixes: 66326/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VORBIS_fuzzer-629529186304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vorbisdec.c | 3 +++ 1 file

[FFmpeg-devel] [PATCH 1/2] avcodec/vvc/vvcdec: allow vvc_decode_close() on failed open

2024-02-27 Thread Michael Niedermayer
Fixes: division by 0 Fixes: 67008/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VVC_fuzzer-5873503163187200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vvc/vvcdec.c | 7 --- 1

Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode

2024-02-27 Thread James Almer
On 2/27/2024 7:22 PM, Cosmin Stejerean via ffmpeg-devel wrote: On Feb 27, 2024, at 1:49 PM, James Almer wrote: SVT-AV1 1.8.0 has this value set to 1.8.0, same as in the current git head commit. Is this in preparation for an upcoming release? Yes, this is in preparation for release 2.0

Re: [FFmpeg-devel] [PATCH v6 12/13] avcodec/libx264: add support for writing out CLL and MDCV

2024-02-27 Thread Andreas Rheinhardt
Jan Ekström: > Both of these two structures were first available with X264_BUILD > 163, so make relevant functionality conditional on the version > being at least such. > > Keep handle_side_data available in all cases as this way X264_init > does not require additional version based conditions

Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode

2024-02-27 Thread Cosmin Stejerean via ffmpeg-devel
> On Feb 27, 2024, at 1:49 PM, James Almer wrote: > >>> SVT-AV1 1.8.0 has this value set to 1.8.0, same as in the current git head >>> commit. Is this in preparation for an upcoming release? >> Yes, this is in preparation for release 2.0 which is targeted for next week. >>

[FFmpeg-devel] [PATCH] aarch64: Use regular hwcaps flags instead of HWCAP_CPUID for CPU feature detection on Linux

2024-02-27 Thread Martin Storsjö
The CPU feature detection was added in 493fcde50a84cb23854335bcb0e55c6f383d55db, using HWCAP_CPUID. The argument for using that, was that HWCAP_CPUID was added much earlier in the kernel (in Linux v4.11), while the HWCAP flags for individual features were added much later. And if compiling with

[FFmpeg-devel] [PATCH v6 13/13] avcodec/libx265: add support for writing out CLL and MDCV

2024-02-27 Thread Jan Ekström
The newer of these two are the separate integers for content light level, introduced in 3952bf3e98c76c31594529a3fe34e056d3e3e2ea , with X265_BUILD 75. As we already require X265_BUILD of at least 89, no further conditions are required. --- libavcodec/libx265.c | 88

[FFmpeg-devel] [PATCH v6 12/13] avcodec/libx264: add support for writing out CLL and MDCV

2024-02-27 Thread Jan Ekström
Both of these two structures were first available with X264_BUILD 163, so make relevant functionality conditional on the version being at least such. Keep handle_side_data available in all cases as this way X264_init does not require additional version based conditions within it. Finally, add a

[FFmpeg-devel] [PATCH v6 11/13] avcodec/libsvtav1: add support for writing out CLL and MDCV

2024-02-27 Thread Jan Ekström
These two were added in 28e23d7f348c78d49a726c7469f9d4e38edec341 and 3558c1f2e97455e0b89edef31b9a72ab7fa30550 for version 0.9.0 of SVT-AV1, which is also our minimum requirement right now. In other words, no additional version limiting conditions seem to be required. Additionally, add a FATE

[FFmpeg-devel] [PATCH v6 10/13] ffmpeg: pass first video AVFrame's side data to encoder

2024-02-27 Thread Jan Ekström
This enables further configuration of output based on the results of input decoding and filtering in a similar manner as the color information. --- fftools/ffmpeg_enc.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index

[FFmpeg-devel] [PATCH v6 08/13] avcodec: add frame side data array to AVCodecContext

2024-02-27 Thread Jan Ekström
This allows configuring an encoder by using AVFrameSideData. --- libavcodec/avcodec.h | 8 libavcodec/options.c | 2 ++ 2 files changed, 10 insertions(+) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 43859251cc..411f4caad3 100644 --- a/libavcodec/avcodec.h +++

[FFmpeg-devel] [PATCH v6 09/13] avcodec: add helper for configuring AVCodecContext's frame side data

2024-02-27 Thread Jan Ekström
This allows API clients that wish to configure multiple entries at a time to do so without writing the looping code themselves. --- libavcodec/avcodec.c | 30 ++ libavcodec/avcodec.h | 20 2 files changed, 50 insertions(+) diff --git

[FFmpeg-devel] [PATCH v6 07/13] avutil/frame: add helper for getting side data from array

2024-02-27 Thread Jan Ekström
--- libavutil/frame.c | 20 +++- libavutil/frame.h | 14 ++ 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 99c9ce4119..e7679bf34d 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -921,16 +921,26 @@

[FFmpeg-devel] [PATCH v6 06/13] avutil/frame: add helper for adding existing side data to set

2024-02-27 Thread Jan Ekström
--- libavutil/frame.c | 49 +++ libavutil/frame.h | 19 ++ 2 files changed, 68 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index d9741240e7..99c9ce4119 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@

[FFmpeg-devel] [PATCH v6 05/13] avutil/frame: add helper for adding side data to array

2024-02-27 Thread Jan Ekström
Additionally, add an API test to check that the no-duplicates addition works after duplicates have been inserted. --- libavutil/Makefile | 1 + libavutil/frame.c | 17 ++ libavutil/frame.h | 21 +++ libavutil/tests/side_data_set.c | 103

[FFmpeg-devel] [PATCH v6 04/13] avutil/frame: split side data removal out to non-AVFrame function

2024-02-27 Thread Jan Ekström
This will make it possible to reuse logic in further commits. --- libavutil/frame.c | 24 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 5d30887ec9..788999bdeb 100644 --- a/libavutil/frame.c +++

[FFmpeg-devel] [PATCH v6 03/13] avutil/frame: split side_data_from_buf to base and AVFrame func

2024-02-27 Thread Jan Ekström
--- libavutil/frame.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 615dcb1b83..5d30887ec9 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -787,23 +787,23 @@ FF_ENABLE_DEPRECATION_WARNINGS

[FFmpeg-devel] [PATCH v6 02/13] avutil/frame: add helper for freeing arrays of side data

2024-02-27 Thread Jan Ekström
--- libavutil/frame.c | 5 + libavutil/frame.h | 11 +++ 2 files changed, 16 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index d94710687b..615dcb1b83 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -90,6 +90,11 @@ static void

[FFmpeg-devel] [PATCH v6 01/13] avutil/frame: split side data list wiping out to non-AVFrame function

2024-02-27 Thread Jan Ekström
This will make it possible to to reuse logic in further commits. --- libavutil/frame.c | 23 ++- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index a3f07ca089..d94710687b 100644 --- a/libavutil/frame.c +++

[FFmpeg-devel] [PATCH v6 00/13] encoder AVCodecContext configuration side data

2024-02-27 Thread Jan Ekström
Differences to v5: 1. rebased on top of current master 2. as requested by James, there is no longer a set struct, but instead there now is an additional **-based list as well as a separate counter. Comparison URL (mostly configure and wrappers, avutil/frame.c):

Re: [FFmpeg-devel] [PATCH] avcodec/dxvenc: Use proper alignment, write endian-independent output

2024-02-27 Thread Andreas Rheinhardt
Sean McGovern: > Hi, > > On Mon, Feb 26, 2024 at 6:48 PM Andreas Rheinhardt > wrote: >> >> Fixes the dxv3enc-dxt1 FATE test with UBSan. >> >> Signed-off-by: Andreas Rheinhardt >> --- >> I have not actually tested whether the output is actually wrong >> on BE systems. Would be nice if someone

Re: [FFmpeg-devel] [PATCH] avcodec/dxvenc: Use proper alignment, write endian-independent output

2024-02-27 Thread Sean McGovern
Hi, On Mon, Feb 26, 2024 at 6:48 PM Andreas Rheinhardt wrote: > > Fixes the dxv3enc-dxt1 FATE test with UBSan. > > Signed-off-by: Andreas Rheinhardt > --- > I have not actually tested whether the output is actually wrong > on BE systems. Would be nice if someone could. > > libavcodec/dxvenc.c

Re: [FFmpeg-devel] [PATCH v4] avcodec/aarch64/hevc: add luma deblock NEON

2024-02-27 Thread Martin Storsjö
On Tue, 27 Feb 2024, J. Dekker wrote: Benched using single-threaded full decode on an Ampere Altra. Bpp Before After Speedup 8 73,3s 65,2s 1.124x 10 114,2s 104,0s 1.098x 12 125,8s 115,7s 1.087x Signed-off-by: J. Dekker --- Slightly improved 12bit version.

Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode

2024-02-27 Thread James Almer
On 2/27/2024 6:36 PM, Cosmin Stejerean via ffmpeg-devel wrote: On Feb 27, 2024, at 1:19 PM, James Almer wrote: SVT-AV1 1.8.0 has this value set to 1.8.0, same as in the current git head commit. Is this in preparation for an upcoming release? Yes, this is in preparation for release 2.0

Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode

2024-02-27 Thread Cosmin Stejerean via ffmpeg-devel
> On Feb 27, 2024, at 1:19 PM, James Almer wrote: > > SVT-AV1 1.8.0 has this value set to 1.8.0, same as in the current git head > commit. Is this in preparation for an upcoming release? Yes, this is in preparation for release 2.0 which is targeted for next week.

[FFmpeg-devel] [PATCH] avcodec/mss[12]: Cleanup generically on init failure

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mss1.c | 3 ++- libavcodec/mss2.c | 9 +++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/libavcodec/mss1.c b/libavcodec/mss1.c index fb5fc34ea1..5460673133 100644 --- a/libavcodec/mss1.c +++ b/libavcodec/mss1.c @@ -206,7

Re: [FFmpeg-devel] [PATCH] avcodec/libsvtav1: send the EOS signal without a one frame delay to allow for the library to operate in a low-delay mode

2024-02-27 Thread James Almer
On 2/23/2024 8:21 PM, Cosmin Stejerean via ffmpeg-devel wrote: From: Cosmin Stejerean Co-authored-by: Amir Naghdinezhad Signed-off-by: Cosmin Stejerean --- libavcodec/libsvtav1.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavcodec/libsvtav1.c

[FFmpeg-devel] [PATCH] avcodec/refstruct: Don't use STRIDE_ALIGN for alignment

2024-02-27 Thread Andreas Rheinhardt
It was always intended that the buffers returned by RefStruct shall have the same alignment guarantees as the buffers returned by av_malloc(); said alignment depends upon the arch and the enabled instruction set and the code used STRIDE_ALIGN as a proxy for this. Yet since

[FFmpeg-devel] [PATCH] avutil/mem_internal: Remove unneeded headers

2024-02-27 Thread Andreas Rheinhardt
Unneeded since 21814a70db08999efee49531c67f62e2678a62f4. Signed-off-by: Andreas Rheinhardt --- libavutil/mem_internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavutil/mem_internal.h b/libavutil/mem_internal.h index b1d89a0605..20f9b3e3f2 100644 --- a/libavutil/mem_internal.h +++

[FFmpeg-devel] [PATCH] avcodec/decode: Improve validity check a bit

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/decode.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index da6446d879..7c67b18bc4 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -977,8 +977,8 @@ int

Re: [FFmpeg-devel] [PATCH 2/2] swresample/resample: rework resample_one function to work the same way as the others

2024-02-27 Thread Marton Balint
On Tue, 27 Feb 2024, Michael Niedermayer wrote: On Tue, Feb 27, 2024 at 10:48:10AM +0100, Marton Balint wrote: Signed-off-by: Marton Balint --- libswresample/resample.c | 29 +++-- libswresample/resample.h | 4 ++--

[FFmpeg-devel] [PATCH] avcodec/libxeve: Use av_dict_iterate()

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/libxeve.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/libxeve.c b/libavcodec/libxeve.c index ef1681d397..c923ac1cac 100644 --- a/libavcodec/libxeve.c +++ b/libavcodec/libxeve.c @@ -354,8 +354,8 @@ static

[FFmpeg-devel] [PATCH 3/3 v2] avutil/opt: add an unsigned option type

2024-02-27 Thread James Almer
Signed-off-by: James Almer --- libavutil/opt.c | 19 +++ libavutil/opt.h | 2 ++ libavutil/tests/opt.c | 9 + tests/ref/fate/opt| 32 ++-- 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c

[FFmpeg-devel] [PATCH 2/3] avutil/tests/opt: test values > INT_MAX for INT64 type

2024-02-27 Thread James Almer
Signed-off-by: James Almer --- libavutil/tests/opt.c | 5 +++-- tests/ref/fate/opt| 25 ++--- 2 files changed, 17 insertions(+), 13 deletions(-) diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c index a914d0359a..11f29468fb 100644 --- a/libavutil/tests/opt.c

[FFmpeg-devel] [PATCH 1/3 v2] avutil/tests/opt: test negative values for INT and INT64 types

2024-02-27 Thread James Almer
Signed-off-by: James Almer --- libavutil/tests/opt.c | 11 +-- tests/ref/fate/opt| 35 ++- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c index e2582cc93d..a914d0359a 100644 ---

[FFmpeg-devel] [PATCH 7/9] avcodec/libxevd: Use CODEC_LONG_NAME()

2024-02-27 Thread Andreas Rheinhardt
Brings the length of the line down to less than 80 chars. Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index 5075936a0e..92804422a3 100644 --- a/libavcodec/libxevd.c +++

[FFmpeg-devel] [PATCH 9/9] avcodec/libxevd: Fix "if (ret = ff_foo() < 0)" precedence problem

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index f78606291c..f15c2583a1 100644 --- a/libavcodec/libxevd.c +++ b/libavcodec/libxevd.c @@ -204,7 +204,8 @@ static int

[FFmpeg-devel] [PATCH 8/9] avcodec/libxevd: Improve included headers a bit

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index 92804422a3..f78606291c 100644 --- a/libavcodec/libxevd.c +++ b/libavcodec/libxevd.c @@ -21,22 +21,18 @@ *

[FFmpeg-devel] [PATCH 6/9] avcodec/libxevd: Remove useless AVClass

2024-02-27 Thread Andreas Rheinhardt
This decoder does not have options. Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 12 1 file changed, 12 deletions(-) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index de0739a80c..5075936a0e 100644 --- a/libavcodec/libxevd.c +++ b/libavcodec/libxevd.c

[FFmpeg-devel] [PATCH 5/9] avcodec/libxevd: Reindent after the previous commit

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 74 ++-- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index 33fd18f74d..de0739a80c 100644 --- a/libavcodec/libxevd.c +++

[FFmpeg-devel] [PATCH 4/9] avcodec/libxevd: Deduplicate code

2024-02-27 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- The ownership semantics of the pkt_au packet seem crazy; I have no clue when ownership has actually passed to libxevd (or rather: when one can expect to get an image with this packet attached returned from the decoder). Furthermore, given that libxevd sees

[FFmpeg-devel] [PATCH 3/9] avcodec/libxevd: Avoid cloning AVPacket

2024-02-27 Thread Andreas Rheinhardt
Cloning a packet whose source is going to be unreferenced immediately afterwards is wasteful. Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/libxevd.c b/libavcodec/libxevd.c index

[FFmpeg-devel] [PATCH 2/9] avcodec/libxevd: Set AV_CODEC_CAP_DR1

2024-02-27 Thread Andreas Rheinhardt
This decoder uses av_image_copy() to copy decoded images to buffers obtained via ff_get_buffer(); ergo it can handle user-provided buffers. Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/libxevd.c

[FFmpeg-devel] [PATCH 1/9] avcodec/libxevd: Remove FF_CODEC_CAP_SETS_PKT_DTS cap

2024-02-27 Thread Andreas Rheinhardt
This decoder implements the receive_frame API; such decoders always have to set the pkt_dts field themselves and the avcodec test checks for this. Signed-off-by: Andreas Rheinhardt --- libavcodec/libxevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/libxevd.c

[FFmpeg-devel] [PATCH] web: Add spi.txt

2024-02-27 Thread Michael Niedermayer
This explains how to request refunds and what can be funded by SPI Co-Author: Stefano Sabatini --- Makefile | 2 +- src/spi| 98 ++ src/spi_js | 0 src/spi_title | 1 + src/template_head2 | 1 + 5 files changed,

Re: [FFmpeg-devel] [PATCH 1/1] aacenc_pred: prevent UB in ff_aac_adjust_common_pred()

2024-02-27 Thread Sean McGovern
Hi Andreas, First off all, thanks for having a look! :) On Tue, Feb 27, 2024 at 1:37 PM Andreas Rheinhardt wrote: > > Sean McGovern: > > --- > > libavcodec/aacenc_pred.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/libavcodec/aacenc_pred.c

Re: [FFmpeg-devel] [RFC] fate rsync switch to git

2024-02-27 Thread Vittorio Giovara
On Wed, Feb 21, 2024 at 3:50 PM wrote: > > > On 21 Feb 2024, at 15:38, Niklas Haas wrote: > > > On Tue, 20 Feb 2024 20:43:30 +0200 Jan Ekström wrote: > >> Do note that the idea was that this would only be for management of > >> the main archive, so it would not affect clients/runners rsync'ing

Re: [FFmpeg-devel] [PATCH] avcodec/dxvenc: Use proper alignment, write endian-independent output

2024-02-27 Thread James Almer
On 2/26/2024 8:50 PM, Andreas Rheinhardt wrote: Fixes the dxv3enc-dxt1 FATE test with UBSan. Signed-off-by: Andreas Rheinhardt --- I have not actually tested whether the output is actually wrong on BE systems. Would be nice if someone could. libavcodec/dxvenc.c | 4 ++-- 1 file changed, 2

Re: [FFmpeg-devel] [PATCH] avutil/mem: limit alignment to maximum simd align

2024-02-27 Thread Timo Rothenpieler
On 26.02.2024 17:58, Timo Rothenpieler wrote: On 11/02/2024 18:40, Timo Rothenpieler wrote: FFmpeg has instances of DECLARE_ALIGNED(32, ...) in a lot of structs, which then end up heap-allocated. By declaring any variable in a struct, or tree of structs, to be 32 byte aligned, it allows the

Re: [FFmpeg-devel] [PATCH 1/1] aacenc_pred: prevent UB in ff_aac_adjust_common_pred()

2024-02-27 Thread Andreas Rheinhardt
Sean McGovern: > --- > libavcodec/aacenc_pred.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/aacenc_pred.c b/libavcodec/aacenc_pred.c > index f87fcd5a00..d3efade85e 100644 > --- a/libavcodec/aacenc_pred.c > +++ b/libavcodec/aacenc_pred.c > @@ -162,9

Re: [FFmpeg-devel] [PATCH 2/2] swresample/resample: rework resample_one function to work the same way as the others

2024-02-27 Thread Michael Niedermayer
On Tue, Feb 27, 2024 at 10:48:10AM +0100, Marton Balint wrote: > Signed-off-by: Marton Balint > --- > libswresample/resample.c | 29 +++-- > libswresample/resample.h | 4 ++-- > libswresample/resample_template.c | 14 -- > 3 files changed,

Re: [FFmpeg-devel] [PATCH 1/2] swresample/resample: fix rounding errors with filter_size=1 and phase_shift=0

2024-02-27 Thread Michael Niedermayer
On Tue, Feb 27, 2024 at 10:48:09AM +0100, Marton Balint wrote: > Depending on input chunk size noticable corrpution was hearable, here is an > example command line: > > ffplay -f lavfi -i > "sine=440:r=8000:samples_per_frame=32,aresample=24000:filter_size=1:phase_shift=0" > > Fix this by

[FFmpeg-devel] Exposing get_level_str log function

2024-02-27 Thread Leandro Moreira
Hey folks, I was adding get_level_str to a golang libAV/ffmpeg binding and noticed it is not exported. The first question is this by design? If not, what are your thoughts on exposing it through log.h? Thanks

Re: [FFmpeg-devel] [RFC] clarifying the TC conflict of interest rule

2024-02-27 Thread Michael Niedermayer
On Tue, Feb 27, 2024 at 08:20:30AM +0100, Anton Khirnov wrote: > Quoting Michael Niedermayer (2024-02-26 23:47:20) > > > > Look at the 3 patches i just posted. > > I suspect we can move alot closer to what you suggest without a vote but > > simply by consensus > > Your patches use a 'must'

[FFmpeg-devel] [PATCH v4] avfilter: add vf_overlay_videotoolbox

2024-02-27 Thread gnattu via ffmpeg-devel
Overlay filter for VideoToolbox hwframes. Unlike most hardware overlay filters, this filter does not require the two inputs to have the same pixel format; instead, it will perform format conversion automatically with hardware accelerated methods. Signed-off-by: Gnattu OC --- Changes from v3: -

[FFmpeg-devel] [PATCH v2 6/6] avcodec/mediacodec_wrapper: remove unnecessary NULL checks before calling Delete{Global, Local}Ref()

2024-02-27 Thread Matthieu Bouron
Delete{Global,Local}Ref already handle NULL. --- libavcodec/mediacodec_wrapper.c | 189 1 file changed, 47 insertions(+), 142 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 78cd28f53d..306359071e 100644 ---

[FFmpeg-devel] [PATCH v2 5/6] avcodec/mediacodec_wrapper: use an OFFSET() macro where relevant

2024-02-27 Thread Matthieu Bouron
Reduces a bit the horizontal spacing. --- libavcodec/mediacodec_wrapper.c | 138 +--- 1 file changed, 72 insertions(+), 66 deletions(-) diff --git a/libavcodec/mediacodec_wrapper.c b/libavcodec/mediacodec_wrapper.c index 0880ddd3ef..78cd28f53d 100644 ---

[FFmpeg-devel] [PATCH v2 4/6] avutil/jni: remove unnecessary NULL checks before calling DeleteLocalRef()

2024-02-27 Thread Matthieu Bouron
Delete{Global,Local}Ref() already handle NULL. --- libavcodec/ffjni.c | 14 +++--- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/libavcodec/ffjni.c b/libavcodec/ffjni.c index e3cf24d3e2..69d9a9faa3 100644 --- a/libavcodec/ffjni.c +++ b/libavcodec/ffjni.c @@ -236,17 +236,9

[FFmpeg-devel] [PATCH v2 3/6] avutil/jni: use size_t to store structure offsets

2024-02-27 Thread Matthieu Bouron
--- libavcodec/ffjni.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ffjni.h b/libavcodec/ffjni.h index 6027bac0ab..d5894609ed 100644 --- a/libavcodec/ffjni.h +++ b/libavcodec/ffjni.h @@ -24,6 +24,7 @@ #define AVCODEC_FFJNI_H #include +#include /* *

[FFmpeg-devel] [PATCH v2 2/6] avformat: add Android content resolver protocol support

2024-02-27 Thread Matthieu Bouron
Handles Android content-uri starting with content://. --- configure | 2 + doc/APIchanges | 3 + libavcodec/jni.c| 3 +- libavformat/Makefile| 1 + libavformat/file.c | 157 libavformat/protocols.c | 1 + 6

[FFmpeg-devel] [PATCH v2 1/6] avcodec: add av_jni_{get, set}_android_app_ctx helper

2024-02-27 Thread Matthieu Bouron
This will allow users to pass the Android ApplicationContext which is mandatory to retrieve the ContentResolver responsible to resolve/open Android content-uri. --- libavcodec/jni.c | 40 libavcodec/jni.h | 17 + 2 files changed, 57

[FFmpeg-devel] Add protocol for Android content providers (v2)

2024-02-27 Thread Matthieu Bouron
Diff from initial patchset: - directly include libavcodec/ffjni.c from libavformat/file.c instead of migrating ffjni to libavutil (avpriv_*) - check that the passed application context reference is a global one and error out if it's not the case -- Matthieu

Re: [FFmpeg-devel] [PATCH 2/7] avutil: add av_jni_{get, set}_android_app_ctx helper

2024-02-27 Thread Matthieu Bouron
On Tue, Feb 27, 2024 at 02:42:01PM +0100, Andreas Rheinhardt wrote: > Matthieu Bouron: > > This will allow users to pass the Android ApplicationContext which is > > mandatory > > to retrieve the ContentResolver responsible to resolve/open Android > > content-uri. > > --- > > libavutil/jni.c |

[FFmpeg-devel] [PATCH 2/2] avutil/opt: add an unsigned option type

2024-02-27 Thread James Almer
Signed-off-by: James Almer --- libavutil/opt.c | 20 libavutil/opt.h | 1 + libavutil/tests/opt.c | 9 + tests/ref/fate/opt| 32 ++-- 4 files changed, 60 insertions(+), 2 deletions(-) diff --git a/libavutil/opt.c

[FFmpeg-devel] [PATCH 1/2] avutil/tests/opt: test negative values for INT and INT64 types

2024-02-27 Thread James Almer
Signed-off-by: James Almer --- libavutil/tests/opt.c | 11 +-- tests/ref/fate/opt| 35 ++- 2 files changed, 39 insertions(+), 7 deletions(-) diff --git a/libavutil/tests/opt.c b/libavutil/tests/opt.c index e2582cc93d..a914d0359a 100644 ---

[FFmpeg-devel] [PATCH 2/2] fftools/ffprobe: add AVFilmGrainParams printing

2024-02-27 Thread Niklas Haas
From: Niklas Haas So we can add a FATE test for this. --- fftools/ffprobe.c | 118 ++ 1 file changed, 118 insertions(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index ea225f14ab7..a2e02604dc5 100644 --- a/fftools/ffprobe.c +++

[FFmpeg-devel] [PATCH 1/2] avfilter/vf_showinfo: add AVFilmGrainAOMParams support

2024-02-27 Thread Niklas Haas
From: Niklas Haas For my own testing purposes. --- libavfilter/vf_showinfo.c | 42 +-- 1 file changed, 40 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 309de28df91..830170363bc 100644 ---

Re: [FFmpeg-devel] [PATCH 2/7] avutil: add av_jni_{get, set}_android_app_ctx helper

2024-02-27 Thread Andreas Rheinhardt
Matthieu Bouron: > This will allow users to pass the Android ApplicationContext which is > mandatory > to retrieve the ContentResolver responsible to resolve/open Android > content-uri. > --- > libavutil/jni.c | 28 > libavutil/jni.h | 17 + > 2

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-27 Thread Matthieu Bouron
On Tue, Feb 27, 2024 at 09:14:04PM +0800, Zhao Zhili wrote: > > > > On Feb 27, 2024, at 15:17, Matthieu Bouron > > wrote: > > > > On Sat, Feb 24, 2024 at 12:29:24PM +0100, Matthieu Bouron wrote: > >> On Thu, Feb 15, 2024 at 10:13:03AM +0100, Matthieu Bouron wrote: > >>> Le jeu. 15 févr. 2024,

Re: [FFmpeg-devel] Add protocol for Android content providers

2024-02-27 Thread Zhao Zhili
> On Feb 27, 2024, at 15:17, Matthieu Bouron wrote: > > On Sat, Feb 24, 2024 at 12:29:24PM +0100, Matthieu Bouron wrote: >> On Thu, Feb 15, 2024 at 10:13:03AM +0100, Matthieu Bouron wrote: >>> Le jeu. 15 févr. 2024, 9:46 AM, Zhao Zhili a >>> écrit : >>> > 在

[FFmpeg-devel] [PATCH v4] avcodec/aarch64/hevc: add luma deblock NEON

2024-02-27 Thread J. Dekker
Benched using single-threaded full decode on an Ampere Altra. Bpp Before After Speedup 8 73,3s 65,2s 1.124x 10 114,2s 104,0s 1.098x 12 125,8s 115,7s 1.087x Signed-off-by: J. Dekker --- Slightly improved 12bit version. libavcodec/aarch64/hevcdsp_deblock_neon.S | 417

[FFmpeg-devel] [PATCH] avcodec/Makefile: Add missing AV1 decoder->av1_parse.o dependency

2024-02-27 Thread Andreas Rheinhardt
Needed for ff_av1_framerate(). Signed-off-by: Andreas Rheinhardt --- libavcodec/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 09ae5270b3..cf8b5aac81 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@

Re: [FFmpeg-devel] [PATCH v3] avformat/mov: Don't use entry[-1] in pointer arithmetic

2024-02-27 Thread Andreas Rheinhardt
James Almer: > On 2/26/2024 8:27 PM, Andreas Rheinhardt wrote: >> It is undefined behaviour. >> Fixes many failed tests with UBSan and GCC 13 like >> "src/libavformat/mov.c:4229:44: runtime error: store to address >> 0x5572abe20f80 with insufficient space for an object of type 'struct >>

[FFmpeg-devel] [PATCH 2/2] swresample/resample: rework resample_one function to work the same way as the others

2024-02-27 Thread Marton Balint
Signed-off-by: Marton Balint --- libswresample/resample.c | 29 +++-- libswresample/resample.h | 4 ++-- libswresample/resample_template.c | 14 -- 3 files changed, 21 insertions(+), 26 deletions(-) diff --git a/libswresample/resample.c

[FFmpeg-devel] [PATCH 1/2] swresample/resample: fix rounding errors with filter_size=1 and phase_shift=0

2024-02-27 Thread Marton Balint
Depending on input chunk size noticable corrpution was hearable, here is an example command line: ffplay -f lavfi -i "sine=440:r=8000:samples_per_frame=32,aresample=24000:filter_size=1:phase_shift=0" Fix this by rounding the fixed point fractions up instead of down. Signed-off-by: Marton