Re: [FFmpeg-devel] [PATCH 06/12] fftools/ffmpeg_dec: apply cropping manually

2024-03-22 Thread James Almer
On 3/22/2024 5:28 PM, Anton Khirnov wrote: lavfi does not require aligned buffers, so we can safely apply top/left cropping by any amount, without passing any special flags to lavc. Longer term, an even better solution would probably be auto-inserting the crop filter (or its hwaccel versions) as

Re: [FFmpeg-devel] [PATCH 10/12] lavc/encode: map AVCodecContext.decoded_side_data to coded_side_data

2024-03-22 Thread James Almer
On 3/22/2024 5:28 PM, Anton Khirnov wrote: This way it can be automagically propagated through the encoder to muxing. --- libavcodec/encode.c | 23 +++ tests/ref/fate/libx265-hdr10 | 24 2 files changed, 35 insertions(+), 12 deletions(-)

[FFmpeg-devel] [PATCH 15/15] avformat/internal: Move FF_FMT_INIT_CLEANUP to demux.h

2024-03-22 Thread Andreas Rheinhardt
and rename it to FF_INFMT_INIT_CLEANUP. This flag is demuxer-only, so this is the more appropriate place for it. This does not preclude adding internal flags common to both demuxer and muxer in the future. Signed-off-by: Andreas Rheinhardt --- libavdevice/lavfi.c | 2 +-

[FFmpeg-devel] [PATCH 14/15] avformat/vqf: Return 0 on success in read_packet

2024-03-22 Thread Andreas Rheinhardt
Demuxers are not supposed to return the size of the packet read. Signed-off-by: Andreas Rheinhardt --- libavformat/vqf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/vqf.c b/libavformat/vqf.c index 4c7f5aa22e..409c014a92 100644 --- a/libavformat/vqf.c +++

[FFmpeg-devel] [PATCH 07/15] avformat/avr: Combine skips

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/avr.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/libavformat/avr.c b/libavformat/avr.c index 12286c04d4..261edef4b5 100644 --- a/libavformat/avr.c +++ b/libavformat/avr.c @@ -49,8 +49,7 @@ static int

[FFmpeg-devel] [PATCH 13/15] avformat/pcmdec: Reindent after the previous commit

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/pcmdec.c | 52 ++-- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index 03feefb5bb..e95a08df4b 100644 --- a/libavformat/pcmdec.c +++

[FFmpeg-devel] [PATCH 12/15] avformat/pcmdec: Avoid av_freep(&(void*){NULL})

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/pcmdec.c | 61 1 file changed, 39 insertions(+), 22 deletions(-) diff --git a/libavformat/pcmdec.c b/libavformat/pcmdec.c index e9c97f7959..03feefb5bb 100644 --- a/libavformat/pcmdec.c +++

[FFmpeg-devel] [PATCH 11/15] avformat/cdg: Don't store avio_size() return value in int

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/cdg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/cdg.c b/libavformat/cdg.c index 2030cdff89..43d919e302 100644 --- a/libavformat/cdg.c +++ b/libavformat/cdg.c @@ -46,7 +46,7 @@ static int read_probe(const

[FFmpeg-devel] [PATCH 10/15] avformat/lafdec: Fix shadowing

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/lafdec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/lafdec.c b/libavformat/lafdec.c index 05f30691ba..77eab2ea6b 100644 --- a/libavformat/lafdec.c +++ b/libavformat/lafdec.c @@ -148,8 +148,8 @@ static int

[FFmpeg-devel] [PATCH 09/15] avformat/argo_cvg: Avoid relocations for ArgoCVGOverride

2024-03-22 Thread Andreas Rheinhardt
The average length of the strings used here does not differ much from the length of the longest string; therefore it makes sense to use an array big enough for the longest string and not a pointer to a string. This also moves this array into .rodata (from .data.rel.ro). Signed-off-by: Andreas

[FFmpeg-devel] [PATCH 08/15] avformat/wady: Combine skips

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/wady.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/wady.c b/libavformat/wady.c index 6dcc0018f3..17b7a88c19 100644 --- a/libavformat/wady.c +++ b/libavformat/wady.c @@ -45,13 +45,12 @@ static int

[FFmpeg-devel] [PATCH 06/15] avformat/fsb: Don't set data_offset manually

2024-03-22 Thread Andreas Rheinhardt
It is set generically to the value that it is to here. Signed-off-by: Andreas Rheinhardt --- libavformat/fsb.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavformat/fsb.c b/libavformat/fsb.c index 4189822d8e..0febeffd56 100644 --- a/libavformat/fsb.c +++ b/libavformat/fsb.c @@ -157,7

[FFmpeg-devel] [PATCH 05/15] avformat/wvedec: Inline constant

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/wvedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/wvedec.c b/libavformat/wvedec.c index 43e6359892..13934b78e4 100644 --- a/libavformat/wvedec.c +++ b/libavformat/wvedec.c @@ -45,7 +45,7 @@ static int

[FFmpeg-devel] [PATCH 04/15] avformat/g722: Inline constants

2024-03-22 Thread Andreas Rheinhardt
Forgotten in 5f0e161dd61552ad70760bad35b869eaec7368ff. Signed-off-by: Andreas Rheinhardt --- libavformat/g722.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/g722.c b/libavformat/g722.c index 15519d90b5..adb78e8db5 100644 --- a/libavformat/g722.c +++

[FFmpeg-devel] [PATCH 03/15] avformat/fitsdec: Don't use AVBPrint for temporary storage

2024-03-22 Thread Andreas Rheinhardt
Most of the data in the temporary storage ends up being returned to the user as AVPacket.data, so it makes sense to avoid using the AVBPrint for temporary storage altogether (in particular in light of the fact that the blocks read here are too big for the small-string optimization anyway) and read

[FFmpeg-devel] [PATCH 02/15] avformat/hls: Don't access FFInputFormat.raw_codec_id

2024-03-22 Thread Andreas Rheinhardt
It is an implementation detail of other input formats whether they use raw_codec_id or not. The HLS demuxer should not rely on this. Signed-off-by: Andreas Rheinhardt --- libavformat/hls.c | 10 ++ libavformat/hls_sample_encryption.c | 1 + 2 files changed, 7

[FFmpeg-devel] [PATCH 01/15] configure: Make hls demuxer select AAC, AC3 and EAC3 demuxers

2024-03-22 Thread Andreas Rheinhardt
The code relies on their presence and would presumably crash when retrieving in_fmt->name if an encrypted stream with a codec id without demuxer were encountered. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure

[FFmpeg-devel] [PATCH] avformat/mux: Remove check for AVFMT_ALLOW_FLUSH

2024-03-22 Thread Andreas Rheinhardt
Due to the bump it is now certain that all devices that support flushing have the proper internal flag set. (Notice that the check for LIBAVFORMAT_VERSION was wrong.) Signed-off-by: Andreas Rheinhardt --- libavformat/mux.c | 6 -- 1 file changed, 6 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH 1/2] avformat/demux: Restore pkt->stream_index assert check

