[FFmpeg-devel] [PATCH 2/2] avformat/riffdec: follow the MS docs more strictly for setting wav channel layouts

2024-03-17 Thread Marton Balint
suggests [1] [1] https://learn.microsoft.com/en-us/previous-versions/windows/hardware/design/dn653308(v=vs.85)#details-about-dwchannelmask Signed-off-by: Marton Balint --- libavformat/riffdec.c | 28 +--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git

[FFmpeg-devel] [PATCH 1/2] avformat/riff: pass an AVFormatContext explicitly to ff_get_wav_header

2024-03-17 Thread Marton Balint
Will be useful later. --- libavformat/riff.h| 2 +- libavformat/riffdec.c | 18 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/riff.h b/libavformat/riff.h index a93eadfeca..719fd7a17d 100644 --- a/libavformat/riff.h +++ b/libavformat/riff.h @@

[FFmpeg-devel] [PATCH] avformat/mov_chan: respect channel order when parsing and creating chan atom

2024-03-17 Thread Marton Balint
Previously we always assumed that the channels are in native order, even if they were not. The new channel layout API allows us to signal the proper channel order, so let's do so. Fixes ticket #98. --- libavformat/mov_chan.c | 464 +++-- 1 file changed, 211

Re: [FFmpeg-devel] [PATCH] doc/filters: Change rdiv (vf_convolution) documentation to reflect actual behavior

2024-03-16 Thread Marton Balint
On Thu, 14 Mar 2024, Stone Chen wrote: The documentation correctly states that the rdiv is a multiplier but incorrectly states the default behavior is to multiply by the sum of all matrix elements - it multiplies by 1/sum. This changes the documentation to match the code. Address trac

Re: [FFmpeg-devel] [PATCH] avformat/mxfdec: signal channel layouts using the new channel layout api

2024-03-16 Thread Marton Balint
On Thu, 14 Mar 2024, Tomas Härdin wrote: fre 2024-03-08 klockan 21:13 +0100 skrev Marton Balint: Signed-off-by: Marton Balint ---  libavformat/mxfdec.c | 129 ++--- --  1 file changed, 53 insertions(+), 76 deletions(-) No idea how the new API works

Re: [FFmpeg-devel] Fixes #10509

2024-03-16 Thread Marton Balint
On Sun, 17 Mar 2024, Poorva wrote: On Mon, Mar 11, 2024 at 1:10 AM Leo Izen wrote: On 3/9/24 15:49, Poorva wrote: I have attached the git patch containing the changes for your review. This patch is submitted as part of my qualification task for Google Summer of Code (GSoC) Your editor

Re: [FFmpeg-devel] [PATCH v3 7/9] avformat/pcm: factorize and improve determining the default packet size

2024-03-16 Thread Marton Balint
On Fri, 15 Mar 2024, Marton Balint wrote: - Remove the 1024 cap on the number of samples, for high sample rate audio it was suboptimal, calculate the low neighbour power of two for the number of samples (audio blocks) instead. - Make the function work correctly also for non-pcm codecs

Re: [FFmpeg-devel] [PATCH 1/7] avutil/channel_layout: add AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL

2024-03-16 Thread Marton Balint
On Sat, 9 Mar 2024, Marton Balint wrote: Signed-off-by: Marton Balint --- doc/APIchanges | 3 +++ libavutil/channel_layout.c | 30 ++ libavutil/channel_layout.h | 7 +++ libavutil/version.h| 2 +- 4 files changed, 41 insertions(+), 1

Re: [FFmpeg-devel] [PATCH] avformat/mpegtsenc: correct bitstream check

2024-03-16 Thread Marton Balint
On Sat, 16 Mar 2024, Gyan Doshi wrote: 8559cce3c3 made the bitstream check generic using a LUT. However, one of the comparisons which involves a bitwise AND and equality check is faulty due to operator precedence. First reported and analysed at

[FFmpeg-devel] [PATCH v3 7/9] avformat/pcm: factorize and improve determining the default packet size

2024-03-14 Thread Marton Balint
. Signed-off-by: Marton Balint --- libavformat/pcm.c | 41 ++--- libavformat/pcm.h | 1 + tests/ref/seek/lavf-al | 46 +- tests/ref/seek/lavf-ul | 46 +- 4 files changed, 76

Re: [FFmpeg-devel] [PATCH v2 9/9] avformat/pcm: decrease target audio frame per sec to 10

2024-03-14 Thread Marton Balint
On Thu, 14 Mar 2024, Paul B Mahol wrote: This is just ugly hack for workaround around broken ffmpeg threading. This actually improves single threaded performance as well, check it with ffprobe if you want. Sure, the reason I turned my attention to this is the speed loss of ffmpeg.c

Re: [FFmpeg-devel] [PATCH v2 9/9] avformat/pcm: decrease target audio frame per sec to 10

