[FFmpeg-devel] [PATCH v2 2/5] doc/ffmpeg: document -channel_layout/ch_layout options

2024-05-19 Thread Marton Balint
Signed-off-by: Marton Balint --- doc/ffmpeg.texi | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index da37e3ad37..f25f6192eb 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1719,12 +1719,21 @@ This is an alias for @code

[FFmpeg-devel] [PATCH v2 1/5] fftools/ffmpeg_demux: honor -ch_layout options for overriding input stream channel layout

2024-05-19 Thread Marton Balint
results. We disable layout guessing, if a channel layout is specified. Fixes ticket #11016. Signed-off-by: Marton Balint --- fftools/ffmpeg_demux.c | 27 --- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index

Re: [FFmpeg-devel] [PATCH v2 8/8] aacdec: add a decoder for AAC USAC (xHE-AAC)

2024-05-19 Thread Marton Balint
On Sun, 19 May 2024, Lynne via ffmpeg-devel wrote: This commit adds a decoder for the frequency-domain part of USAC. [...] +/* Finish later */ +static const enum AVChannel usac_ch_pos_to_av[64] = { +[0] = AV_CHAN_FRONT_LEFT, +[1] = AV_CHAN_FRONT_RIGHT, +[2] =

Re: [FFmpeg-devel] [PATCH 1/3] avformat/mp3dec: only call ffio_ensure_seekback once

2024-05-18 Thread Marton Balint
On Tue, 14 May 2024, Marton Balint wrote: Otherwise the subsequent ffio_ensure_seekback calls destroy the buffer of the earlier. The worst case ~66kB seekback is so small it is easier to request it entirely. Fixes ticket #10837, a regression since 0d17f5228f4d3854066ec1001f69c7d1714b0df9

[FFmpeg-devel] [PATCH 5/5] fftools/ffplay: allow unused format options which are also codec options

2024-05-18 Thread Marton Balint
Same as it is handled in ffmpeg, allows using -ch_layout codec option. Signed-off-by: Marton Balint --- fftools/ffplay.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index ff48fa5f8c..1d0511b254 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c

[FFmpeg-devel] [PATCH 4/5] fftools/ffplay: use cmdutils code for checking remaining avoptions

2024-05-18 Thread Marton Balint
Signed-off-by: Marton Balint --- fftools/ffplay.c | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index b9d11eecee..ff48fa5f8c 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2626,7 +2626,6 @@ static int

[FFmpeg-devel] [PATCH 3/5] fftools: move check_avoptions and remove_avoptions to cmdutils

2024-05-18 Thread Marton Balint
Signed-off-by: Marton Balint --- fftools/cmdutils.c | 20 fftools/cmdutils.h | 6 ++ fftools/ffmpeg.c | 20 fftools/ffmpeg.h | 3 --- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index

[FFmpeg-devel] [PATCH 2/5] doc/ffmpeg: document -channel_layout/ch_layout options

2024-05-18 Thread Marton Balint
Signed-off-by: Marton Balint --- doc/ffmpeg.texi | 10 ++ 1 file changed, 10 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 83db6584fd..9b490f523f 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -1720,6 +1720,16 @@ This is an alias for @code{-filter:a}, see

[FFmpeg-devel] [PATCH 1/5] fftools/ffmpeg_demux: also set -ch_layout avcodec option for -ch_layout CLI param

2024-05-18 Thread Marton Balint
639c2f00497257cb60ecaeeac1aacfa80df3be06. Signed-off-by: Marton Balint --- doc/ffmpeg.texi| 7 --- fftools/ffmpeg_demux.c | 46 +- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index da37e3ad37..83db6584fd 100644 --- a/doc

[FFmpeg-devel] [PATCH 3/3] avformat/mp3dec: change bogus error message if read_header encounters EOF

2024-05-14 Thread Marton Balint
Because of ffio_ensure_seekback() a seek error normally should only happen if the end of file is reached during checking for the junk run-in. Also use proper error code. Signed-off-by: Marton Balint --- libavformat/mp3dec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[FFmpeg-devel] [PATCH 2/3] avformat/mp3dec: simplify inner frame size check in mp3_read_header

2024-05-14 Thread Marton Balint
the loop instead of breaking out early. It will end sooner or later anyway. Signed-off-by: Marton Balint --- libavformat/mp3dec.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 78d6c8c71c..4abc73966f 100644

[FFmpeg-devel] [PATCH 1/3] avformat/mp3dec: only call ffio_ensure_seekback once

2024-05-14 Thread Marton Balint
Otherwise the subsequent ffio_ensure_seekback calls destroy the buffer of the earlier. The worst case ~66kB seekback is so small it is easier to request it entirely. Fixes ticket #10837, a regression since 0d17f5228f4d3854066ec1001f69c7d1714b0df9. Signed-off-by: Marton Balint --- libavformat

Re: [FFmpeg-devel] [PATCH 09/10] tests/checkasm/vf_blend: Add missing function parameter

2024-05-14 Thread Marton Balint
On Mon, 13 May 2024, Andreas Rheinhardt wrote: Forgotten in 5b8faaad6c71bbb90951ca1642391e11cf6f5f91. Signed-off-by: Andreas Rheinhardt --- tests/checkasm/vf_blend.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/vf_blend.c

Re: [FFmpeg-devel] [PATCH v2 1/1] libavdevice/decklink: extend available actions on signal loss

2024-05-14 Thread Marton Balint
On Tue, 14 May 2024, Michael Riedl wrote: Deprecate the option 'draw_bars' in favor of the new option 'signal_loss_action', which controls the behavior when the input signal is not available (including the behavior previously available through draw_bars). The default behavior remains

Re: [FFmpeg-devel] [PATCH 4/4] avfilter/vf_geq: fix interpolation with 1 pixel width/height

2024-05-13 Thread Marton Balint
On Sat, 11 May 2024, Michael Niedermayer wrote: On Thu, May 09, 2024 at 08:49:18AM +0200, Marton Balint wrote: Fixes ticket #9740. Signed-off-by: Marton Balint --- libavfilter/vf_geq.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libavfilter

[FFmpeg-devel] [PATCH 4/4] avfilter/vf_geq: fix interpolation with 1 pixel width/height

2024-05-09 Thread Marton Balint
Fixes ticket #9740. Signed-off-by: Marton Balint --- libavfilter/vf_geq.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c index dbe50e5250..12604d44a2 100644 --- a/libavfilter/vf_geq.c +++ b/libavfilter

[FFmpeg-devel] [PATCH 3/4] avfilter/blend: use a per-thread AVExpr

2024-05-09 Thread Marton Balint
Otherwise expression state is accessed and changed from multiple threads. Fixes ticket #10987. Signed-off-by: Marton Balint --- libavfilter/blend.h| 3 ++- libavfilter/vf_blend.c | 35 ++- 2 files changed, 28 insertions(+), 10 deletions(-) diff --git

[FFmpeg-devel] [PATCH 2/4] avfilter/blend: put slice parameters to a single struct

2024-05-09 Thread Marton Balint
This should make future extensibility easier. Signed-off-by: Marton Balint --- libavfilter/blend.h | 7 ++- libavfilter/blend_modes.c | 2 +- libavfilter/vf_blend.c | 7 +-- libavfilter/vf_blend_init.h | 4 ++-- libavfilter/x86/vf_blend_init.c | 2 +- 5

[FFmpeg-devel] [PATCH 1/4] avfilter/vsrc_testsrc: do not round down width and height for color src

2024-05-09 Thread Marton Balint
ff_draw_rectangle handles subsampling since 2013. Fixes ticket #10989. Signed-off-by: Marton Balint --- libavfilter/vsrc_testsrc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 41c2e70068..4dc12c8a01 100644 --- a/libavfilter

Re: [FFmpeg-devel] [PATCH 3/3] lavc/speedhqdec: Set AV_PICTURE_TYPE_I

2024-05-08 Thread Marton Balint
On Wed, 8 May 2024, Tomas Härdin wrote: What suprises me is that pict_type and the keyframe flag is not set already for decoding codecs with AV_CODEC_PROP_INTRA_ONLY flag. Is this intentional or just nobody had the time to set it up to work automatically? Thanks, Marton

Re: [FFmpeg-devel] [PATCH] avformat/wavdec: change ch_layout used av_channel_layout_default.

2024-05-08 Thread Marton Balint
On Wed, 8 May 2024, shiqizhu wrote: Signed-off-by: shiqizhu --- libavformat/wavdec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/wavdec.c b/libavformat/wavdec.c index 00856a5eca..9060796c81 100644 --- a/libavformat/wavdec.c +++ b/libavformat/wavdec.c @@

Re: [FFmpeg-devel] [PATCH v2 1/1] libavdevice/decklink: extend available actions on signal loss

2024-05-07 Thread Marton Balint
On Tue, 23 Apr 2024, Michael Riedl wrote: Deprecate the option 'draw_bars' in favor of the new option 'signal_loss_action', which controls the behavior when the input signal is not available (including the behavior previously available through draw_bars). The default behavior remains

Re: [FFmpeg-devel] Fixes #10509

2024-05-07 Thread Marton Balint
On Wed, 1 May 2024, Poorva wrote: On Fri, Apr 5, 2024 at 2:08 AM Marton Balint wrote: On Mon, 1 Apr 2024, Poorva wrote: >> >> >> > On Sun, Mar 31, 2024 at 8:35 PM Marton Balint wrote: > >> >> >> On Fri, 29 Mar 2024, Poorva wrote: >> >

Re: [FFmpeg-devel] [PATCH] lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's

2024-05-07 Thread Marton Balint
On Sun, 5 May 2024, Brad Smith wrote: lavd/v4l2: Use proper field type for second parameter of ioctl() with BSD's The proper type was used until 73251678c83cbe24d08264da693411b166239bc7. This covers all of the OS's that currently have V4L2 support, permutations of Linux glibc/musl, Android

Re: [FFmpeg-devel] [PATCH v3 1/3] avformat/network: add ff_neterrno2() for cases where we already have an errno

2024-05-07 Thread Marton Balint
On Tue, 7 May 2024, Andrew Sayers wrote: On Sun, May 05, 2024 at 09:59:28PM +0200, Marton Balint wrote: On Fri, 19 Apr 2024, Andrew Sayers wrote: For example, WSAStartup()'s documentation says: "A call to the WSAGetLastError function is not needed and should not be

Re: [FFmpeg-devel] [PATCH v4 2/3] avformat/network: Return 0/AVERROR from ff_network_init()

2024-05-05 Thread Marton Balint
On Sat, 20 Apr 2024, Andrew Sayers wrote: --- libavformat/avio.c| 4 ++-- libavformat/network.c | 7 +++ libavformat/rtsp.c| 12 ++-- libavformat/rtspdec.c | 4 ++-- libavformat/sapdec.c | 4 ++-- libavformat/sapenc.c | 4 ++-- 6 files changed, 17 insertions(+), 18

Re: [FFmpeg-devel] [PATCH v3 1/3] avformat/network: add ff_neterrno2() for cases where we already have an errno

2024-05-05 Thread Marton Balint
On Fri, 19 Apr 2024, Andrew Sayers wrote: For example, WSAStartup()'s documentation says: "A call to the WSAGetLastError function is not needed and should not be used" --- libavformat/network.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavformat/network.c

Re: [FFmpeg-devel] [PATCH] avformat/file: fail for non-numerical arguments to pipe:

2024-05-05 Thread Marton Balint
urn AVERROR(EINVAL); } c->fd = fd; } -- 2.39.2 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". From 1e65

