[FFmpeg-devel] [PATCH 2/2] configure: bump minimum AviSynth+ header version

2023-07-15 Thread Stephen Hutchinson
AVISYNTH_INTERFACE_VERSION 10 fell in-between the releases of 3.7.2 and 3.7.3, and is required to be able to read the channel layout information. --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index dab3fb9036..a85122921e 100755 ---

[FFmpeg-devel] [PATCH 1/2] avisynth: pass audio channel layout

2023-07-15 Thread Stephen Hutchinson
--- libavformat/avisynth.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index b426ac343e..027e8c63f6 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -62,6 +62,7 @@ typedef struct AviSynthLibrary {

[FFmpeg-devel] [PATCH 0/2] avisynth: pass audio channel layout

2023-07-15 Thread Stephen Hutchinson
AviSynth+ 3.7.3 adds the ability to define audio channel layouts, and adding it to the libavformat demuxer is trivial. Bumps the minimum required version of the AviSynth+ headers to 3.7.3. Stephen Hutchinson (2): avisynth: pass audio channel layout configure: bump minimum AviSynth+ header

[FFmpeg-devel] [PATCH] avcodec/x86/mathops: use constrained immediate operands

2023-07-15 Thread James Almer
Should fix assembling with binutil as >= 2.41 Signed-off-by: James Almer --- This is IMO a big breakage. binutil's as has until now clipped these values on its own, and never required the compiler to do it. libavcodec/x86/mathops.h | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-)

Re: [FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5 (v3)

2023-07-15 Thread James Almer
On 7/15/2023 4:54 PM, Marvin Scholz wrote: On 15 Jul 2023, at 21:36, Pavel Koshevoy wrote: --- libavcodec/audiotoolboxdec.c | 2 ++ libavcodec/audiotoolboxenc.c | 4 2 files changed, 6 insertions(+) diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c index

Re: [FFmpeg-devel] [PATCH 06/22] lavfi: make sure frame SAR matches the link value

2023-07-15 Thread Michael Niedermayer
On Fri, Jul 07, 2023 at 11:48:31AM +0200, Anton Khirnov wrote: > --- > libavfilter/avfilter.c | 2 ++ > 1 file changed, 2 insertions(+) Breaks aspect ratio of this, and likely others ./ffmpeg -i ~/tickets/4161/VR_MOVIE_GuyMartinsSpitfireBcast169\ qsf\ lappyAspectNoChnge_extract.mpg -bitexact

[FFmpeg-devel] [PATCH 2/2] lavc/aacpsdsp: unroll RISC-V V add_squares

2023-07-15 Thread Rémi Denis-Courmont
This does not make much difference with the Device Under Test, but since we can: Before: ps_add_squares_rvv_f32: 11973.7 After: ps_add_squares_rvv_f32: 11958.2 --- libavcodec/riscv/aacpsdsp_rvv.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[FFmpeg-devel] [PATCH 1/2] lavc/aacpsdsp: rework RISC-V add_squares

2023-07-15 Thread Rémi Denis-Courmont
Segmented loads are kinda slow, so this advantageously uses a unit-strided load and narrowing shifts instead. Before: ps_add_squares_rvv_f32: 30352.2 After: ps_add_squares_rvv_f32: 11973.7 --- libavcodec/riscv/aacpsdsp_rvv.S | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-)

Re: [FFmpeg-devel] [PATCH 3/3] swscale/x86/yuv2yuvX: Process tails by jumping back into the main loop.

2023-07-15 Thread Michael Niedermayer
On Fri, Jul 14, 2023 at 12:08:46PM +0200, Alan Kelly wrote: > --- > libswscale/x86/swscale.c| 11 --- > libswscale/x86/yuv2yuvX.asm | 12 ++-- > 2 files changed, 14 insertions(+), 9 deletions(-) seems to segfault with ./ffmpeg_g -i mm-short.mpg -an -vcodec snow -t 0.2

Re: [FFmpeg-devel] [PATCH 4/7] checkasm: use pointers for start/stop functions

2023-07-15 Thread Rémi Denis-Courmont
Le lauantaina 15. heinäkuuta 2023, 20.43.26 EEST Lynne a écrit : > Jul 15, 2023, 10:26 by r...@remlab.net: > > Le lauantaina 15. heinäkuuta 2023, 11.05.51 EEST Lynne a écrit : > >> Jul 14, 2023, 20:29 by r...@remlab.net: > >> > This makes all calls to the bench start and stop functions via > >> >

Re: [FFmpeg-devel] git email hook

2023-07-15 Thread Michael Niedermayer
On Sat, Jul 15, 2023 at 08:34:10PM +0200, Nicolas George wrote: > Michael Niedermayer (12023-07-14): > > I today added and tested git-multimail to git.ffmpeg.org as our git mail > > sending script is old and unmaintained > > > > I intend to use libavradio for testing it, this will result in > >

Re: [FFmpeg-devel] [PATCH 25/33] fftools/ffmpeg_filter: stop disregarding user-specified pixel format

2023-07-15 Thread Michael Niedermayer
Hi On Fri, Jul 14, 2023 at 07:06:15PM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2023-07-14 17:47:19) > > On Fri, Jul 14, 2023 at 11:44:07AM +0200, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2023-07-14 01:11:07) > > > > On Thu, Jul 13, 2023 at 12:55:45PM +0200, Anton