2024-03-14 Thread Marton Balint
On Thu, 14 Mar 2024, Tobias Rapp wrote: On 08/03/2024 01:53, Marton Balint wrote: This makes the wav and pcm demuxer demux bigger packets, which is more efficient. [...] +0, 136000, 136000, 2000,24000, f952be1e1c7d48acd73d652ef4ea3aad +0, 138000, 138000

Re: [FFmpeg-devel] [PATCH] Change rdiv (vf_convolution) documentation to reflect actual behavior

2024-03-13 Thread Marton Balint
On Wed, 13 Mar 2024, Stone Chen wrote: On Wed, Mar 13, 2024 at 4:26 AM Marton Balint wrote: On Tue, 12 Mar 2024, Stone Chen wrote: > The documentation correctly states that the rdiv is a multiplier but incorrectly states the default behavior is to multiply by the sum of all mat

Re: [FFmpeg-devel] [PATCH] Change rdiv (vf_convolution) documentation to reflect actual behavior

2024-03-13 Thread Marton Balint
On Tue, 12 Mar 2024, Stone Chen wrote: The documentation correctly states that the rdiv is a multiplier but incorrectly states the default behavior is to multiply by the sum of all matrix elements - it multiplies by 1/sum. This changes the documentation to match the code. Please mention

Re: [FFmpeg-devel] [PATCH 1/1] avformat/gopher: Add audio and video itemtypes

2024-03-12 Thread Marton Balint
On Tue, 5 Mar 2024, Christian Lee Seibold wrote: The 's', ';', and '<' itemtypes are used for audio and video by Gophernicus and Gopher+. Signed-off-by: Christian Lee Seibold --- libavformat/gopher.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/gopher.c

Re: [FFmpeg-devel] [PATCH] fate: fix generating references when sh=dash

2024-03-12 Thread Marton Balint
On Tue, 12 Mar 2024, Nicolas Gaullier wrote: Regression since 0b98f28c46a7e3e914c51debc461 Signed-off-by: Nicolas Gaullier --- tests/fate-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 0fead78c58..9863e4f2d9 100755 ---

Re: [FFmpeg-devel] [PATCH] avformat/webvttdec: Skip more parts of header to let parsing continue

2024-03-12 Thread Marton Balint
On Mon, 11 Mar 2024, Kristoffer Brånemyr via ffmpeg-devel wrote: Den måndag 26 februari 2024 kl. 19:36:58 CET, Kristoffer Brånemyr via ffmpeg-devel skrev: Hi, Here is a short patch to skip more parts of the header for the WebVTT subtitle format. Without this the parser seems to stop

Re: [FFmpeg-devel] [PATCH v2 7/9] avformat/pcm: factorize and improve determining the default packet size

2024-03-12 Thread Marton Balint
On Fri, 8 Mar 2024, Marton Balint wrote: - Remove the 1024 cap on the number of samples, for high sample rate audio it was suboptimal, calculate the low neighbour power of two for the number of samples (audio blocks) instead. - Make the function work correctly for non-pcm codecs by using

Re: [FFmpeg-devel] [PATCH] change av_ts_make_time_string precision

2024-03-12 Thread Marton Balint
On Tue, 12 Mar 2024, Allan Cady via ffmpeg-devel wrote: On Monday, March 11, 2024 at 12:11:45 PM PDT, Marton Balint wrote: On Mon, 11 Mar 2024, Andreas Rheinhardt wrote: Allan Cady via ffmpeg-devel: From: "Allan Cady" I propose changing the format to "%.6f", which w

Re: [FFmpeg-devel] [PATCH] change av_ts_make_time_string precision

2024-03-11 Thread Marton Balint
On Mon, 11 Mar 2024, Andreas Rheinhardt wrote: Allan Cady via ffmpeg-devel: From: "Allan Cady" I propose changing the format to "%.6f", which will give microsecond precision for all timestamps, regardless of offset. Trailing zeros can be trimmed from the fraction, without losing

[FFmpeg-devel] [PATCH 5/7] avutil/channel_layout: factorize parsing list of channel names

2024-03-09 Thread Marton Balint
Also make use of the av_channel_from_string() function to determine the channel id. This fixes some parse issues in av_channel_layout_from_string(). Signed-off-by: Marton Balint --- libavutil/channel_layout.c| 172 -- tests/ref/fate/channel_layout | 8 +- 2

[FFmpeg-devel] [PATCH 7/7] avutil/channel_layout: add specific text versions for unknown and unused channels

2024-03-09 Thread Marton Balint
Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 13 + libavutil/tests/channel_layout.c | 2 ++ tests/ref/fate/channel_layout| 4 +++- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index

[FFmpeg-devel] [PATCH 6/7] avutil/channel_layout: fix some (un)initialization issues in av_channel_layout_from_string()