Re: [FFmpeg-devel] [PATCH v3] avformat/framecrcenc: compute the checksum for side data

2024-05-04 Thread Marton Balint
On Sat, 4 May 2024, James Almer wrote: On 5/4/2024 5:34 AM, Marton Balint wrote: On Thu, 2 May 2024, James Almer wrote: On 5/2/2024 6:23 PM, Marton Balint wrote:  On Wed, 1 May 2024, Michael Niedermayer wrote:  This allows detecting issues in side data related code, same as what

Re: [FFmpeg-devel] [PATCH v3] avformat/framecrcenc: compute the checksum for side data

2024-05-04 Thread Marton Balint
On Thu, 2 May 2024, James Almer wrote: On 5/2/2024 6:23 PM, Marton Balint wrote: On Wed, 1 May 2024, Michael Niedermayer wrote: This allows detecting issues in side data related code, same as what framecrc does for before already for packet data itself. This basically reverts

[FFmpeg-devel] Samples with invalid permissions

2024-05-03 Thread Marton Balint
Hi, There are a couple of files in samples.ffmpeg.org with invalid permissions, rsync is not able to read those: /V-codecs/UCOD/noextradata/CLV1_tony.mov /V-codecs/UCOD/noextradata/freddie2.mov /V-codecs/UCOD/noextradata/pittc.mov /V-codecs/UCOD/noextradata/smilla_cv.mov