2024-03-22 Thread Andreas Rheinhardt
Andreas Rheinhardt: > It has been moved after "st = s->streams[pkt->stream_index]" > in b140b8332c617b0eef4f872f3ef90c469e99920f. > Deduplicate ff_read_packet() and ff_buffer_packet() > while fixing this. > This also fixes shadowing in ff_read_packet(). > > Signed-off-by: Andreas Rheinhardt >

[FFmpeg-devel] [PATCH 5/5] avcodec/hevcdec: export global side data in AVCodecContext

2024-03-22 Thread James Almer
Signed-off-by: James Almer --- libavcodec/avcodec.h | 2 +- libavcodec/h2645_sei.c | 217 - libavcodec/h2645_sei.h | 2 + libavcodec/hevcdec.c | 4 + 4 files changed, 136 insertions(+), 89 deletions(-) diff --git a/libavcodec/avcodec.h

[FFmpeg-devel] [PATCH 4/5] avcodec/decode: make the AVFrameSideData helper wrappers not depend on frames

2024-03-22 Thread James Almer
They can be useful to fill arrays stored in other structs. Signed-off-by: James Almer --- libavcodec/av1dec.c | 7 +-- libavcodec/cri.c| 3 +- libavcodec/decode.c | 98 ++--- libavcodec/decode.h | 28 ++-- libavcodec/dpx.c

[FFmpeg-devel] [PATCH 3/5] avutil/mastering_display_metadata: add a new allocator function that returns a size

2024-03-22 Thread James Almer
av_mastering_display_metadata_alloc() is not useful in scenarios where you need to know the runtime size of AVMasteringDisplayMetadata. Signed-off-by: James Almer --- Could also name it av_mastering_display_metadata_alloc2() libavutil/mastering_display_metadata.c | 13 +

[FFmpeg-devel] [PATCH 2/5] avutil/frame: add helper to remove side data of a given type from an array

2024-03-22 Thread James Almer
Signed-off-by: James Almer --- libavutil/frame.c | 6 ++ libavutil/frame.h | 5 + 2 files changed, 11 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index 0717d89711..3e225ce5a4 100644 --- a/libavutil/frame.c +++ b/libavutil/frame.c @@ -847,6 +847,12 @@ const

[FFmpeg-devel] [PATCH 1/5] avutil/frame: add helper for adding side data w/ AVBufferRef to array

2024-03-22 Thread James Almer
Signed-off-by: James Almer --- Now taking ownership of the passed in buffer, as Anton suggested. libavutil/frame.c | 22 ++ libavutil/frame.h | 23 +++ 2 files changed, 45 insertions(+) diff --git a/libavutil/frame.c b/libavutil/frame.c index

[FFmpeg-devel] [PATCH 3/3] avformat/aiffdec: Check for previously set channels

2024-03-22 Thread Michael Niedermayer
Fixes: out of array access (av_channel_layout_copy()) Fixes: 67087/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-4920720268263424 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer ---

[FFmpeg-devel] [PATCH 2/3] avformat/mov: Do not deallocate heif_item in a input dependant way

2024-03-22 Thread Michael Niedermayer
Fixes: out of array access Fixes: 67070/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5685384082161664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 ++-- 1 file