Re: [FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5 (v3)

2023-07-15 Thread Marvin Scholz
On 15 Jul 2023, at 21:36, Pavel Koshevoy wrote: > --- > libavcodec/audiotoolboxdec.c | 2 ++ > libavcodec/audiotoolboxenc.c | 4 > 2 files changed, 6 insertions(+) > > diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c > index 82babe3d31..5456f916cf 100644 > ---

Re: [FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5 (v2)

2023-07-15 Thread Pavel Koshevoy
On Sat, Jul 15, 2023 at 10:11 AM Marvin Scholz wrote: > On 15 Jul 2023, at 17:40, Pavel Koshevoy wrote: > > > --- > > libavcodec/audiotoolboxdec.c | 2 ++ > > libavcodec/audiotoolboxenc.c | 4 > > 2 files changed, 6 insertions(+) > > > > Hi, thanks for the patch, small remark below: > > >

[FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5 (v3)

2023-07-15 Thread Pavel Koshevoy
--- libavcodec/audiotoolboxdec.c | 2 ++ libavcodec/audiotoolboxenc.c | 4 2 files changed, 6 insertions(+) diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c index 82babe3d31..5456f916cf 100644 --- a/libavcodec/audiotoolboxdec.c +++ b/libavcodec/audiotoolboxdec.c @@

Re: [FFmpeg-devel] git email hook

2023-07-15 Thread Nicolas George
Michael Niedermayer (12023-07-14): > I today added and tested git-multimail to git.ffmpeg.org as our git mail > sending script is old and unmaintained > > I intend to use libavradio for testing it, this will result in > different looking mails for avradio. (probably on the next push in a day or

[FFmpeg-devel] [PATCH] fftools: Avoid build failure on OSX 10.6 with gcc 4.2.1

2023-07-15 Thread Pavel Koshevoy
... and make code more readable / human friendly. --- fftools/ffmpeg_mux_init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index 6458414b5f..bade35896f 100644 --- a/fftools/ffmpeg_mux_init.c +++

Re: [FFmpeg-devel] [PATCH 4/7] checkasm: use pointers for start/stop functions

2023-07-15 Thread Lynne
Jul 15, 2023, 10:26 by r...@remlab.net: > Le lauantaina 15. heinäkuuta 2023, 11.05.51 EEST Lynne a écrit : > >> Jul 14, 2023, 20:29 by r...@remlab.net: >> > This makes all calls to the bench start and stop functions via >> > function pointers. While the primary goal is to support run-time >> >

Re: [FFmpeg-devel] [PATCH] avcodec/mpegvideo_dec: properly set output frames as keyframes

2023-07-15 Thread Jan Ekström
On Fri, Jul 14, 2023 at 3:32 PM James Almer wrote: > > Should fix ticket #10426. > > Signed-off-by: James Almer > --- > libavcodec/mpegvideo_dec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c > index

Re: [FFmpeg-devel] [PATCH 1/2] avradio/sdrdemux: avoid repeated litteral number

2023-07-15 Thread Michael Niedermayer
On Fri, Jul 14, 2023 at 08:03:40PM +0200, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer > --- > libavradio/sdrdemux.c | 16 +--- > 1 file changed, 9 insertions(+), 7 deletions(-) will apply patchset [...] -- Michael GnuPG fingerprint:

Re: [FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5 (v2)

2023-07-15 Thread Marvin Scholz
On 15 Jul 2023, at 17:40, Pavel Koshevoy wrote: > --- > libavcodec/audiotoolboxdec.c | 2 ++ > libavcodec/audiotoolboxenc.c | 4 > 2 files changed, 6 insertions(+) > Hi, thanks for the patch, small remark below: > diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c >

Re: [FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5

2023-07-15 Thread Pavel Koshevoy
On Fri, Jul 14, 2023 at 7:34 PM James Almer wrote: > On 7/11/2023 11:10 AM, Pavel Koshevoy wrote: > > --- > > libavcodec/audiotoolboxdec.c | 2 ++ > > libavcodec/audiotoolboxenc.c | 4 > > 2 files changed, 6 insertions(+) > > > > diff --git a/libavcodec/audiotoolboxdec.c

[FFmpeg-devel] [PATCH] lavc/audiotoolbox: fix build failure on osx 10.5 (v2)

2023-07-15 Thread Pavel Koshevoy
--- libavcodec/audiotoolboxdec.c | 2 ++ libavcodec/audiotoolboxenc.c | 4 2 files changed, 6 insertions(+) diff --git a/libavcodec/audiotoolboxdec.c b/libavcodec/audiotoolboxdec.c index 82babe3d31..e336aade8b 100644 --- a/libavcodec/audiotoolboxdec.c +++ b/libavcodec/audiotoolboxdec.c @@

[FFmpeg-devel] [PATCH 6/7] checkasm: allow run-time fallback to AV_READ_TIME

2023-07-15 Thread Rémi Denis-Courmont
On Linux RISC-V, depending on kernel version and configuration, the cycle counters may be available: - via Linux perf (as on Arm), - directly with RDCYCLE (which is considered legacy), - neither (if admistratively disabled), or - or both (in legacy compatibility mode). This allows to try Linux

[FFmpeg-devel] [PATCH 5/7] checkasm: make bench clean-up also a function pointer

2023-07-15 Thread Rémi Denis-Courmont
Because we might as well at this point. This incidentally fixes a corner case bug that state.sys_fd == 0 could be either the initial value from .bss or a valid file descriptor (in which case it didn't get closed). --- tests/checkasm/checkasm.c | 20 +++- 1 file changed, 11

[FFmpeg-devel] [PATCH 7/7] configure: enable Linux perf on RISC-V by default

2023-07-15 Thread Rémi Denis-Courmont
Now that checkasm can automatically fall back to RDCYCLE, it is safe to enable this for forward compatibility with kernel versions mitigating the "Cycle Drift" side channel attack. Where available, this should also reduce measurement noise, since kernel and hypervisor cycles should no longer be

[FFmpeg-devel] [PATCH 4/7] checkasm: remove unused variables

2023-07-15 Thread Rémi Denis-Courmont
--- tests/checkasm/checkasm.c | 2 -- tests/checkasm/checkasm.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index e921257257..c90f361ff7 100644 --- a/tests/checkasm/checkasm.c +++ b/tests/checkasm/checkasm.c @@ -522,7 +522,6 @@

[FFmpeg-devel] [PATCH 3/7] checkasm: use pointers for start/stop functions

2023-07-15 Thread Rémi Denis-Courmont
This makes all calls to the bench start and stop functions via function pointers. While the primary goal is to support run-time selection of the performance measurement back-end in later commits, this has the side benefit of containing platform dependencies in to checkasm.c and out of checkasm.h.

[FFmpeg-devel] [PATCH 2/7] checkasm: make perf macros functional

2023-07-15 Thread Rémi Denis-Courmont
This converts the bench/perf start/stop macros into functional macros, and for that to work, take the Linux perf code out of line. --- tests/checkasm/checkasm.c | 24 tests/checkasm/checkasm.h | 36 +--- 2 files changed, 33 insertions(+),

[FFmpeg-devel] [PATCH 1/7] checkasm: improve Linux perf error message

2023-07-15 Thread Rémi Denis-Courmont
Report the failing system call name, as is convention, rather than just a rather unhelpful "syscall". --- tests/checkasm/checkasm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/checkasm/checkasm.c b/tests/checkasm/checkasm.c index 4311a8ffcb..8702c9a30a 100644 ---

[FFmpeg-devel] [PATCHv2 0/7] checkasm: RISC-V Linux perf enablement

2023-07-15 Thread Rémi Denis-Courmont
Changes since v1: - Purge additional no longer used variable. - Deinitialise benchmarking through function pointer. - Cache function pointers outside bench loop. -- レミ・デニ-クールモン http://www.remlab.net/ ___ ffmpeg-devel mailing list

[FFmpeg-devel] [RFC] [PATCH] avcodec/codec_par: Keep format channel layout if specified

2023-07-15 Thread Raphaël Zumer
Hello, Tagging this as RFC in case there is disagreement on the correct/desired behavior. For context: I am working with spatial audio and noticed that FFmpeg does not honor the SA3D box metadata, which is used to signal ambisonic audio channel layouts. FFmpeg does parse the SA3D box and

[FFmpeg-devel] [PATCH 44/47] fftools/opt_common: replace report_and_exit() with returning an error code

2023-07-15 Thread Anton Khirnov
Remove report_and_exit(), as it has no more users. --- fftools/cmdutils.c | 6 -- fftools/cmdutils.h | 11 --- fftools/opt_common.c | 10 +++--- 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index

[FFmpeg-devel] [PATCH 30/47] fftools/ffmpeg_opt: replace exit_program() with returning error codes

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_opt.c | 49 ++-- 1 file changed, 29 insertions(+), 20 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 5a5a26d0a5..293397a8b7 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -190,7 +190,7 @@ int

[FFmpeg-devel] [PATCH 36/47] fftools/cmdutils: add error handling to filter_codec_opts()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c| 41 ++- fftools/cmdutils.h| 8 +--- fftools/ffmpeg_demux.c| 5 - fftools/ffmpeg_mux_init.c | 11 --- fftools/ffplay.c | 6 +- fftools/ffprobe.c | 8 ++-- 6 files changed,

[FFmpeg-devel] [PATCH 31/47] fftools/opt_common: replace exit_program() with returning error codes

2023-07-15 Thread Anton Khirnov
--- fftools/opt_common.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fftools/opt_common.c b/fftools/opt_common.c index f6fe9815e1..39258bb46c 100644 --- a/fftools/opt_common.c +++ b/fftools/opt_common.c @@ -1159,7 +1159,9 @@ int init_report(const char *env, FILE

[FFmpeg-devel] [PATCH 40/47] fftools/ffmpeg: return an error from assert_avoptions() instead of aborting

2023-07-15 Thread Anton Khirnov
Rename it to check_avoptions(). --- fftools/ffmpeg.c | 6 -- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_dec.c | 5 - fftools/ffmpeg_demux.c | 5 - fftools/ffmpeg_enc.c | 5 - 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.c

[FFmpeg-devel] [PATCH 35/47] fftools/cmdutils: constify the first parameter of filter_codec_opts()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c | 2 +- fftools/cmdutils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 330b9c2aba..137e69f2c3 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -943,7 +943,7 @@ int

[FFmpeg-devel] [PATCH 45/47] fftools/ffprobe: inline opt_output_file() into its only caller

2023-07-15 Thread Anton Khirnov
There is no reason to keep them separate. Also, replace exit_program() with returning an error code. --- fftools/ffprobe.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 6180a5c952..e234c92904 100644 --- a/fftools/ffprobe.c

[FFmpeg-devel] [PATCH 41/47] fftools/ffmpeg: return an error from MATCH_PER_STREAM_OPT() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 73baad238c..5c93b3aa29 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -912,7 +912,7 @@ static inline int err_merge(int err0, int err1) so =

[FFmpeg-devel] [PATCH 38/47] fftools/ffmpeg: consolidate exiting from main() on error

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index b4ea52ac1d..0c5e553c72 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1339,17 +1339,19 @@ int main(int argc, char **argv) /* parse options and

[FFmpeg-devel] [PATCH 47/47] fftools/ffmpeg: stop calling exit_program()

2023-07-15 Thread Anton Khirnov
Remove exit_program() and register_exit(), as they are no longer used. --- fftools/cmdutils.c | 15 --- fftools/cmdutils.h | 10 -- fftools/ffmpeg.c | 4 +--- 3 files changed, 1 insertion(+), 28 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index

[FFmpeg-devel] [PATCH 46/47] fftools/ffprobe: stop calling exit_program()

2023-07-15 Thread Anton Khirnov
Inline the relevant part of ffprobe_cleanup() into main() and drop the rest. --- fftools/ffprobe.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index e234c92904..a39185f6fe 100644 --- a/fftools/ffprobe.c +++

[FFmpeg-devel] [PATCH 42/47] fftools/ffprobe: replace report_and_exit() with returning error codes

2023-07-15 Thread Anton Khirnov
--- fftools/ffprobe.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index c83d20995e..6180a5c952 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3350,7 +3350,7 @@ static int open_input_file(InputFile *ifile, const char

[FFmpeg-devel] [PATCH 43/47] fftools/ffplay: replace report_and_exit() with returning an error code

2023-07-15 Thread Anton Khirnov
--- fftools/ffplay.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index a491fdd9e3..5212ad053e 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2784,8 +2784,12 @@ static int read_thread(void *arg) int

[FFmpeg-devel] [PATCH 27/47] fftools/cmdutils: add error handling to grow_array()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c | 19 --- fftools/cmdutils.h | 14 +- 2 files changed, 21 insertions(+), 12 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 6c627ee815..63b29c7a3a 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -262,6 +262,7

[FFmpeg-devel] [PATCH 20/47] fftools/ffmpeg_filter: return error codes from fg_create() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.h| 2 +- fftools/ffmpeg_filter.c | 38 ++ fftools/ffmpeg_opt.c| 8 ++-- 3 files changed, 25 insertions(+), 23 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 043eb5e6ec..ba73dcffdc 100644 ---

[FFmpeg-devel] [PATCH 25/47] fftools/cmdutils: drop unused ALLOC_ARRAY_ELEM()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index f54f3322ef..decd23040f 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -443,9 +443,6 @@ void *allocate_array_elem(void *array, size_t elem_size, int *nb_elems);

[FFmpeg-devel] [PATCH 39/47] fftools/cmdutils: return AVERROR_EXIT for OPT_EXIT options instead of aborting()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c | 2 +- fftools/ffmpeg.c | 3 +++ fftools/ffmpeg_opt.c | 2 +- fftools/ffplay.c | 2 +- fftools/ffprobe.c| 2 +- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 9d9d8d44a6..f37b7d44d6 100644 ---

[FFmpeg-devel] [PATCH 32/47] fftools: return errors from parse_number_or_die() instead of aborting

2023-07-15 Thread Anton Khirnov
Rename the function to just parse_number(). --- fftools/cmdutils.c| 39 +-- fftools/cmdutils.h| 6 ++ fftools/ffmpeg_mux_init.c | 7 +-- fftools/ffmpeg_opt.c | 23 ++- fftools/ffplay.c | 25

[FFmpeg-devel] [PATCH 23/47] fftools/cmdutils: return error codes from setup_find_stream_info_opts() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c | 30 +- fftools/cmdutils.h | 8 +++- fftools/ffmpeg_demux.c | 6 +- fftools/ffplay.c | 6 +- fftools/ffprobe.c | 6 +- 5 files changed, 39 insertions(+), 17 deletions(-) diff --git a/fftools/cmdutils.c

[FFmpeg-devel] [PATCH 28/47] fftools/cmdutils: add error handling to GROW_ARRAY()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c| 44 ++- fftools/cmdutils.h| 6 +- fftools/ffmpeg_demux.c| 10 +++-- fftools/ffmpeg_mux_init.c | 15 ++--- fftools/ffmpeg_opt.c | 24 - fftools/ffplay.c | 5 - 6

[FFmpeg-devel] [PATCH 34/47] fftools: handle errors in parse_options()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c | 15 ++- fftools/cmdutils.h | 4 ++-- fftools/ffplay.c | 12 fftools/ffprobe.c | 10 +++--- 4 files changed, 27 insertions(+), 14 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index b401b8fb89..330b9c2aba 100644 ---

[FFmpeg-devel] [PATCH 21/47] fftools/ffmpeg_filter: return error codes from set_channel_layout() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 485154a448..470d7b1f02 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -583,7 +583,7 @@ static int

[FFmpeg-devel] [PATCH 33/47] fftools: remove parse_time_or_die()

2023-07-15 Thread Anton Khirnov
Replace it with calling av_parse_time() directly, which provides graceful error handling and more accurate error messages. --- fftools/cmdutils.c| 19 ++- fftools/cmdutils.h| 17 - fftools/ffmpeg_mux_init.c | 30 --

[FFmpeg-devel] [PATCH 09/47] fftools/ffmpeg_enc: return errors from enc_open() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_enc.c | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 6130e3e221..f84641b1c4 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -165,19 +165,19 @@ static int

[FFmpeg-devel] [PATCH 13/47] fftools/ffmpeg_mux: return errors from of_output_packet() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.c | 4 +++- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_enc.c | 12 fftools/ffmpeg_mux.c | 20 +--- 4 files changed, 21 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 926fdea23a..ddb011741a 100644 ---

[FFmpeg-devel] [PATCH 37/47] fftools/ffmpeg_opt: consolidate printing errors in ffmpeg_parse_options()

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_opt.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 44a6b49ed7..14b292f202 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1289,6 +1289,7 @@ static int

[FFmpeg-devel] [PATCH 15/47] fftools/ffmpeg_dec: drop redundant handling of AVERROR_EXPERIMENTAL

2023-07-15 Thread Anton Khirnov
Normal error handling does the job just as well. --- fftools/ffmpeg_dec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fftools/ffmpeg_dec.c b/fftools/ffmpeg_dec.c index f5f764b6fa..62c1baf287 100644 --- a/fftools/ffmpeg_dec.c +++ b/fftools/ffmpeg_dec.c @@ -1115,9 +1115,6 @@ int

[FFmpeg-devel] [PATCH 17/47] fftools/ffmpeg_filter: return error codes from init_input_filter() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index cdf5610620..79e034d248 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -908,7 +908,7 @@ int

[FFmpeg-devel] [PATCH 19/47] fftools/ffmpeg_filter: return error codes from choose_pix_fmts() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 32 +++- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index ed0df9f320..2a3204121a 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -270,20 +270,20

[FFmpeg-devel] [PATCH 18/47] fftools/ffmpeg_filter: replace remaining exit_program() with error codes

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.h| 2 +- fftools/ffmpeg_filter.c | 15 ++- fftools/ffmpeg_opt.c| 4 +++- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index d7e16d034f..043eb5e6ec 100644 --- a/fftools/ffmpeg.h +++

[FFmpeg-devel] [PATCH 29/47] fftools/ffmpeg: return errors from find_codec_or_die() instead of aborting

2023-07-15 Thread Anton Khirnov
Rename the function to just find_codec(). --- fftools/ffmpeg.h | 4 +-- fftools/ffmpeg_demux.c| 54 +++ fftools/ffmpeg_mux_init.c | 4 ++- fftools/ffmpeg_opt.c | 13 ++ 4 files changed, 50 insertions(+), 25 deletions(-) diff --git

[FFmpeg-devel] [PATCH 10/47] fftools/ffmpeg_enc: return errors from do_*_out() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_enc.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f84641b1c4..72ba56a03d 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -839,8 +839,8 @@ static int

[FFmpeg-devel] [PATCH 12/47] fftools/ffmpeg_enc: return errors from encode_frame() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_enc.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 728c09dcad..9ca3940b93 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -641,7 +641,7 @@ static inline double

[FFmpeg-devel] [PATCH 14/47] fftools/ffmpeg_dec: return error codes from dec_packet() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.c | 5 - fftools/ffmpeg_dec.c | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index ddb011741a..b4ea52ac1d 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -814,8 +814,11 @@ static int

[FFmpeg-devel] [PATCH 08/47] fftools/ffmpeg_enc: return errors from enc_frame() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.h| 2 +- fftools/ffmpeg_enc.c| 6 -- fftools/ffmpeg_filter.c | 12 +--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 0189bee0f3..38f2b1ef66 100644 --- a/fftools/ffmpeg.h +++

[FFmpeg-devel] [PATCH 26/47] fftools/cmdutils: add error handling to allocate_array_elem()

2023-07-15 Thread Anton Khirnov
--- fftools/cmdutils.c| 2 +- fftools/cmdutils.h| 3 +-- fftools/ffmpeg_demux.c| 16 ++-- fftools/ffmpeg_filter.c | 28 +--- fftools/ffmpeg_mux_init.c | 16 ++-- 5 files changed, 51 insertions(+), 14 deletions(-) diff --git

[FFmpeg-devel] [PATCH 11/47] fftools/ffmpeg_enc: return errors from enc_flush() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.c | 2 +- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_enc.c | 6 -- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 27c4e7ef26..926fdea23a 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1250,7 +1250,7 @@

[FFmpeg-devel] [PATCH 07/47] fftools/ffmpeg_mux_init: avoid invalid memory access in set_dispositions()

2023-07-15 Thread Anton Khirnov
This function assumes AVMEDIA_* are always positive, while in fact it can also handle AVMEDIA_TYPE_UNKNOWN, which is -1. --- fftools/ffmpeg_mux_init.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index

[FFmpeg-devel] [PATCH 06/47] fftools/ffmpeg_filter: restrict reap_filters() to a single filtergraph

2023-07-15 Thread Anton Khirnov
This is more natural, as all except one of its callers require processing only one filtergraph. --- fftools/ffmpeg.c| 10 +- fftools/ffmpeg.h| 4 ++-- fftools/ffmpeg_filter.c | 33 - 3 files changed, 27 insertions(+), 20 deletions(-) diff

[FFmpeg-devel] [PATCH 24/47] fftools/ffmpeg_opt: reimplement -streamid using a dictionary

2023-07-15 Thread Anton Khirnov
This does not require an arbitrary limit on the number of streams. Also, return error codes from opt_streamid() instead of aborting. --- fftools/ffmpeg.h | 7 ++- fftools/ffmpeg_mux_init.c | 18 +++--- fftools/ffmpeg_opt.c | 12 +--- 3 files changed, 22

[FFmpeg-devel] [PATCH 16/47] fftools/ffmpeg_filter: return error codes from ofilter_bind_ost() instead of aborting

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_filter.c | 12 fftools/ffmpeg_mux_init.c | 4 +++- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 62b56a8cd8..d7e16d034f 100644 --- a/fftools/ffmpeg.h +++

[FFmpeg-devel] [PATCH 22/47] fftools/ffmpeg_filter: replace remaining report_and_exit() with error codes

2023-07-15 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 470d7b1f02..26aff9c328 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -723,14 +723,14 @@ static InputFilter

[FFmpeg-devel] [PATCH 03/47] fftools/ffmpeg_mux_init: deprecate "smart" pixel format selection

2023-07-15 Thread Anton Khirnov
It may override a format explicitly requested with -pix_fmt and instead select something completely unrelated, which is a user-hostile behaviour and is inconsistent with how other options generally work. Print a warning and delay for a second to make the users aware of the deprecation. ---

[FFmpeg-devel] [PATCH 05/47] fftools/ffmpeg_filter: stop accessing encoder from pixfmt selection

2023-07-15 Thread Anton Khirnov
ffmpeg CLI pixel format selection for filtering currently special-cases MJPEG encoding, where it will restrict the supported list of pixel formats depending on the value of the -strict option. In order to get that value it will apply it from the options dict into the encoder context, which is a

[FFmpeg-devel] [PATCH 02/47] fftools/ffmpeg_filter: move "smart" pixfmt selection to ffmpeg_mux_init

2023-07-15 Thread Anton Khirnov
This code works on encoder information and has no interaction with filtering, so it does not belong in ffmpeg_filter. --- fftools/ffmpeg_filter.c | 36 +--- fftools/ffmpeg_mux_init.c | 29 + 2 files changed, 30 insertions(+), 35

[FFmpeg-devel] [PATCH 04/47] tests/fate: fix mismatches between requested and actually used pixel formats

2023-07-15 Thread Anton Khirnov
--- tests/fate/fits.mak | 6 +++--- tests/fate/lavf-video.mak | 2 +- tests/fate/vcodec.mak | 4 ++-- tests/ref/fate/{fitsdec-gbrap16le => fitsdec-gbrap16be} | 4 ++--

[FFmpeg-devel] [PATCH 01/47] fftools/ffmpeg_mux_init: handle pixel format endianness

2023-07-15 Thread Anton Khirnov
When -pix_fmt designates a BE/LE pixel format, it gets translated into the native one by av_get_pix_fmt(). This may not always be the best choice, as the encoder might only support one endianness. In such a case, explicitly choose the endianness supported by the encoder. While this is currently

Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add ambient viewing environment packet side data.

2023-07-15 Thread Damiano Galassi
On Tue, Jul 11, 2023 at 6:45 PM Anton Khirnov wrote: > A FATE test would be much appreciated. > Is there some documentation on how to write a FATE test? I've got a small sample (2 bytes) ready, but I am not too sure how to write the test. ___

Re: [FFmpeg-devel] [PATCH 2/2] avformat/mov: add support for 'amve' ambient viewing environment box. As defined in ISOBMFF (ISO/IEC 14496-12) document.

2023-07-15 Thread Damiano Galassi
On Tue, Jul 11, 2023 at 6:53 PM James Almer wrote: > On 7/11/2023 4:41 AM, Damiano Galassi wrote: > > AVDictionaryEntry *encoder; > > @@ -2430,6 +2451,7 @@ static int mov_write_video_tag(AVFormatContext *s, > AVIOContext *pb, MOVMuxContex > > if (track->mode == MODE_MOV ||

Re: [FFmpeg-devel] [PATCH 0/3] avcodec: move HDR10 (MDCV/CLL) SEI handling to h2645_sei

2023-07-15 Thread Jan Ekström
On Wed, Jul 12, 2023 at 9:33 PM Jan Ekström wrote: > > This allows parsing code to be re-utilized from H.264, as well as probably > from VVC in the future. > > This additionally eases verification of the AVCodecContext side data patch > set, which includes libx264 integration for HDR10 side data.

Re: [FFmpeg-devel] [PATCH 25/33] fftools/ffmpeg_filter: stop disregarding user-specified pixel format

2023-07-15 Thread Paul B Mahol
On Fri, Jul 14, 2023 at 7:06 PM Anton Khirnov wrote: > Quoting Michael Niedermayer (2023-07-14 17:47:19) > > On Fri, Jul 14, 2023 at 11:44:07AM +0200, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2023-07-14 01:11:07) > > > > On Thu, Jul 13, 2023 at 12:55:45PM +0200, Anton Khirnov

Re: [FFmpeg-devel] [PATCH 4/7] checkasm: use pointers for start/stop functions

2023-07-15 Thread Rémi Denis-Courmont
Le lauantaina 15. heinäkuuta 2023, 11.05.51 EEST Lynne a écrit : > Jul 14, 2023, 20:29 by r...@remlab.net: > > This makes all calls to the bench start and stop functions via > > function pointers. While the primary goal is to support run-time > > selection of the performance measurement back-end

Re: [FFmpeg-devel] [PATCH 4/7] checkasm: use pointers for start/stop functions

2023-07-15 Thread Lynne
Jul 14, 2023, 20:29 by r...@remlab.net: > This makes all calls to the bench start and stop functions via > function pointers. While the primary goal is to support run-time > selection of the performance measurement back-end in later commits, > this has the side benefit of containing platform