Re: [FFmpeg-devel] [PATCH] avformat/mxfdec: only check index_edit_rate when calculating the index tables

2024-05-03 Thread Marton Balint
On Fri, 3 May 2024, Tomas Härdin wrote: tor 2024-05-02 klockan 23:01 +0200 skrev Marton Balint: On Mon, 29 Apr 2024, Tomas Härdin wrote: > mån 2024-04-15 klockan 21:34 +0200 skrev Marton Balint: > > Commit ed49391961999f028e0bc55767d0eef6eeb15e49 started rejecting > > neg

Re: [FFmpeg-devel] [PATCH] avformat/mxfdec: only check index_edit_rate when calculating the index tables

2024-05-02 Thread Marton Balint
On Mon, 29 Apr 2024, Tomas Härdin wrote: mån 2024-04-15 klockan 21:34 +0200 skrev Marton Balint: Commit ed49391961999f028e0bc55767d0eef6eeb15e49 started rejecting negative index segment edit rates to avoid negative av_rescale parameters. There are two problems with this: 1) there is already

Re: [FFmpeg-devel] Inconsistent usage of AVFieldOrder values

2024-04-24 Thread Marton Balint
On Mon, 22 Apr 2024, Devin Heitmueller wrote: Hello, I suspect this topic has been visited a number of times over the years, but I figured I should re-raise it. In the compressed domain, field ordering is represented by the AVFieldOrder enumeration. Among the interlaced possibilities,