[FFmpeg-devel] [PATCH 1/3] avformat/cafdec: sanity check channels and bps

2024-03-22 Thread Michael Niedermayer
Fixes: Timeout Fixes: 67044/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5791144363491328 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/cafdec.c | 5 + 1 file changed, 5

Re: [FFmpeg-devel] [PATCH] tests: Remove fate-libx265-hdr10

2024-03-22 Thread Jan Ekström
On Fri, Mar 22, 2024 at 10:18 PM Anton Khirnov wrote: > > Quoting Zhao Zhili (2024-03-22 13:43:43) > > From: Zhao Zhili > > > > The test depends on the compile option of x265. It failed when > > HIGH_BIT_DEPTH isn't enabled. It also failed when asan is enabled > > because of memory issue inside

Re: [FFmpeg-devel] [PATCH 5/5] avutil/frame: Use av_realloc_array(), improve overflow check

2024-03-22 Thread Jan Ekström
On Fri, Mar 22, 2024 at 4:41 PM Andreas Rheinhardt wrote: > > Also use sizeof of the proper type, namely sizeof(**sd) > and not sizeof(*sd). > > Signed-off-by: Andreas Rheinhardt > --- > libavutil/frame.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git

Re: [FFmpeg-devel] [PATCH] avutil/timestamp: keep microsecond precision in av_ts_make_time_string

2024-03-22 Thread Andreas Rheinhardt
Marton Balint: > > > On Wed, 20 Mar 2024, Andreas Rheinhardt wrote: > >> Andreas Rheinhardt: >>> Marton Balint: av_ts_make_time_string() used "%.6g" format in the past, but this format was losing precision even when the timestamp to be printed was not that large. For

[FFmpeg-devel] [PATCH v3] configure: Explicitly check for static_assert, _Static_assert

2024-03-22 Thread Andreas Rheinhardt
C11 provides static assertions via _Static_assert and provides static_assert as a convenience define for this in assert.h. Our codebase uses the latter, as _Static_assert has actually already been deprecated in C23. Not all toolchains that declare support for C11 actually support it; e.g. MSVC

Re: [FFmpeg-devel] [PATCH] avutil/timestamp: keep microsecond precision in av_ts_make_time_string

2024-03-22 Thread Marton Balint
On Wed, 20 Mar 2024, Marton Balint wrote: On Wed, 20 Mar 2024, Andreas Rheinhardt wrote: Andreas Rheinhardt: Marton Balint: av_ts_make_time_string() used "%.6g" format in the past, but this format was losing precision even when the timestamp to be printed was not that large. For

Re: [FFmpeg-devel] [FFmpeg-cvslog] ffmpeg: pass first video AVFrame's side data to encoder

2024-03-22 Thread Anton Khirnov
Quoting James Almer (2024-03-22 20:38:38) > On 3/22/2024 6:52 AM, Anton Khirnov wrote: > > I objected to this indiscriminate copying in a previous review. > > > > There is no reason to expect side data to apply to the whole stream just > > because it happens to apply to the first frame. For many

[FFmpeg-devel] [PATCH] avfilter: propagate colorspace and color_range from buffer filter and between AVFilterLink.

2024-03-22 Thread Damiano Galassi
There two new fields were never sent down the filter chain, and no filter after the first had colorspace and color_range set, causing breakage in zscale and possible other filters. --- libavfilter/avfilter.c | 4 libavfilter/buffersrc.c | 2 ++ 2 files changed, 6 insertions(+) diff --git

Re: [FFmpeg-devel] [RFC] Channels

2024-03-22 Thread Michael Niedermayer
On Thu, Mar 21, 2024 at 11:59:17PM -0300, James Almer wrote: > On 3/21/2024 11:25 PM, Michael Niedermayer wrote: > > Hi all > > > > we have code like > > st->codecpar->ch_layout.nb_channels = avio_rb32(pb); > > > > and then somewhere there is some code that uses this by first allocating > > an

Re: [FFmpeg-devel] [PATCH 08/12] lavc/frame_thread_encoder: avoid assigning a whole AVCodecContext

2024-03-22 Thread Andreas Rheinhardt
Anton Khirnov: > It is highly unsafe, as AVCodecContext contains many allocated fields. > Copying information via AVCodecParameters and with av_opt_copy() should > handle everything needed by thread workers. > --- > libavcodec/frame_thread_encoder.c | 26 -- > 1 file

[FFmpeg-devel] [PATCH 09/12] lavc/decode: move sd_global_map to avcodec

2024-03-22 Thread Anton Khirnov
It will be shared with encoding code. --- libavcodec/avcodec.c | 14 ++ libavcodec/avcodec_internal.h | 16 +++- libavcodec/decode.c | 33 + 3 files changed, 38 insertions(+), 25 deletions(-) diff --git

[FFmpeg-devel] [PATCH 01/12] tests/fate/ffmpeg: evaluate thread count in fate-run.sh rather than make

2024-03-22 Thread Anton Khirnov
Fixes fate-ffmpeg-loopback-decoding with THREADS=random* --- tests/fate/ffmpeg.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 9cf05ead68..3c549b265e 100644 --- a/tests/fate/ffmpeg.mak +++ b/tests/fate/ffmpeg.mak @@