2024-03-09 Thread Marton Balint
Also make initialization/uninitialization behaviour more explicit in the docs, and make sure we do not leak a channel map on error. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 5 + libavutil/channel_layout.h | 8 ++-- 2 files changed, 11 insertions(+), 2 deletions

[FFmpeg-devel] [PATCH 4/7] avutil/tests/channel_layout: add some av_channel_from_string and av_channel_layout_from_string tests

2024-03-09 Thread Marton Balint
We lacked tests which supposed to fail, and there are some which should fail but right now it does not. This will be fixed in a later commit. Signed-off-by: Marton Balint --- libavutil/tests/channel_layout.c | 26 ++ tests/ref/fate/channel_layout| 26

[FFmpeg-devel] [PATCH 3/7] avutil/tests/channel_layout: make printing results part of the tests

2024-03-09 Thread Marton Balint
Deduplicates a lot of code. Some minor differences (mostly white space and inconsistent use of quotes) are expected in the fate tests, there was no point aiming for exactly the same formatting. Signed-off-by: Marton Balint --- libavutil/tests/channel_layout.c | 283

[FFmpeg-devel] [PATCH 2/7] avformat/mov_chan: simplify channel layout canonicalization

2024-03-09 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/mov_chan.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index 3e186b0837..ead3a9b91b 100644 --- a/libavformat/mov_chan.c +++ b/libavformat/mov_chan.c @@ -543,10 +543,8

[FFmpeg-devel] [PATCH 1/7] avutil/channel_layout: add AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL

2024-03-09 Thread Marton Balint
Signed-off-by: Marton Balint --- doc/APIchanges | 3 +++ libavutil/channel_layout.c | 30 ++ libavutil/channel_layout.h | 7 +++ libavutil/version.h| 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc

Re: [FFmpeg-devel] [PATCH] avformat/mxfdec: signal channel layouts using the new channel layout api

2024-03-08 Thread Marton Balint
On Fri, 8 Mar 2024, James Almer wrote: On 3/8/2024 5:13 PM, Marton Balint wrote: Signed-off-by: Marton Balint --- libavformat/mxfdec.c | 129 ++- 1 file changed, 53 insertions(+), 76 deletions(-) diff --git a/libavformat/mxfdec.c b

[FFmpeg-devel] [PATCH] avformat/mxfdec: signal channel layouts using the new channel layout api