[FFmpeg-devel] [PATCH] avformat/mxfdec: only check index_edit_rate when calculating the index tables

2024-04-15 Thread Marton Balint
which do exist and we should continue to support those Let's solve these problems by removing the new check and extending the old check for negative index edit rates. This should fix the original issue and also restore support for 0/0 index edit rates. Signed-off-by: Marton Balint --- libavformat

Re: [FFmpeg-devel] [PATCH 4/5] avformat/mxfdec: Check index_edit_rate

2024-04-15 Thread Marton Balint
On Mon, 15 Apr 2024, Tomas Härdin wrote: sön 2024-04-14 klockan 22:55 +0200 skrev Marton Balint: On Wed, 10 Apr 2024, Tomas Härdin wrote: > tis 2024-04-09 klockan 22:58 +0200 skrev Marton Balint: > > > > > > On Tue, 9 Apr 2024, Tomas Härdin wrote: > > > &g

Re: [FFmpeg-devel] [PATCH 4/5] avformat/mxfdec: Check index_edit_rate

2024-04-14 Thread Marton Balint
On Wed, 10 Apr 2024, Tomas Härdin wrote: tis 2024-04-09 klockan 22:58 +0200 skrev Marton Balint: On Tue, 9 Apr 2024, Tomas Härdin wrote: > mån 2024-04-08 klockan 21:46 +0200 skrev Marton Balint: > > > > > > On Mon, 8 Apr 2024, Tomas Härdin wrote: > > > &g

Re: [FFmpeg-devel] [PATCH] avutil/opt: add AV_OPT_FLAG_FORCE_CONST

2024-04-14 Thread Marton Balint
On Sun, 14 Apr 2024, Timo Rothenpieler wrote: --- doc/APIchanges | 3 +++ libavutil/opt.c | 14 ++ libavutil/opt.h | 5 + libavutil/version.h | 2 +- 4 files changed, 23 insertions(+), 1 deletion(-) Where do you intend to use this flag? So some justification or