[FFmpeg-devel] [PATCH 06/12] fftools/ffmpeg_dec: apply cropping manually

2024-03-22 Thread Anton Khirnov
lavfi does not require aligned buffers, so we can safely apply top/left cropping by any amount, without passing any special flags to lavc. Longer term, an even better solution would probably be auto-inserting the crop filter (or its hwaccel versions) as needed. Multiple FATE tests no longer need

[FFmpeg-devel] [PATCH 10/12] lavc/encode: map AVCodecContext.decoded_side_data to coded_side_data

2024-03-22 Thread Anton Khirnov
This way it can be automagically propagated through the encoder to muxing. --- libavcodec/encode.c | 23 +++ tests/ref/fate/libx265-hdr10 | 24 2 files changed, 35 insertions(+), 12 deletions(-) diff --git a/libavcodec/encode.c

[FFmpeg-devel] [PATCH 12/12] fftools/ffmpeg_demux: make InputStream.autorotate private

2024-03-22 Thread Anton Khirnov
It is no longer accessed outside of ffmpeg_demux. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_demux.c | 8 +--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 1437b36b0d..84475434f3 100644 --- a/fftools/ffmpeg.h +++

[FFmpeg-devel] [PATCH 11/12] fftools/ffmpeg_enc: stop copying demuxer side data to the muxer

2024-03-22 Thread Anton Khirnov
All side data should be propagated through the trancoding pipeline. --- fftools/ffmpeg_enc.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f01be1c22f..138044da24 100644 --- a/fftools/ffmpeg_enc.c +++

[FFmpeg-devel] [PATCH 03/12] fftools/cmdutils: do not use a random codec's private options

2024-03-22 Thread Anton Khirnov
There is only a single caller of filter_codec_opts() that passes a NULL codec to it, which is streamcopy in ffmpeg CLI. In that case we only want generic AVCodecContext options, not private options of any specific encoder. --- fftools/cmdutils.c | 4 1 file changed, 4 deletions(-) diff

[FFmpeg-devel] [PATCH 08/12] lavc/frame_thread_encoder: avoid assigning a whole AVCodecContext

2024-03-22 Thread Anton Khirnov
It is highly unsafe, as AVCodecContext contains many allocated fields. Copying information via AVCodecParameters and with av_opt_copy() should handle everything needed by thread workers. --- libavcodec/frame_thread_encoder.c | 26 -- 1 file changed, 20 insertions(+), 6

[FFmpeg-devel] [PATCH 07/12] fftools/ffmpeg_filter: remove display matrix if we have applied it

2024-03-22 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 3d88482d07..9aa499a89e 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -143,6 +143,7 @@ typedef struct InputFilterPriv {

[FFmpeg-devel] [PATCH 05/12] fftools/ffmpeg_{demux, dec}: pass -bitexact through DecoderFlags

2024-03-22 Thread Anton Khirnov
Avoids abusing AV_DICT_MULTIKEY and relying on undocumented AVDictionary ordering behaviour. --- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_dec.c | 2 ++ fftools/ffmpeg_demux.c | 11 +-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 04/12] fftools/ffmpeg_dec: apply decoder options manually

2024-03-22 Thread Anton Khirnov
Do not pass an options dictionary to avcodec_open2(). This should be equivalent to current behaviour, but will allow overriding caller-supplied options in a cleaner and more robust manner. We can now set the COPY_OPAQUE flag directly rather going through dec_opts. --- fftools/ffmpeg_dec.c | 21

[FFmpeg-devel] [PATCH 02/12] fftools/ffmpeg_demux: only call filter_codec_opts() when we have a decoder

2024-03-22 Thread Anton Khirnov
It is pointless otherwise, as decoder options will not be used. --- fftools/ffmpeg_demux.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index 47312c9fe1..73b0eb0da1 100644 --- a/fftools/ffmpeg_demux.c +++

Re: [FFmpeg-devel] [PATCH] tests: Remove fate-libx265-hdr10

2024-03-22 Thread Anton Khirnov
Quoting Zhao Zhili (2024-03-22 13:43:43) > From: Zhao Zhili > > The test depends on the compile option of x265. It failed when > HIGH_BIT_DEPTH isn't enabled. It also failed when asan is enabled > because of memory issue inside of x265, which I don't think can > be fixed within FFmpeg. I

Re: [FFmpeg-devel] [FFmpeg-cvslog] ffmpeg: pass first video AVFrame's side data to encoder

2024-03-22 Thread James Almer
On 3/22/2024 6:52 AM, Anton Khirnov wrote: Quoting Jan Ekström (2024-03-20 18:31:49) ffmpeg | branch: master | Jan Ekström | Mon Jan 9 20:52:30 2023 +0200| [8f4b173029aa9ecefb1370c954ef769664920d08] | committer: Jan Ekström ffmpeg: pass first video AVFrame's side data to encoder This

Re: [FFmpeg-devel] [PATCH 6/6] MAINTAINERS: Add maintainer for LC3 audio codec wrapper