2024-03-08 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/mxfdec.c | 129 ++- 1 file changed, 53 insertions(+), 76 deletions(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 289db9833c..e2f4a22983 100644 --- a/libavformat/mxfdec.c +++ b/libavformat

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing h264

2024-03-07 Thread Marton Balint
On Wed, 6 Mar 2024, Tomas Härdin wrote: lör 2024-02-24 klockan 15:13 +0100 skrev Andreas Rheinhardt: Tomas Härdin: > > > > +static int mxf_check_bitstream(AVFormatContext *s, AVStream > > > > *st, > > > > const AVPacket *pkt) > > > > +{ > > > > +    if (st->codecpar->codec_id ==

Re: [FFmpeg-devel] [PATCH] avcodec/xbmenc: Avoid snprintf() for data->hex conversion

2024-03-07 Thread Marton Balint
On Fri, 8 Mar 2024, Andreas Rheinhardt wrote: Marton Balint: On Fri, 8 Mar 2024, Andreas Rheinhardt wrote: Andreas Rheinhardt: Use a small LUT instead. Improves performance. Signed-off-by: Andreas Rheinhardt ---  libavcodec/xbmenc.c | 21 +++--  1 file changed, 15

[FFmpeg-devel] [PATCH v2 7/9] avformat/pcm: factorize and improve determining the default packet size

2024-03-07 Thread Marton Balint
the packet duration for a given size - Fall back to 4096/block_align if av_get_audio_frame_duration2() is not supported Signed-off-by: Marton Balint --- libavformat/pcm.c | 42 ++ libavformat/pcm.h | 1 + tests/ref/seek/lavf-al | 46

[FFmpeg-devel] [PATCH v2 6/9] fate: use atrim filter instead of -frames:a 20 for fate-filter-tremolo

2024-03-07 Thread Marton Balint
To make it independent of incoming wav demuxer packet size. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 78fec28b04..6ddc0baf57 100644

[FFmpeg-devel] [PATCH v2 5/9] fate: use a fixed wav demux packet size for amix tests

2024-03-07 Thread Marton Balint
The dropout transition feature of the amix filter depends on the incoming packet size. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index

[FFmpeg-devel] [PATCH v2 4/9] fate: make filter-channelsplit test use a fixed frame size

2024-03-07 Thread Marton Balint
Muxing multiple streams to raw files is allowed but the packets are interleaved, so the output is dependant of packet size. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests

[FFmpeg-devel] [PATCH v2 3/9] avformat/daudenc: force 2000 sample packet size with a bsf

2024-03-07 Thread Marton Balint
The samples I found all have 2000 sample packets, and by forcing the packet size with a bsf we could automagically make muxing work for packets containing more than 3640 samples. Signed-off-by: Marton Balint --- configure | 1 + doc/muxers.texi | 16

[FFmpeg-devel] [PATCH v2 2/9] avcodec/bsf/pcm_rechunk: add some more supported PCM formats

2024-03-07 Thread Marton Balint
Signed-off-by: Marton Balint --- libavcodec/bsf/pcm_rechunk.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/bsf/pcm_rechunk.c b/libavcodec/bsf/pcm_rechunk.c index 423c414d76..b1b57f96a9 100644 --- a/libavcodec/bsf/pcm_rechunk.c +++ b

[FFmpeg-devel] [PATCH v2 1/9] avcodec/bsf/pcm_rechunk: reorder supported codec list

2024-03-07 Thread Marton Balint
Use lexical order. Signed-off-by: Marton Balint --- libavcodec/bsf/pcm_rechunk.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavcodec/bsf/pcm_rechunk.c b/libavcodec/bsf/pcm_rechunk.c index 28b5722ac9..423c414d76 100644 --- a/libavcodec/bsf

Re: [FFmpeg-devel] [PATCH] avcodec/xbmenc: Avoid snprintf() for data->hex conversion

2024-03-07 Thread Marton Balint
On Fri, 8 Mar 2024, Andreas Rheinhardt wrote: Andreas Rheinhardt: Use a small LUT instead. Improves performance. Signed-off-by: Andreas Rheinhardt --- libavcodec/xbmenc.c | 21 +++-- 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/libavcodec/xbmenc.c

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing h264

2024-03-05 Thread Marton Balint
On Sat, 24 Feb 2024, Andreas Rheinhardt wrote: Tomas Härdin: +static int mxf_check_bitstream(AVFormatContext *s, AVStream *st, const AVPacket *pkt) +{ +    if (st->codecpar->codec_id == AV_CODEC_ID_H264) { +    if (pkt->size >= 5 && AV_RB32(pkt->data) != 0x001 && +

[FFmpeg-devel] [PATCH 8/9] avformat/pcm: remove max samples cap when calculating the default packet size

2024-03-05 Thread Marton Balint
For high sample rate audio it was suboptimal, calculate the low neighbour power of two for the number of samples instead. Signed-off-by: Marton Balint --- libavformat/pcm.c | 6 +- tests/ref/fate/dcinema-encode | 12 +- tests/ref/fate/filter-chorus

[FFmpeg-devel] [PATCH 7/9] avformat/pcm: use a common default packet size function for both wav and pcm

2024-03-05 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/pcm.c| 38 ++ libavformat/pcm.h| 1 + libavformat/wavdec.c | 11 ++- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/libavformat/pcm.c b/libavformat/pcm.c index 9741f73667

[FFmpeg-devel] [PATCH 6/9] fate: use atrim filter instead of -frames:a 20 for fate-filter-tremolo

2024-03-05 Thread Marton Balint
To make it independent of incoming wav demuxer packet size. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index 78fec28b04..6ddc0baf57 100644

[FFmpeg-devel] [PATCH 5/9] fate: use a fixed wav demux packet size for amix tests

2024-03-05 Thread Marton Balint
The dropout transition feature of the amix filter depends on the incoming packet size. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests/fate/filter-audio.mak index

[FFmpeg-devel] [PATCH 4/9] fate: make filter-channelsplit test use a fixed frame size

2024-03-05 Thread Marton Balint
Muxing multiple streams to raw files is allowed but the packets are interleaved, so the output is dependant of packet size. Signed-off-by: Marton Balint --- tests/fate/filter-audio.mak | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/fate/filter-audio.mak b/tests

[FFmpeg-devel] [PATCH 3/9] avformat/daudenc: force 2000 sample packet size with a bsf

2024-03-05 Thread Marton Balint
The samples I found all have 2000 sample packets, and by forcing the packet size with a bsf we could automagically make muxing work for packets containing more than 3640 samples. Signed-off-by: Marton Balint --- configure | 1 + libavformat/daudenc.c | 11

[FFmpeg-devel] [PATCH 2/9] avcodec/bsf/pcm_rechunk: add some more supported PCM formats

2024-03-05 Thread Marton Balint
Signed-off-by: Marton Balint --- libavcodec/bsf/pcm_rechunk.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/libavcodec/bsf/pcm_rechunk.c b/libavcodec/bsf/pcm_rechunk.c index 9bbc5a74d6..7198554c17 100644 --- a/libavcodec/bsf/pcm_rechunk.c +++ b

[FFmpeg-devel] [PATCH 1/9] avcodec/bsf/pcm_rechunk: reorder supported codec list

2024-03-05 Thread Marton Balint
Should be easier to add new codecs by using the same order as in av_get_exact_bits_per_sample(). Signed-off-by: Marton Balint --- libavcodec/bsf/pcm_rechunk.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/libavcodec/bsf/pcm_rechunk.c b/libavcodec/bsf

Re: [FFmpeg-devel] [PATCH 05/29] lavu/opt: distinguish between native and foreign access for AVOption fields

2024-03-04 Thread Marton Balint
On Mon, 4 Mar 2024, Anton Khirnov wrote: Native access is from the code that declared the options, foreign access is from code that is using the options. Forbid foreign access to AVOption.offset/default_val, for which there is no good reason, and which should allow us more freedom in

Re: [FFmpeg-devel] [PATCH 06/29] lavu/opt: add array options

2024-03-04 Thread Marton Balint
On Mon, 4 Mar 2024, Anton Khirnov wrote: --- doc/APIchanges| 3 + libavutil/opt.c | 362 +- libavutil/opt.h | 62 +++- libavutil/tests/opt.c | 51 ++ tests/ref/fate/opt| 35 +++- 5 files changed, 468 insertions(+), 45

Re: [FFmpeg-devel] [PATCH 15/38] lavu/opt: add array options

2024-03-03 Thread Marton Balint
On Sun, 3 Mar 2024, James Almer wrote: On 3/3/2024 12:53 PM, Diederick C. Niehorster wrote: On Sun, Mar 3, 2024 at 3:55 PM Anton Khirnov wrote: Quoting Marton Balint (2024-02-26 20:38:46) The more I think about it, it is actually a broader problem. You are changing the semantics

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: detect synchronous metadata KLV more reliably

2024-03-02 Thread Marton Balint
On Fri, 1 Mar 2024, Marton Balint wrote: The mpegts code historically tries to strip (the first) metadata access unit header from synchronous KLV metadata, but the detection for such streams was unreliable causing strips of asynchronous metadata or ID3 as well. MISB ST 1402 specifies

Re: [FFmpeg-devel] [PATCH 4/4] avformat/wavdec: dynamically set max_size by default

2024-03-01 Thread Marton Balint
On Thu, 29 Feb 2024, Marton Balint wrote: On Thu, 29 Feb 2024, Andreas Rheinhardt wrote: Marton Balint: The wav demuxer by default tried to demux 4096-byte packets which caused packets with very few number of samples for files with high channel count. This caused a significant

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

2024-03-01 Thread Marton Balint
On Fri, 1 Mar 2024, Michael Niedermayer wrote: On Thu, Feb 29, 2024 at 06:55:01PM +0100, Marton Balint wrote: On Thu, 29 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

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: Restrict skipping Metadata AU cells to metadata streams

2024-03-01 Thread Marton Balint
On Fri, 1 Mar 2024, Andreas Rheinhardt wrote: Only metadata streams (stream type 0x15) are packed in Metadata AU cells, so it should only be stripped from them and not from all KLV streams. Fixes ticket #10828, a regression since 468615f2045da325e0f73e8e668d49cf456ccb37. I sent a patch

[FFmpeg-devel] [PATCH] avformat/mpegts: detect synchronous metadata KLV more reliably

2024-02-29 Thread Marton Balint
descriptor (which eventually maps to the codec ID) so let's use all of these for reliable detection. Fixes ticket #10828, #10883. Signed-off-by: Marton Balint --- libavformat/mpegts.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mxfdec: remove resolve_strong_ref usage with AnyType

2024-02-29 Thread Marton Balint
On Tue, 20 Feb 2024, Marton Balint wrote: UUIDs do not have to be unique if their type sets them apart, so avoid using AnyType, since we are only interested in specific types. Ping for the series, will apply in 1-2 days. Regards, Marton Signed-off-by: Marton Balint --- libavformat

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

2024-02-29 Thread Marton Balint
On Thu, 29 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 ++-- libswresample

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

2024-02-28 Thread Marton Balint
On Wed, 28 Feb 2024, Michael Niedermayer wrote: On Tue, Feb 27, 2024 at 09:50:49PM +0100, Marton Balint wrote: 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

Re: [FFmpeg-devel] [PATCH 4/4] avformat/wavdec: dynamically set max_size by default

2024-02-28 Thread Marton Balint
On Thu, 29 Feb 2024, Andreas Rheinhardt wrote: Marton Balint: The wav demuxer by default tried to demux 4096-byte packets which caused packets with very few number of samples for files with high channel count. This caused a significant overhead especially since the latest ffmpeg.c threading

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 ++-- libswresample

[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 b

[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-

Re: [FFmpeg-devel] [PATCH 15/38] lavu/opt: add array options

2024-02-26 Thread Marton Balint
On Mon, 26 Feb 2024, Anton Khirnov wrote: Quoting Marton Balint (2024-02-23 20:05:06) On Fri, 23 Feb 2024, Anton Khirnov wrote: AVOption.array_max_size is added before AVOption.unit to avoid increasing sizeof(AVOption). --- doc/APIchanges| 3 + libavutil/opt.c | 344

[FFmpeg-devel] [PATCH 4/4] avformat/wavdec: dynamically set max_size by default

2024-02-25 Thread Marton Balint
size which is already used in the PCM demuxer, which is to read 25 times per second but at most 1024 samples. Signed-off-by: Marton Balint --- doc/demuxers.texi | 23 ++ libavformat/wavdec.c | 19 +- tests/ref/fate/dcinema-encode | 40

[FFmpeg-devel] [PATCH 3/4] fate/libswresample: force number of samples for the input of aresample async tests

2024-02-25 Thread Marton Balint
Since PTS is changed randomly for every audio frame, it matters. Also add some forgotten filter dependencies. Signed-off-by: Marton Balint --- tests/fate/libswresample.mak | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/fate/libswresample.mak b/tests/fate

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

2024-02-25 Thread Marton Balint
This also fixes resampling with filter_size=1 and phase_shift=0, depending on input chunk size noticable corrpution was hearable with this command line: ffplay -f lavfi -i "sine=440:r=8000:samples_per_frame=32,aresample=24000:filter_size=1:phase_shift=0" Signed-off-by: Mar

[FFmpeg-devel] [PATCH 1/4] fate: never generate auto-generated references

2024-02-25 Thread Marton Balint
GEN=1 is used to generate reference files in the source tree, not auto-generated reference samples. Without this patch GEN=1 could overwrite the auto generated reference files in each test where they are used causing failures. Signed-off-by: Marton Balint --- tests/fate-run.sh | 2 +- 1 file

Re: [FFmpeg-devel] Swresample strangeness

2024-02-25 Thread Marton Balint
On Sun, 25 Feb 2024, Michael Niedermayer wrote: On Sun, Feb 25, 2024 at 05:38:27PM +0100, Marton Balint wrote: Hi, I am working on a patch to select a better default packet size for the wav demuxer, since it reads at most 4096 bytes which can cause insanely small packets for files

[FFmpeg-devel] Swresample strangeness

2024-02-25 Thread Marton Balint
Hi, I am working on a patch to select a better default packet size for the wav demuxer, since it reads at most 4096 bytes which can cause insanely small packets for files with high channel count. Unfortunately some swresample fate tests blew up, and I wonder if the result of the resampling

Re: [FFmpeg-devel] [PATCH] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-02-25 Thread Marton Balint
On Sun, 25 Feb 2024, Mark Thompson wrote: On 25/02/2024 15:01, Marton Balint wrote: On Sun, 25 Feb 2024, Mark Thompson wrote: Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the decoder in internal queues without telling the decoder

Re: [FFmpeg-devel] [PATCH] ffmpeg: set extra_hw_frames to account for frames held in queues

2024-02-25 Thread Marton Balint
On Sun, 25 Feb 2024, Mark Thompson wrote: Since e0da916b8f5b079a4865eef7f64863f50785463d the ffmpeg utility has held multiple frames output by the decoder in internal queues without telling the decoder that it is going to do so. When the decoder has a fixed-size pool of frames (common in

Re: [FFmpeg-devel] [PATCH] Add float user_rdiv[4] to allow user options to apply correctly

2024-02-24 Thread Marton Balint
On Sat, 24 Feb 2024, Stone Chen wrote: On Sat, Feb 24, 2024 at 6:34 PM Marton Balint wrote: On Sat, 24 Feb 2024, Stone Chen wrote: On Sat, Feb 24, 2024 at 3:56 PM Marton Balint wrote: On Sat, 24 Feb 2024, Stone Chen wrote: Previously to support dynamic reconfigurations

Re: [FFmpeg-devel] [PATCH] Add float user_rdiv[4] to allow user options to apply correctly

2024-02-24 Thread Marton Balint
On Sat, 24 Feb 2024, Stone Chen wrote: On Sat, Feb 24, 2024 at 3:56 PM Marton Balint wrote: On Sat, 24 Feb 2024, Stone Chen wrote: > Previously to support dynamic reconfigurations of the matrix string (e.g. 0m), the rdiv values would always be cleared to 0.f, causing the r

Re: [FFmpeg-devel] [PATCH] fate/mxf: fix mxf-probe-j2k on big endian systems

2024-02-24 Thread Marton Balint
On Fri, 23 Feb 2024, Tomas Härdin wrote: tor 2024-02-22 klockan 00:34 +0100 skrev Marton Balint: Jpeg2000 decoder is decoding in native endian, so let's use the same workaround as in fate-mxf-probe-applehdr10. Fixes ticket #10868. OK I suppose Ok, thanks, will apply. Regards, Marton

Re: [FFmpeg-devel] [PATCH] avformat/libsrt: use SRT_EPOLL_IN for waiting for an incoming connection

2024-02-24 Thread Marton Balint
On Tue, 20 Feb 2024, Marton Balint wrote: This is the proper poll mode for waiting for an incoming connection according to the SRT API docs. Fixes ticket #9142. Will apply. Regards, Marton Signed-off-by: Marton Balint --- libavformat/libsrt.c | 17 ++--- 1 file changed, 10

Re: [FFmpeg-devel] [PATCH] Add float user_rdiv[4] to allow user options to apply correctly

2024-02-24 Thread Marton Balint
On Sat, 24 Feb 2024, Stone Chen wrote: Previously to support dynamic reconfigurations of the matrix string (e.g. 0m), the rdiv values would always be cleared to 0.f, causing the rdiv to be recalculated based on the new filter. This however had the side effect of always ignoring user

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

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, Romain Beauxis wrote: Le ven. 23 févr. 2024 à 15:11, Marton Balint a écrit : On Fri, 23 Feb 2024, Romain Beauxis wrote: > The new default channel layout for the various RIFF/WAV decoders is not > backward compatible. > > Historically, most decoders

Re: [FFmpeg-devel] [PATCH] libavutil/timestamp.h: Fix loss of precision in timestamps for silencedetect on long files

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, Allan Cady via ffmpeg-devel wrote: [Apologies for the awful mess in the previous email. Trying again with straight text.] On Thursday, February 22, 2024 at 01:16:19 AM PST, Marton Balint wrote: For starters, I'm curious why there are two functions & ma

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

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, 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 to follow the native layout up-to a reasonable number of channels. Additionally, non-native

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing h264

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, Andreas Rheinhardt wrote: Marton Balint: Partially fixes ticket #10395. Signed-off-by: Marton Balint --- libavformat/mxfenc.c | 12 1 file changed, 12 insertions(+) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 61ed6fc3db..adc31c1cf4

Re: [FFmpeg-devel] [PATCH 23/38] avcodec/hevcdec: respect side data preference

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, Anton Khirnov wrote: From: Niklas Haas If the time code side data is overridden by the packet level, we also make sure not to update `out->metadata` to a mismatched timecode. For HDR side data, we unfortunately need to omit a return check because the new function does

Re: [FFmpeg-devel] [PATCH 15/38] lavu/opt: add array options

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, Anton Khirnov wrote: AVOption.array_max_size is added before AVOption.unit to avoid increasing sizeof(AVOption). --- doc/APIchanges| 3 + libavutil/opt.c | 344 -- libavutil/opt.h | 26

Re: [FFmpeg-devel] [PATCH 16/38] lavc: add a decoder option for configuring side data preference

2024-02-23 Thread Marton Balint
On Fri, 23 Feb 2024, Anton Khirnov wrote: This and the following commits fix #10857 --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 20 libavcodec/decode.c| 36 libavcodec/options_table.h | 12 4

[FFmpeg-devel] [PATCH] avformat/mxfenc: add h264_mp4toannexb bitstream filter if needed when muxing h264

2024-02-22 Thread Marton Balint
Partially fixes ticket #10395. Signed-off-by: Marton Balint --- libavformat/mxfenc.c | 12 1 file changed, 12 insertions(+) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index 61ed6fc3db..adc31c1cf4 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -3542,6

Re: [FFmpeg-devel] [PATCH] libavutil/timestamp.h: Fix loss of precision in timestamps for silencedetect on long files

2024-02-22 Thread Marton Balint
On Thu, 22 Feb 2024, Allan Cady via ffmpeg-devel wrote: I had a similar thought, as all timestamps would have the same issue. This is my first contribution here, and I don't know the code very well, so I was being cautious. I'm open to expanding the scope, but I'm sure I would need some

[FFmpeg-devel] [PATCH] fate/mxf: fix mxf-probe-j2k on big endian systems

2024-02-21 Thread Marton Balint
Jpeg2000 decoder is decoding in native endian, so let's use the same workaround as in fate-mxf-probe-applehdr10. Fixes ticket #10868. Signed-off-by: Marton Balint --- tests/fate/mxf.mak | 2 +- tests/ref/fate/mxf-probe-j2k | 2 +- 2 files changed, 2 insertions(+), 2 deletions

Re: [FFmpeg-devel] [PATCH] libavutil/timestamp.h: Fix loss of precision in timestamps for silencedetect on long files

2024-02-21 Thread Marton Balint
On Tue, 20 Feb 2024, Allan Cady via ffmpeg-devel wrote: When the silencedetect audio filter is run against long files, the output timestamps gradually lose precision as the scan proceeds further into the file. This is because the output format specifier ("%.6g" in libavutil/timestamp.h)

[FFmpeg-devel] [PATCH] avformat/libsrt: use SRT_EPOLL_IN for waiting for an incoming connection

2024-02-20 Thread Marton Balint
This is the proper poll mode for waiting for an incoming connection according to the SRT API docs. Fixes ticket #9142. Signed-off-by: Marton Balint --- libavformat/libsrt.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/libavformat/libsrt.c b/libavformat

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

2024-02-20 Thread Marton Balint
On Tue, 20 Feb 2024, Anton Khirnov wrote: Quoting Marton Balint (2024-02-20 10:12:34) We have no means to prove financial interest, because it is not public. We also have no means to prove that committee members are acting in the project's interest. E.g. if I had no qualms about being

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

2024-02-20 Thread Marton Balint
On Tue, 20 Feb 2024, Anton Khirnov wrote: My personal opinion is that broad interpretations of the rule in question are highly undesirable, as they punish TC members for active participation in the project. And since TC members tend to be among the most active contributors, this can

[FFmpeg-devel] [PATCH 2/2] avformat/mxfdec: track metadata sets by their type

2024-02-19 Thread Marton Balint
We typically are only interesed in a single type of metadata set, so it is better to keep them separated instead of always filtering for them. Also use av_dynarray_add for increasing their array. Signed-off-by: Marton Balint --- libavformat/mxf.h| 1 + libavformat/mxfdec.c | 128

[FFmpeg-devel] [PATCH 1/2] avformat/mxfdec: remove resolve_strong_ref usage with AnyType

2024-02-19 Thread Marton Balint
UUIDs do not have to be unique if their type sets them apart, so avoid using AnyType, since we are only interested in specific types. Signed-off-by: Marton Balint --- libavformat/mxf.h| 3 +-- libavformat/mxfdec.c | 54 2 files changed, 20

Re: [FFmpeg-devel] [PATCH] fate: use an even more exotic channel layout mov-mp4-pcm-float test

2024-02-19 Thread Marton Balint
On Sun, 18 Feb 2024, James Almer wrote: On 2/18/2024 3:38 PM, Marton Balint wrote: On Sun, 18 Feb 2024, James Almer wrote: On 2/18/2024 7:45 AM, Marton Balint wrote:  The old layout happened to be a native layout and therefore missed some  recently fixed layout parsing bugs

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mxfdec: do not use AnyType when resolving Descriptors and MultipleDescriptors

2024-02-19 Thread Marton Balint
On Mon, 19 Feb 2024, Tomas Härdin wrote: fre 2024-02-16 klockan 22:18 +0100 skrev Marton Balint: Using AnyType should not be a problem for proper MXF files because UIDs are supposed to be unique themselves. Unfortunately that is not the case for some broken files, so let's check the type

Re: [FFmpeg-devel] [PATCH] Fix rdiv always being set to 0 in vf_convolution.c

2024-02-19 Thread Marton Balint
param_init() which does filter (re)configuration and recalculation of rdivs. Regards, Marton PS: Please do not top post on this mailing list. On Sun, Feb 18, 2024 at 7:08 PM Marton Balint wrote: On Sun, 18 Feb 2024, Stone Chen wrote: > In commit 6c45d34, a line was added that always s

Re: [FFmpeg-devel] [PATCH] Fix rdiv always being set to 0 in vf_convolution.c

2024-02-18 Thread Marton Balint
On Sun, 18 Feb 2024, Stone Chen wrote: In commit 6c45d34, a line was added that always sets rdiv to 0, overriding any user input. This removes that line allowing user set values for 0rdiv, 1rdiv, 2rdiv, 3rdiv to apply as expected. This fixes ticket #10294. This is likely not the correct

Re: [FFmpeg-devel] [PATCH] avcodec/jpeg2000dec: support of 2 fields in 1 AVPacket

2024-02-18 Thread Marton Balint
On Fri, 16 Feb 2024, Anton Khirnov wrote: Quoting Tomas Härdin (2024-02-03 20:58:20) I think people with knowledge how interlacing is handled in other formats and codecs might want to chime in. For MPEG codecs our decoders always output (properly signalled) interlaced content as two

Re: [FFmpeg-devel] [PATCH] fate: use an even more exotic channel layout mov-mp4-pcm-float test

2024-02-18 Thread Marton Balint
On Sun, 18 Feb 2024, James Almer wrote: On 2/18/2024 7:45 AM, Marton Balint wrote: The old layout happened to be a native layout and therefore missed some recently fixed layout parsing bugs. Signed-off-by: Marton Balint --- tests/fate/mov.mak | 2 +- tests/ref/fate

[FFmpeg-devel] [PATCH] fate: use an even more exotic channel layout mov-mp4-pcm-float test

2024-02-18 Thread Marton Balint
The old layout happened to be a native layout and therefore missed some recently fixed layout parsing bugs. Signed-off-by: Marton Balint --- tests/fate/mov.mak | 2 +- tests/ref/fate/mov-mp4-pcm-float | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests

<    1   2   3   4   5   6   7   8   9   10   >