Re: [FFmpeg-devel] [PATCH 4/5] avformat/mxfdec: Check index_edit_rate

2024-04-09 Thread Marton Balint
On Tue, 9 Apr 2024, Tomas Härdin wrote: mån 2024-04-08 klockan 21:46 +0200 skrev Marton Balint: On Mon, 8 Apr 2024, Tomas Härdin wrote: > tor 2024-04-04 klockan 00:51 +0200 skrev Michael Niedermayer: > > Fixes: Assertion b >=0 failed at libavutil/mathematics.c:62 >

Re: [FFmpeg-devel] [PATCH v2 1/4] avformat/mov_chan: check channel count of layout tags at compile time

2024-04-08 Thread Marton Balint
On Wed, 3 Apr 2024, Marton Balint wrote: We can do this by using an X-macro for channel map declaration and doing a static_assert() in one pass for the check. Thanks for Andreas Rheinhardt for the suggestion. Will apply the series. Regards, Marton Signed-off-by: Marton Balint

Re: [FFmpeg-devel] [PATCH 4/5] avformat/mxfdec: Check index_edit_rate

2024-04-08 Thread Marton Balint
On Mon, 8 Apr 2024, Tomas Härdin wrote: tor 2024-04-04 klockan 00:51 +0200 skrev Michael Niedermayer: Fixes: Assertion b >=0 failed at libavutil/mathematics.c:62 Fixes: 67811/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer- 5108429687422976 Found-by: continuous fuzzing process

Re: [FFmpeg-devel] [PATCH] avformat/hlsenc: use a slash separator even in win32

2024-04-06 Thread Marton Balint
On Sun, 31 Mar 2024, Marton Balint wrote: We don't know if the protocol used is referring to a local file or a remote resource, so it is better to simply use slash as separator which works all the time. (well, except in very special cases when the user specified a \\?\ path) Fixes ticket

Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: never override channel count in av_buffersrc_add_frame_flags

2024-04-06 Thread Marton Balint
On Sun, 31 Mar 2024, Marton Balint wrote: Overriding unknown layouts with the negotiated layout is OK, but the number of channels should match with what was negotiated. Will apply. Regards, Marton Signed-off-by: Marton Balint --- libavfilter/buffersrc.c | 2 +- 1 file changed, 1

Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one

2024-04-06 Thread Marton Balint
On Sat, 30 Mar 2024, James Almer wrote: On 3/29/2024 7:01 PM, Marton Balint wrote: On Sat, 23 Mar 2024, Marton Balint wrote: Fixes ffplay playback of unknown layouts, when SDL directly supports the audio format, such as: ffplay -f lavfi anullsrc=cl=2C,aformat=s16 Without

Re: [FFmpeg-devel] Fixes #10509

2024-04-04 Thread Marton Balint
On Mon, 1 Apr 2024, Poorva wrote: On Sun, Mar 31, 2024 at 8:35 PM Marton Balint wrote: On Fri, 29 Mar 2024, Poorva wrote: On Tue, Mar 26, 2024 at 2:36 AM Poorva <2003gaikarpoo...@gmail.com> wrote: Thank you for your feedback on the Git patch I submitted for review.

Re: [FFmpeg-devel] [PATCH 5/5] avformat/pcm: Use 64bit in bitrate computation

2024-04-04 Thread Marton Balint
On Thu, 4 Apr 2024, Michael Niedermayer wrote: Fixes: signed integer overflow: 65792 * 65312 cannot be represented in type 'int' Fixes: 67819/clusterfuzz-testcase-minimized-ffmpeg_dem_WADY_fuzzer-5236100912185344 Found-by: continuous fuzzing process

Re: [FFmpeg-devel] [PATCH] avformat/mxfdec: Check that edit_unit_byte_count is not negative

2024-04-03 Thread Marton Balint
On Wed, 3 Apr 2024, Tomas Härdin wrote: mån 2024-04-01 klockan 18:22 +0200 skrev Marton Balint: On Mon, 1 Apr 2024, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavformat/mxfdec.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) >