2024-03-22 Thread Michael Niedermayer
On Fri, Mar 22, 2024 at 05:25:27PM +, Kieran Kunhya wrote: > > You've merged nothing yet and you want push access already? > > > > I think this was done in good-faith saying they want to maintain. I > wouldn't antagonise people for no reason. +1 thx [...] -- Michael GnuPG fingerprint:

Re: [FFmpeg-devel] [PATCH] avcodec/libx264: Remove unused variable

2024-03-22 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel On Behalf Of Andreas > Rheinhardt > Sent: 2024年3月22日 21:03 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH] avcodec/libx264: Remove unused variable > > Signed-off-by: Andreas Rheinhardt > --- >

Re: [FFmpeg-devel] [PATCH 6/6] MAINTAINERS: Add maintainer for LC3 audio codec wrapper

2024-03-22 Thread Kieran Kunhya
> You've merged nothing yet and you want push access already? > I think this was done in good-faith saying they want to maintain. I wouldn't antagonise people for no reason. Kieran ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH 6/6] MAINTAINERS: Add maintainer for LC3 audio codec wrapper

2024-03-22 Thread Lynne
Mar 22, 2024, 18:02 by ffmpeg-devel@ffmpeg.org: > Signed-off-by: Antoine Soulier > Signed-off-by: Antoine SOULIER > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index dd633f37e8..d07512fc0c 100644 > --- a/MAINTAINERS > +++