[FFmpeg-devel] [PATCH v2 1/4] avformat/mov_chan: check channel count of layout tags at compile time

2024-04-02 Thread Marton Balint
We can do this by using an X-macro for channel map declaration and doing a static_assert() in one pass for the check. Thanks for Andreas Rheinhardt for the suggestion. Signed-off-by: Marton Balint --- libavformat/mov_chan.c | 217 - 1 file changed, 108

Re: [FFmpeg-devel] [PATCH 1/6] avformat/isom: Uninit layout in ff_mp4_read_dec_config_descr()

2024-04-02 Thread Marton Balint
On Mon, 1 Apr 2024, James Almer wrote: On 4/1/2024 8:40 PM, Michael Niedermayer wrote: On Mon, Apr 01, 2024 at 06:33:22PM -0300, James Almer wrote: On 4/1/2024 5:56 PM, Michael Niedermayer wrote: Fixes: memleak Fixes:

Re: [FFmpeg-devel] [PATCH 3/4] avformat/mov_chan: respect channel order when parsing and creating chnl atom

2024-04-01 Thread Marton Balint
On Mon, 1 Apr 2024, James Almer wrote: On 4/1/2024 3:56 PM, Marton Balint wrote: 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. Signed-off-by: Marton

[FFmpeg-devel] [PATCH 4/4] avformat/mov_chan: add support for omitted_channel bitmask in chnl atom

2024-04-01 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/mov_chan.c | 43 ++ libavformat/mov_chan.h | 2 +- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index e3cef3f4e8..e591ff031b 100644

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

2024-04-01 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. Signed-off-by: Marton Balint --- libavformat/mov_chan.c | 145

[FFmpeg-devel] [PATCH 2/4] avformat/mov_chan: factorize some layout map search functions

2024-04-01 Thread Marton Balint
Signed-off-by: Marton Balint --- libavformat/mov_chan.c | 62 -- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/libavformat/mov_chan.c b/libavformat/mov_chan.c index 6ccc26b3f1..9ee896f229 100644 --- a/libavformat/mov_chan.c +++ b

[FFmpeg-devel] [PATCH 1/4] avformat/mov_chan: check channel count at compile time by using a nonconst expression

2024-04-01 Thread Marton Balint
If the channel tag does not match the number of channels, the constant expression evaluation should fail. Signed-off-by: Marton Balint --- libavformat/mov_chan.c | 48 +++--- 1 file changed, 22 insertions(+), 26 deletions(-) diff --git a/libavformat

Re: [FFmpeg-devel] [PATCH] avformat/mxfdec: Check that edit_unit_byte_count is not negative

2024-04-01 Thread Marton Balint
On Mon, 1 Apr 2024, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer --- libavformat/mxfdec.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index e484db052ef..37446963369 100644 --- a/libavformat/mxfdec.c +++

[FFmpeg-devel] [PATCH] avformat/hlsenc: use a slash separator even in win32

2024-03-31 Thread Marton Balint
We don't know if the protocol used is referring to a local file or a remote resource, so it is better to simply use slash as separator which works all the time. (well, except in very special cases when the user specified a \\?\ path) Fixes ticket #9780. Signed-off-by: Marton Balint

[FFmpeg-devel] [PATCH] avfilter/buffersrc: never override channel count in av_buffersrc_add_frame_flags

2024-03-31 Thread Marton Balint
Overriding unknown layouts with the negotiated layout is OK, but the number of channels should match with what was negotiated. Signed-off-by: Marton Balint --- libavfilter/buffersrc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/buffersrc.c b/libavfilter

Re: [FFmpeg-devel] Fixes #10509

2024-03-31 Thread Marton Balint
On Fri, 29 Mar 2024, Poorva wrote: On Tue, Mar 26, 2024 at 2:36 AM Poorva <2003gaikarpoo...@gmail.com> wrote: Thank you for your feedback on the Git patch I submitted for review. I have rectified the problem by adding the necessary changes . The updated patch file is attached for

Re: [FFmpeg-devel] [PATCH] avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one

2024-03-29 Thread Marton Balint
On Sat, 23 Mar 2024, Marton Balint wrote: Fixes ffplay playback of unknown layouts, when SDL directly supports the audio format, such as: ffplay -f lavfi anullsrc=cl=2C,aformat=s16 Without the patch, "Channel layout change is not supported" errors are generated because buffersrc

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/ffplay: use correct buffersink channel layout parameters

2024-03-27 Thread Marton Balint
On Wed, 27 Mar 2024, Michael Niedermayer wrote: On Tue, Mar 19, 2024 at 07:54:20PM +, Marton Balint wrote: ffmpeg | branch: master | Marton Balint | Mon Mar 18 21:07:20 2024 +0100| [7251f909721a570726775acf61b2b9c28a950c76] | committer: Marton Balint fftools/ffplay: use correct

Re: [FFmpeg-devel] [PATCH v2 1/2] avutil/timestamp: introduce av_ts_make_time_string2 for better precision

2024-03-25 Thread Marton Balint
On Sat, 23 Mar 2024, Marton Balint wrote: av_ts_make_time_string() used "%.6g" format, but this format was losing precision even when the timestamp to be printed was not that large. For example for 3 hours (10800) seconds, only 1 decimal digit was printed, which made this format

Re: [FFmpeg-devel] Fixes #10509

2024-03-24 Thread Marton Balint
On Sun, 24 Mar 2024, Poorva wrote: From 0874a55ad33bb4df2789cbafc5247c0ae3d97e6a Mon Sep 17 00:00:00 2001 From: PoorvaGaikar Date: Sat, 9 Mar 2024 00:27:25 +0530 Subject: [PATCH v2] avfilter/f_select.c: add support for iw and ih constants You should mention the fixed ticket number in the

[FFmpeg-devel] [PATCH] avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one

2024-03-23 Thread Marton Balint
negotiated a stereo layout, but the stereo layout was never stored in the BufferSourceContext. This fixes a regression of 7251f909721a570726775acf61b2b9c28a950c76, but this is more of a regression of the avfilter channel layout conversion (1f96db959c1235bb7079d354e09914a0a2608f62). Signed-off-by: Mar

Re: [FFmpeg-devel] [PATCH 1/6] avfilter/af_channelmap: fix error message if FL source channel was missing

2024-03-23 Thread Marton Balint
On Tue, 19 Mar 2024, Marton Balint wrote: FL channel ID is 0, so for an unset value we must check for ID < 0. Regression since 1f96db959c1235bb7079d354e09914a0a2608f62. Will apply the series soon. Regards, Marton Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 4 ++-

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

2024-03-23 Thread Marton Balint
On Mon, 18 Mar 2024, Marton Balint wrote: On Mon, 18 Mar 2024, Andreas Rheinhardt wrote: 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

[FFmpeg-devel] [PATCH v2 2/2] avutil/timestamp: change precision of av_ts_make_time_string()

2024-03-23 Thread Marton Balint
By calling the av_ts_make_time_string2() from the function we can fix the precision issue. Signed-off-by: Marton Balint --- libavutil/timestamp.h| 4 +--- tests/ref/fate/filter-metadata-scdet | 12 ++-- tests/ref/fate/filter-metadata-silencedetect | 2

[FFmpeg-devel] [PATCH v2 1/2] avutil/timestamp: introduce av_ts_make_time_string2 for better precision

2024-03-23 Thread Marton Balint
". Note that depending on printf %f implementation, we might trim "infinity" to "inf". Thanks for Allan Cady for bringing up this issue. Signed-off-by: Marton Balint --- doc/APIchanges| 5 + libavutil/Makefile| 1 + libavutil/timestamp.c | 36

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 t

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

2024-03-21 Thread Marton Balint
On Thu, 21 Mar 2024, Tobias Rapp wrote: On 19/03/2024 20:14, Marton Balint wrote: On Tue, 19 Mar 2024, Michael Niedermayer wrote: On Sun, Mar 17, 2024 at 08:57:29PM +0100, Marton Balint wrote: - Only parse the defined masks in dwChannelMask, unless strict_std_compliance   is less

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