Re: [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1

2024-03-22 Thread Niklas Haas
On Fri, 22 Mar 2024 14:08:07 +0100 Niklas Haas wrote: > On Fri, 22 Mar 2024 10:41:13 +0100 Anton Khirnov wrote: > > Quoting Niklas Haas (2024-03-21 13:11:32) > > > On Thu, 21 Mar 2024 11:16:57 +0100 Anton Khirnov > > > wrote: > > > > Quoting Niklas Haas (2024-03-19 20:16:39) > > > > > From:

[FFmpeg-devel] [PATCH 6/6] MAINTAINERS: Add maintainer for LC3 audio codec wrapper

2024-03-22 Thread Antoine Soulier via ffmpeg-devel
Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index dd633f37e8..d07512fc0c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -188,6 +188,7 @@ Codecs: libdavs2.c

[FFmpeg-devel] [PATCH 5/6] Changelog: Add LC3/LC3plus decoding/encoding support

2024-03-22 Thread Antoine Soulier via ffmpeg-devel
Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- Changelog | 1 + 1 file changed, 1 insertion(+) diff --git a/Changelog b/Changelog index c6e8f6bcaf..fb08ee2f81 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest

[FFmpeg-devel] [PATCH 3/6] configure: Add option for enabling LC3/LC3plus wrapper

2024-03-22 Thread Antoine Soulier via ffmpeg-devel
Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index 343edb38ab..eb8ff81a11 100755 --- a/configure +++ b/configure @@ -244,6 +244,7 @@ External library support: --enable-libjxl

[FFmpeg-devel] [PATCH 4/6] doc: Add LC3/LC3plus muxer and encoder parameters documentation

2024-03-22 Thread Antoine Soulier via ffmpeg-devel
Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- doc/encoders.texi | 57 +++ doc/general_contents.texi | 12 - doc/muxers.texi | 4 +++ 3 files changed, 72 insertions(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH 2/6] avformat/lc3: Add file format for LC3/LC3plus transport

2024-03-22 Thread Antoine Soulier via ffmpeg-devel
A file format is described in Bluetooth SIG LC3 and ETSI TS 103 634, for test purpose. This is the format implemented here. Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- libavformat/Makefile | 3 + libavformat/allformats.c | 3 + libavformat/lc3dec.c | 140

[FFmpeg-devel] [PATCH 1/6] avcodec/liblc3: Add encoding/decoding support of LC3 audio codec

2024-03-22 Thread Antoine Soulier via ffmpeg-devel
The LC3 audio codec is the default codec of Bluetooth LE audio. This is a wrapper over the liblc3 library (https://github.com/google/liblc3). Signed-off-by: Antoine Soulier Signed-off-by: Antoine SOULIER --- libavcodec/Makefile | 3 + libavcodec/allcodecs.c | 3 +

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_enc: Don't call frame_data twice

2024-03-22 Thread Jan Ekström
On Fri, Mar 22, 2024 at 6:07 PM Andreas Rheinhardt wrote: > > Signed-off-by: Andreas Rheinhardt > --- > fftools/ffmpeg_enc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c > index f01be1c22f..5f7fcf8a5f 100644 > --- a/fftools/ffmpeg_enc.c >

[FFmpeg-devel] [PATCH] fftools/ffmpeg_enc: Don't call frame_data twice

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg_enc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f01be1c22f..5f7fcf8a5f 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -646,7 +646,6 @@ static int

[FFmpeg-devel] [PATCH] avutil/channel_layout: don't clear the opaque pointer on type conversion

2024-03-22 Thread James Almer
Otherwise it would not be lossless. Signed-off-by: James Almer --- libavutil/channel_layout.c | 8 1 file changed, 8 insertions(+) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index a83618bcc7..3054ee08a5 100644 --- a/libavutil/channel_layout.c +++

[FFmpeg-devel] [PATCH 5/5] avutil/frame: Use av_realloc_array(), improve overflow check

2024-03-22 Thread Andreas Rheinhardt
Also use sizeof of the proper type, namely sizeof(**sd) and not sizeof(*sd). Signed-off-by: Andreas Rheinhardt --- libavutil/frame.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 7dd37e5490..d7a32cdc92 100644 ---

[FFmpeg-devel] [PATCH 4/4] avutil/frame: Rename av_frame_side_data_get and add wrapper for it

2024-03-22 Thread Andreas Rheinhardt
av_frame_side_data_get() has a const AVFrameSideData * const *sd parameter; so calling it with an AVFramesSideData **sd like AVCodecContext.decoded_side_data (or with a AVFramesSideData * const *sd) is safe, but the conversion is not performed automatically in C. All users of this function

[FFmpeg-devel] [PATCH 3/4] avutil/frame: Constify av_frame_side_data_get()

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Will bump minor and add an APIChanges entry for patches 3+4 on push. libavutil/frame.c | 2 +- libavutil/frame.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c index 89db687d9c..8598aa98a2 100644

[FFmpeg-devel] [PATCH 2/2] avcodec/libx265: Pass logctx as void*, not AVClass**

2024-03-22 Thread Andreas Rheinhardt
The latter need not be save, because av_log() expects to get a pointer to an AVClass-enabled structure and not only a fake object. If this function were actually be called in the following way: const AVClass *avcl = avctx->av_class; handle_mdcv(, ); the AVClass's item_name would expect to point

[FFmpeg-devel] [PATCH 1/2] avcodec/libx265: Don't use AVBPrint unnecessarily

2024-03-22 Thread Andreas Rheinhardt
This code uses the AVBPrint API for exactly one av_bprintf() in a scenario in which a good upper bound for the needed size of the buffer is available (with said upper bound being much smaller than sizeof(AVBPrint)). So one can simply use snprintf() instead. This also avoids the (always-false due

Re: [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1

2024-03-22 Thread Niklas Haas
On Fri, 22 Mar 2024 10:41:13 +0100 Anton Khirnov wrote: > Quoting Niklas Haas (2024-03-21 13:11:32) > > On Thu, 21 Mar 2024 11:16:57 +0100 Anton Khirnov wrote: > > > Quoting Niklas Haas (2024-03-19 20:16:39) > > > > From: Niklas Haas > > > > > > > > AV1 streams don't use configuration records,

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

2024-03-22 Thread Gyan Doshi
On 2024-03-22 06:22 pm, Anton Khirnov wrote: Michael, following up on the previous discussion in this thread - if you, personally, would like to vote for a different option than those suggested so far, please propose one. I am not going to add a large number of options that nobody actually

[FFmpeg-devel] [PATCH] avcodec/libx264: Remove unused variable

2024-03-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/libx264.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 2653941eb9..3d195fa6b6 100644 --- a/libavcodec/libx264.c +++ b/libavcodec/libx264.c @@ -867,7 +867,6 @@ static int

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

2024-03-22 Thread Nicolas George
Anton Khirnov (12024-03-22): > I am not going to add a large number of options that nobody actually > wants to vote for, as it imposes a burden on the voters who have to > carefully read and compare all the options. The one organizing the vote should not be one of the persons defending an option.

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

2024-03-22 Thread Anton Khirnov
Michael, following up on the previous discussion in this thread - if you, personally, would like to vote for a different option than those suggested so far, please propose one. I am not going to add a large number of options that nobody actually wants to vote for, as it imposes a burden on the

Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when config annexb=0

2024-03-22 Thread Zhao Zhili
> On Mar 22, 2024, at 18:36, Anton Khirnov wrote: > >> Subject: Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when >> config annexb=0 > > This could really use more explanation on what exactly is broken. Added detailed description and pushed, thanks! > > -- > Anton

[FFmpeg-devel] [PATCH] tests: Remove fate-libx265-hdr10

2024-03-22 Thread Zhao Zhili
From: Zhao Zhili The test depends on the compile option of x265. It failed when HIGH_BIT_DEPTH isn't enabled. It also failed when asan is enabled because of memory issue inside of x265, which I don't think can be fixed within FFmpeg. --- tests/fate/enc_external.mak | 5 -

Re: [FFmpeg-devel] [PATCH 01/13] avformat/mp3enc: Improve query_codec

2024-03-22 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signal that anything except MP3 and the ID3V2 attached pic types > are forbidden. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/mp3enc.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c >

Re: [FFmpeg-devel] [PATCH v10 14/14] avcodec/libx265: add support for writing out CLL and MDCV

2024-03-22 Thread Zhao Zhili
> On Mar 19, 2024, at 05:31, Jan Ekström wrote: > > 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.

Re: [FFmpeg-devel] [PATCH] doc/ffmpeg: mention how to pass options to loopback decoders

2024-03-22 Thread Anton Khirnov
Quoting Stefano Sabatini (2024-03-19 15:58:03) > On date Thursday 2024-03-14 11:12:31 +0100, Anton Khirnov wrote: > > --- > > doc/ffmpeg.texi | 14 ++ > > 1 file changed, 10 insertions(+), 4 deletions(-) > > > > diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi > > index

Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when config annexb=0

2024-03-22 Thread Anton Khirnov
> Subject: Re: [FFmpeg-devel] [PATCH v6] avcodec/libx264: fix extradata when > config annexb=0 This could really use more explanation on what exactly is broken. -- Anton Khirnov ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH 2/2] lavf/movenc: small cleanup for style

2024-03-22 Thread Jun Zhao
From: Jun Zhao Small cleanup for style, indent, switch case lables. BTW, the preferred way to ease multiple indentation levels in a switch statement is to align the switch and its subordinate case labels in the same column Signed-off-by: Jun Zhao --- libavformat/movenc.c | 71

[FFmpeg-devel] [PATCH 1/2] lavc/vvc_parser: small cleanup for style

2024-03-22 Thread Jun Zhao
From: Jun Zhao small cleanup for style, redundant semicolons, goto labels, in FFmpeg, we put goto labels at brace level. Signed-off-by: Jun Zhao --- libavcodec/vvc_parser.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/vvc_parser.c

Re: [FFmpeg-devel] [PATCH] [v4] avcodec/vaapi_encode: add customized surface alignment

2024-03-22 Thread Anton Khirnov
Quoting Araz Iusubov (2024-03-21 18:02:19) > diff --git a/libavutil/hwcontext.h b/libavutil/hwcontext.h > index bac30debae..1eb56aff78 100644 > --- a/libavutil/hwcontext.h > +++ b/libavutil/hwcontext.h > @@ -465,6 +465,13 @@ typedef struct AVHWFramesConstraints { > */ > int max_width; >

Re: [FFmpeg-devel] [RFC] Channels

2024-03-22 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-03-22 03:25:25) > Hi all > > we have code like > st->codecpar->ch_layout.nb_channels = avio_rb32(pb); > > and then somewhere there is some code that uses this by first allocating > an array and that then hits OOM > (it was this here: > map =

Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection

2024-03-22 Thread RS
This message has been marked as Public on 03/22/2024 10:16Z. On Friday, March 22, 2024 10:55 AM Rémi Denis-Courmont wrote: > So why are you arguing now? Because I still belive that using localaddr is the better approach. However, I will create and submit v3 of this patch and also create another

Re: [FFmpeg-devel] [PATCH v4 09/13] avutil/film_grain_params: add av_film_grain_params_select()

2024-03-22 Thread Anton Khirnov
Quoting Niklas Haas (2024-03-18 17:54:17) > +const AVFilmGrainParams *av_film_grain_params_select(const AVFrame *frame); Could this benefit from a flags parameter for future extensions? -- Anton Khirnov ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection

2024-03-22 Thread Rémi Denis-Courmont
Le 22 mars 2024 11:31:28 GMT+02:00, "Ignjatović, Lazar (RS)" a écrit : >>> I've compared ffmpeg 5.1.2 against my MR on IPv6 multicast. Here are >>> the >>> results: >> >> I don't care. That does not make your MR any less counter-sensical. > >If I may cite Marton Balint I am not answerable for

Re: [FFmpeg-devel] [FFmpeg-cvslog] ffmpeg: pass first video AVFrame's side data to encoder

2024-03-22 Thread Anton Khirnov
Quoting Jan Ekström (2024-03-20 18:31:49) > ffmpeg | branch: master | Jan Ekström | Mon Jan 9 > 20:52:30 2023 +0200| [8f4b173029aa9ecefb1370c954ef769664920d08] | committer: > Jan Ekström > > ffmpeg: pass first video AVFrame's side data to encoder > > This enables further configuration of

Re: [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1

2024-03-22 Thread Anton Khirnov
Quoting Niklas Haas (2024-03-21 13:11:32) > On Thu, 21 Mar 2024 11:16:57 +0100 Anton Khirnov wrote: > > Quoting Niklas Haas (2024-03-19 20:16:39) > > > From: Niklas Haas > > > > > > AV1 streams don't use configuration records, so delete them when > > > encoding to AV1. Ideally this would be, as

Re: [FFmpeg-devel] [PATCH v2] avformat: enable UDP IPv6 multicast interface selection

2024-03-22 Thread RS
>> I've compared ffmpeg 5.1.2 against my MR on IPv6 multicast. Here are >> the >> results: > > I don't care. That does not make your MR any less counter-sensical. If I may cite Marton Balint ``` d3bda871f033be4825ecb69d444b3396bf2a2eb7 avformat/udp: specify the local address for some source

Re: [FFmpeg-devel] [PATCH v2] configure: Explicitly check for static_assert

2024-03-22 Thread Martin Storsjö
On Fri, 22 Mar 2024, Andreas Rheinhardt wrote: Martin Storsjö: Both patches seem to work fine with MSVC 19.27 - I vaguely prefer the v2 version, which is simpler. But to me, we could also just revert the change to libavcodec/ccaption_dec.c, and declare that we require MSVC 19.28 instead.

Re: [FFmpeg-devel] [PATCH 1/7] lavc/vp9dsp: R-V mc copy_avg

2024-03-22 Thread flow gg
It might be a bit inconvenient to find the patches related to vp8, vp9 that were sent earlier. Here, I've placed them in a zip file in this reply flow gg 于2024年3月22日周五 14:03写道: > (This should be used after applying these patches) > > ``` > [FFmpeg-devel] [PATCH 1/4] lavc/vp9dsp: R-V V ipred dc

[FFmpeg-devel] [PATCH 7/7] lavc/vp9dsp: R-V V mc tap hv

2024-03-22 Thread flow gg
From 5d29de366bab4736b1e05e2167d976d344dd8c44 Mon Sep 17 00:00:00 2001 From: sunyuechi Date: Thu, 21 Mar 2024 23:21:18 +0800 Subject: [PATCH 7/7] lavc/vp9dsp: R-V V mc tap hv C908: vp9_avg_8tap_smooth_4hv_8bpp_c: 32.2 vp9_avg_8tap_smooth_4hv_8bpp_rvv_i64: 15.2 vp9_avg_8tap_smooth_8hv_8bpp_c:

[FFmpeg-devel] [PATCH 6/7] lavc/vp9dsp: R-V V mc bilin hv

2024-03-22 Thread flow gg
From 5df2835fd182378b78530e001669c65f3638946d Mon Sep 17 00:00:00 2001 From: sunyuechi Date: Thu, 21 Mar 2024 23:14:10 +0800 Subject: [PATCH 6/7] lavc/vp9dsp: R-V V mc bilin hv C908: vp9_avg_bilin_4hv_8bpp_c: 10.7 vp9_avg_bilin_4hv_8bpp_rvv_i64: 4.5 vp9_avg_bilin_8hv_8bpp_c: 38.7

[FFmpeg-devel] [PATCH 5/7] lavc/vp9dsp: R-V V mc tap v

2024-03-22 Thread flow gg
From 94aacf6d1d49cc009669f89c91db71038a13285d Mon Sep 17 00:00:00 2001 From: sunyuechi Date: Thu, 21 Mar 2024 23:08:01 +0800 Subject: [PATCH 5/7] lavc/vp9dsp: R-V V mc tap v C908: vp9_avg_8tap_smooth_4v_8bpp_c: 13.7 vp9_avg_8tap_smooth_4v_8bpp_rvv_i64: 5.0 vp9_avg_8tap_smooth_8v_8bpp_c: 49.7

[FFmpeg-devel] [PATCH 4/7] lavc/vp9dsp: R-V V mc bilin v

2024-03-22 Thread flow gg
From eb004dcf5cc6a3c379cb6cb7b8592afa65626c5c Mon Sep 17 00:00:00 2001 From: sunyuechi Date: Thu, 21 Mar 2024 23:00:19 +0800 Subject: [PATCH 4/7] lavc/vp9dsp: R-V V mc bilin v C908: vp9_avg_bilin_4v_8bpp_c: 5.5 vp9_avg_bilin_4v_8bpp_rvv_i64: 2.2 vp9_avg_bilin_8v_8bpp_c: 20.7

[FFmpeg-devel] [PATCH 3/7] lavc/vp9dsp: R-V V mc tap h

2024-03-22 Thread flow gg
The order of some instructions appears imperfect because, when len==32, the registers for operations like hv can only just suffice, making it difficult to adjust. It's possible to create a separate function for len<32, but it likely won't have a significant impact, so this hasn't been done yet.

[FFmpeg-devel] [PATCH 2/7] lavc/vp9dsp: R-V V mc bilin h

2024-03-22 Thread flow gg
From 7ad03f4bc70e4c334d8e52dce2ea2b6f09a9a244 Mon Sep 17 00:00:00 2001 From: sunyuechi Date: Thu, 21 Mar 2024 22:11:26 +0800 Subject: [PATCH 2/7] lavc/vp9dsp: R-V V mc bilin h C908: vp9_avg_bilin_4h_8bpp_c: 5.5 vp9_avg_bilin_4h_8bpp_rvv_i64: 2.5 vp9_avg_bilin_8h_8bpp_c: 19.7

[FFmpeg-devel] [PATCH 1/7] lavc/vp9dsp: R-V mc copy_avg

2024-03-22 Thread flow gg
(This should be used after applying these patches) ``` [FFmpeg-devel] [PATCH 1/4] lavc/vp9dsp: R-V V ipred dc 1-4 ``` From ea81872215165ff859a0b5b2e003c5c678ea8ed0 Mon Sep 17 00:00:00 2001 From: sunyuechi Date: Thu, 21 Mar 2024 22:01:18 +0800 Subject: [PATCH 1/7] lavc/vp9dsp: R-V mc copy_avg

Re: [FFmpeg-devel] [PATCH 4/4] lavc/vp9dsp: R-V V ipred tm

2024-03-22 Thread flow gg
Because the previous patch was updated, so it was updated in this response flow gg 于2024年3月3日周日 10:01写道: > Due to the PATCH 1/4 update, updates are made here. > > flow gg 于2024年3月2日周六 15:42写道: > >> >> From 9561d35be25c330a0be3a371269289ce21f5ada3 Mon Sep 17 00:00:00 2001 From: sunyuechi Date:

  1   2   >