2024-03-20 Thread 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 example for 3 hours (10800) seconds, only

[FFmpeg-devel] [PATCH 6/6] doc/filters: extend af_channelmap documentation

2024-03-19 Thread Marton Balint
Signed-off-by: Marton Balint --- doc/filters.texi | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index 913365671d..18f0d1c5a7 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -4291,14 +4291,18 @@ It accepts

[FFmpeg-devel] [PATCH 5/6] avfilter/af_channelmap: add some additional checks for the mappings

2024-03-19 Thread Marton Balint
is a regression from 4af412be7153405e43930ac73fc7d91d7ded19eb. Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 53 + 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 62e11103ad

[FFmpeg-devel] [PATCH 4/6] avfilter/af_channelmap: factorize checking indexes against a channel layout

2024-03-19 Thread Marton Balint
Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 41 ++--- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 1ecbddd462..62e11103ad 100644 --- a/libavfilter/af_channelmap.c

[FFmpeg-devel] [PATCH 3/6] avfilter/af_channelmap: disallow channel index 64

2024-03-19 Thread Marton Balint
MAX_CH is 64, therefore the maximum index is 63. Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_channelmap.c b/libavfilter/af_channelmap.c index 35dc4c4618..1ecbddd462 100644 --- a/libavfilter

[FFmpeg-devel] [PATCH 2/6] avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified

2024-03-19 Thread Marton Balint
In this case in_channel_idx was never set and the default 0 was used. Suprisingly no one noticed that the respective fate test output was wrong. Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 2 +- tests/fate/filter-audio.mak | 2 +- 2 files changed, 2 insertions(+), 2 deletions

[FFmpeg-devel] [PATCH 1/6] avfilter/af_channelmap: fix error message if FL source channel was missing

2024-03-19 Thread Marton Balint
FL channel ID is 0, so for an unset value we must check for ID < 0. Regression since 1f96db959c1235bb7079d354e09914a0a2608f62. Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_channelmap.

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

2024-03-19 Thread Marton Balint
On Mon, 18 Mar 2024, Marton Balint wrote: 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 example for 3 hours (10800) seconds, only 1 decimal digit was printed, which made t

Re: [FFmpeg-devel] [PATCH] fftools/ffplay: use correct buffersink channel layout parameters

2024-03-19 Thread Marton Balint
On Mon, 18 Mar 2024, James Almer wrote: LGTM if tested. Sorry for the breakage. Please backport it to all the relevant release branches too. OK, will apply. Thanks, Marton On Mon, Mar 18, 2024 at 5:20 PM Marton Balint wrote: Regression since 0995e1f1b31f6e937a1b527407ed3e850f138098

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

2024-03-19 Thread Marton Balint
On Tue, 19 Mar 2024, Michael Niedermayer wrote: On Sun, Mar 17, 2024 at 08:57:29PM +0100, Marton Balint wrote: - Only parse the defined masks in dwChannelMask, unless strict_std_compliance is less than normal. This matches with the behaviour of the wav muxer. - Ignore additional bits

[FFmpeg-devel] [PATCH] fftools/ffplay: use correct buffersink channel layout parameters

2024-03-18 Thread Marton Balint
Regression since 0995e1f1b31f6e937a1b527407ed3e850f138098. Signed-off-by: Marton Balint --- fftools/ffplay.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 09b4846deb..fcd1319ce7 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2040,6

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

2024-03-17 Thread Marton Balint
On Mon, 18 Mar 2024, Andreas Rheinhardt wrote: 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

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

2024-03-17 Thread Marton Balint
On Wed, 13 Mar 2024, Allan Cady via ffmpeg-devel wrote: On Tuesday, March 12, 2024 at 02:24:47 PM PDT, Marton Balint wrote: 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

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

2024-03-17 Thread Marton Balint
for bringing up this issue. Signed-off-by: Marton Balint --- doc/APIchanges | 3 ++ libavutil/Makefile | 1 + libavutil/timestamp.c| 33 libavutil/timestamp.h| 8 + libavutil

[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

  1   2   3   4   5   6   7   8   9   10   >