Re: [FFmpeg-devel] [PATCH v4 1/1] avfilter/vf_colorspace: use colorspace negotiation API

2024-04-05 Thread Niklas Haas
On Thu, 04 Apr 2024 19:05:14 +0200 Nicolas Gaullier wrote: > Fixes a regression due to the fact that the colorspace filter does > not use the new API introduced by 8c7934f73ab6c568acaa. > The scale filter uses it since 45e09a30419cc2a7251e, and the setparams > filter since 3bf80df3ccd32aed23f0.

[FFmpeg-devel] [PATCH 14/15] avcodec/mpeg12dec: Remove redundant mpeg_enc_ctx_allocated

2024-04-05 Thread Andreas Rheinhardt
Use context_initialized from the underlying MpegEncContext instead. Also don't check before ff_mpv_common_end() in mpeg_decode_end(). Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff

[FFmpeg-devel] [PATCH 15/15] avcodec/mpegvideo_dec, h264_slice: Return proper error codes

2024-04-05 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_slice.c| 2 +- libavcodec/mpegvideo_dec.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 4b01c54147..a346839902 100644 --- a/libavcodec/h264_slice.c +++

[FFmpeg-devel] [PATCH 12/15] avcodec/mpegvideo_dec: Move getting Picture slot into alloc_picture()

2024-04-05 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 63 -- 1 file changed, 26 insertions(+), 37 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index b6ef4e5582..d337a6565b 100644 ---

[FFmpeg-devel] [PATCH 13/15] avcodec/mpegvideo: Remove pointless check

2024-04-05 Thread Andreas Rheinhardt
Possible since 315c956cbd14f021e49dac7fc0b906fad1672aad. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index 8a733afdb8..7af823b8bd 100644 --- a/libavcodec/mpegvideo.c +++

[FFmpeg-devel] [PATCH 02/15] avcodec/mpegutils: Move definitions to better places

2024-04-05 Thread Andreas Rheinhardt
FRAME_SKIPPED -> h263dec.h CANDIDATE_MB_TYPE_* -> mpegvideoenc.h INPLACE_OFFSET -> mpegvideoenc.h enum OutputFormat -> mpegvideo.h Signed-off-by: Andreas Rheinhardt --- libavcodec/h263dec.c | 1 - libavcodec/h263dec.h | 5 + libavcodec/intelh263dec.c | 2 --

[FFmpeg-devel] [PATCH 03/15] avcodec/mpeg12: Remove always-false check

2024-04-05 Thread Andreas Rheinhardt
Forgotten in 7800cc6e82068c6dfb5af53817f03dfda794c568. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c index 8d88820c46..62d7fd1814 100644 --- a/libavcodec/mpeg12.c +++ b/libavcodec/mpeg12.c

[FFmpeg-devel] [PATCH 04/15] avcodec/mpegvideo_dec, mpeg12dec: Move MPEG1/2 code to mpeg12dec.c

2024-04-05 Thread Andreas Rheinhardt
Up until now, ff_mpv_frame_start() offsets the data of the current picture and doubles the linesizes of all pictures if the current picture is field-based so that data and linesize allow to address the current field only. This is done based upon the current picture_structure value. Only two

[FFmpeg-devel] [PATCH] fate/ffmpeg: Avoid dependency on samples

2024-04-05 Thread Andreas Rheinhardt
Creating vsynth_lena.yuv needs the FATE suite, yet several tests in ffmpeg.mak without a dependency on samples used it as input file. Fix this by using vsynth1.yuv (which does not have such a dependency) instead. Also use vsynth1.yuv in fate-shortest to avoid the samples dependency in this test,

[FFmpeg-devel] [PATCH 05/15] avcodec/mpeg12dec: Remove redundant check

2024-04-05 Thread Andreas Rheinhardt
This code only gets executed for the first field. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index fb8bba3287..83ff40d237 100644 --- a/libavcodec/mpeg12dec.c +++

[FFmpeg-devel] [PATCH 06/15] avcodec/mpeg12dec: Don't pretend MPEG-1/2 to support alpha

2024-04-05 Thread Andreas Rheinhardt
(FF_PTR_ADD has to be kept although MPEG-1/2 only supports YUV pixel formats because our decoder also supports decoding to AV_PIX_FMT_GRAY8 depending upon CONFIG_GRAY.) Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff

[FFmpeg-devel] [PATCH 08/15] avcodec/mpeg12dec: Remove unnecessary FFCodec.close

2024-04-05 Thread Andreas Rheinhardt
The ipu decoder never calls ff_mpv_common_init() or allocates anything else that would need to be freed. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpeg12dec.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index

[FFmpeg-devel] [PATCH 11/15] avcodec/mpegvideo_dec: Factor allocating dummy frame out

2024-04-05 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 64 +++--- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 4fa89e4aef..b6ef4e5582 100644 ---

[FFmpeg-devel] [PATCH 09/15] avcodec/mpegvideo_dec: Remove obsolete current_picture_ptr reuse code

2024-04-05 Thread Andreas Rheinhardt
Obsolete since at least 74d623914f02aa79447df43a742efd0929dded04. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 1059aa9825..9f674488c0 100644 ---

[FFmpeg-devel] [PATCH 10/15] avcodec/mpegvideo_dec: Remove redundant code to reset keyframe flag

2024-04-05 Thread Andreas Rheinhardt
These AVFrames are blank and therefore the flag is already unset. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/mpegvideo_dec.c b/libavcodec/mpegvideo_dec.c index 9f674488c0..4fa89e4aef 100644 ---

[FFmpeg-devel] [PATCH 07/15] avcodec/mpegvideo_dec: Don't emit non-keyframe warning for H.261

2024-04-05 Thread Andreas Rheinhardt
H.261 does not have keyframes (or indeed frame types) at all, so this warning is not warranted. Also remove an always-true check while at it. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH 01/15] avcodec/mpegvideo_enc: Don't update current_picture unnecessarily

2024-04-05 Thread Andreas Rheinhardt
current_picture is not changed after frame_start() at all and it therefore does not need to be updated (i.e. copied to the slice thread contexts) a second time. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 1 - 1 file changed, 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH 14/31] fftools/ffmpeg_filter: accept a caller-provided output name

2024-04-05 Thread Anton Khirnov
Do not construct it from OutputStream manually. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 3 +++ fftools/ffmpeg_filter.c | 36 +++- fftools/ffmpeg_mux_init.c | 4 3 files changed, 26 insertions(+), 17

[FFmpeg-devel] [PATCH 27/31] fftools/ffmpeg_filter: only store complex filtergraphs in global array

2024-04-05 Thread Anton Khirnov
Store simple filtergraphs in the stream they feed. Keeping the two separate will be useful in following commits. --- fftools/ffmpeg.c| 5 + fftools/ffmpeg.h| 3 +++ fftools/ffmpeg_filter.c | 16 +--- fftools/ffmpeg_mux.c| 1 + 4 files changed, 22

[FFmpeg-devel] [PATCH 21/31] fftools/ffmpeg_filter: pass trim parameters through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Do not read them from OutputStream directly. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_filter.c | 11 +++ fftools/ffmpeg_mux_init.c | 2 ++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git

[FFmpeg-devel] [PATCH 12/31] fftools/ffmpeg_filter: pass vsync method through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Do not read it from OutputStream directly. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 3 ++- fftools/ffmpeg_filter.c | 9 +--- fftools/ffmpeg_mux.c | 2 +- fftools/ffmpeg_mux.h | 3 +++ fftools/ffmpeg_mux_init.c | 45

[FFmpeg-devel] [PATCH 24/31] fftools/ffmpeg_mux: drop OutputFile.format

2024-04-05 Thread Anton Khirnov
It is no longer used outside of the muxing code (where we can access the muxer directly). --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_mux.c | 15 +-- fftools/ffmpeg_mux_init.c | 1 - 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 20/31] fftools/ffmpeg_filter: pass autoscale through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Do not read it from OutputStream directly. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_filter.c | 2 +- fftools/ffmpeg_mux_init.c | 7 --- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git

[FFmpeg-devel] [PATCH 31/31] doc/ffmpeg: document that there can be multiple complex filtergraphs

2024-04-05 Thread Anton Khirnov
--- doc/ffmpeg.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.texi index 9bd548ce4e..e996ab945f 100644 --- a/doc/ffmpeg.texi +++ b/doc/ffmpeg.texi @@ -2143,7 +2143,8 @@ Define a complex filtergraph, i.e. one with arbitrary number of inputs

Re: [FFmpeg-devel] [PATCH 11/31] fftools/ffmpeg_filter: stop accessing encoder AVCodecContext

2024-04-05 Thread Dennis Mungai
On Fri, 5 Apr 2024 at 19:54, Gyan Doshi wrote: > > > On 2024-04-05 10:20 pm, Dennis Mungai wrote: > > > > Does this imply that down the line, with this and additional patchsets, > > that FFmpeg can handle tasks such as stream copy and filtering in the > same > > invocation? > > What do you mean?

[FFmpeg-devel] [PATCH 01/11] avcodec: add avcodec_get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas This replaces the myriad of existing lists in AVCodec by a unified API call, allowing us to (ultimately) trim down the sizeof(AVCodec) quite substantially, while also making this more trivially extensible. In addition to the already covered lists, add two new entries for color

[FFmpeg-devel] [PATCH 02/11] avcodec/encode: switch to avcodec_get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas --- libavcodec/encode.c | 88 - 1 file changed, 55 insertions(+), 33 deletions(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 34658d13d0c..d0e79379048 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@

[FFmpeg-devel] [PATCH 03/11] avcodec/allcodecs: add backcompat for new config API

2024-04-05 Thread Niklas Haas
From: Niklas Haas In order to avoid breaking older clients not yet using the new API, we need to add backwards compatibility for codecs which have switched from init_static() to get_supported_config(). This function can be removed entirely once the deprecated static fields are removed. ---

[FFmpeg-devel] [PATCH 15/31] fftools/ffmpeg_filter: drop a redundant check

2024-04-05 Thread Anton Khirnov
fg_finalise_bindings() already checks that all filtergraph outputs are connected. --- fftools/ffmpeg_filter.c | 5 - 1 file changed, 5 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index ceab58da19..41d96267bc 100644 --- a/fftools/ffmpeg_filter.c +++

[FFmpeg-devel] [PATCH 06/31] fftools/ffmpeg_filter: pass ts offset through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Reduces the need to access OutputFile, which will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_filter.c | 3 +-- fftools/ffmpeg_mux_init.c | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 04/31] fftools/ffmpeg_filter: stop accessing AVCodecContext.codec

2024-04-05 Thread Anton Khirnov
Instead pass the encoder through a newly-added output options struct, analogous to previously added input options. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 11 +-- fftools/ffmpeg_filter.c | 36 +++-

[FFmpeg-devel] [PATCH 06/11] avcodec/libaomenc: switch to get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas --- libavcodec/libaomenc.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 4a71bba9c9c..899aa2b261f 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@

[FFmpeg-devel] [PATCH 09/11] fftools: drop unused/hacky macros

2024-04-05 Thread Niklas Haas
From: Niklas Haas Having macros initialize local variables seems strange to me, and there are no more current users of these macros. (The one that was commented out was incorrect anyway, since the macro has changed in the meantime) --- fftools/cmdutils.h | 13 -

[FFmpeg-devel] [PATCH 07/11] avcodec/codec_internal: nuke init_static_data()

2024-04-05 Thread Niklas Haas
From: Niklas Haas All hail get_supported_config() --- libavcodec/allcodecs.c | 7 +-- libavcodec/codec_internal.h | 8 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index a9f1797930a..1f22e06e710 100644 ---

[FFmpeg-devel] [PATCH 08/11] fftools/opt_common: switch to avcodec_get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas While rewriting this macro, I decided to make it a bit more flexible so it can work for all of the fields (including future fields) in a more generic way. --- fftools/opt_common.c | 86 ++-- 1 file changed, 43 insertions(+), 43

[FFmpeg-devel] [PATCH 04/11] avcodec/libx265: switch to get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas --- libavcodec/libx265.c | 26 ++ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 0645cd20457..ff1e8463aa1 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -892,14 +892,24

[FFmpeg-devel] [PATCH 05/11] avcodec/libvpxenc: switch to get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas --- libavcodec/libvpxenc.c | 22 +++--- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index bcbdc4981e5..ac7f01e2aa9 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -2086,13

[FFmpeg-devel] [PATCH 13/31] fftools/ffmpeg: drop OutputStream.is_cfr

2024-04-05 Thread Anton Khirnov
It is used in a single place in the filtering code, so it is better to inline it there. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_filter.c | 2 +- fftools/ffmpeg_mux_init.c | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index

[FFmpeg-devel] [PATCH 29/31] fftools/ffmpeg_sched: allow filtergraphs to send to filtergraphs

2024-04-05 Thread Anton Khirnov
Will be useful for filtergraph chaining that will be added in following commits. --- fftools/ffmpeg_sched.c | 94 ++ fftools/ffmpeg_sched.h | 6 ++- 2 files changed, 63 insertions(+), 37 deletions(-) diff --git a/fftools/ffmpeg_sched.c

[FFmpeg-devel] [PATCH 22/31] fftools/ffmpeg_filter: move most of -apad logic to the muxer

2024-04-05 Thread Anton Khirnov
The decision whether -apad actually does anything is made based on muxer properties, and so more properly belongs there. Filtering code only receives the result. --- fftools/ffmpeg.h | 3 ++- fftools/ffmpeg_filter.c | 16 +++- fftools/ffmpeg_mux.c | 1 -

[FFmpeg-devel] [PATCH 23/31] fftools/ffmpeg_mux: drop OutputFile.shortest

2024-04-05 Thread Anton Khirnov
It is no longer needed outside of of_open() and its children. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_mux_init.c | 17 + 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 26b42a3fcd..1d32009f90 100644 ---

[FFmpeg-devel] [PATCH 28/31] fftools/ffmpeg_filter: change processing order in fg_finalise_bindings()

2024-04-05 Thread Anton Khirnov
First bind all inputs in all filtergraphs, only then check that all outputs are bound. Needed by the following commit. --- fftools/ffmpeg.h| 2 +- fftools/ffmpeg_filter.c | 33 ++--- fftools/ffmpeg_opt.c| 10 -- 3 files changed, 31 insertions(+),

[FFmpeg-devel] [PATCH 16/31] fftools/ffmpeg_filter: simplify retrieving filter type

2024-04-05 Thread Anton Khirnov
--- fftools/ffmpeg_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 41d96267bc..ffbc13eb70 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -1472,7 +1472,7 @@ fail: static int

[FFmpeg-devel] [PATCH 25/31] fftools/ffmpeg_filter: accept encoder thread count through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Stop digging through encoder options manually. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_filter.c | 20 ++-- fftools/ffmpeg_mux_init.c | 5 + 3 files changed, 21 insertions(+), 6 deletions(-)

[FFmpeg-devel] [PATCH 26/31] fftools/ffmpeg_filter: drop OutputFilter.ost

2024-04-05 Thread Anton Khirnov
All remaining code accessing it only needs to know whether this filtergraph output has been bound or not. --- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_filter.c | 6 +++--- fftools/ffmpeg_mux_init.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH] avcodec/libaomenc: bump the minimum required version to 2.0.0

2024-04-05 Thread James Almer
v2.0.0 is already four years old and available on stable distro releases. With this we stop setting codec capabilities during static data initialization. Signed-off-by: James Almer --- configure | 2 +- libavcodec/libaomenc.c | 42 -- 2

[FFmpeg-devel] [PATCH 17/31] fftools/ffmpeg_filter: add an AVClass to OutputFilter

2024-04-05 Thread Anton Khirnov
Use it for logging where appropriate, avoid logging to OutputStream as we do not own it. This is a step towards decoupling filtering from encoding. --- fftools/ffmpeg.h| 2 ++ fftools/ffmpeg_filter.c | 68 + 2 files changed, 51 insertions(+), 19

Re: [FFmpeg-devel] [PATCH 11/31] fftools/ffmpeg_filter: stop accessing encoder AVCodecContext

2024-04-05 Thread Anton Khirnov
Quoting Dennis Mungai (2024-04-05 19:07:19) > On Fri, 5 Apr 2024 at 19:54, Gyan Doshi wrote: > > > > > > > On 2024-04-05 10:20 pm, Dennis Mungai wrote: > > > > > > Does this imply that down the line, with this and additional patchsets, > > > that FFmpeg can handle tasks such as stream copy and

[FFmpeg-devel] [PATCH] avcodec/libx264: bump minimum required version to 160

2024-04-05 Thread Niklas Haas
From: Niklas Haas This version is four years old, and present in Debian oldstable, Ubuntu 22.04 and Leap 15.1. Allows cleaning up both the configure check and the file substantially. In particular, this is motivated by the desire to stop relying on init_static_data. --- configure|

[FFmpeg-devel] [PATCH 10/31] fftools/ffmpeg_filter: move the MJPEG format selection hack to muxer setup

2024-04-05 Thread Anton Khirnov
That, if anywhere, is a more appropriate place for it. --- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_filter.c | 29 +++-- fftools/ffmpeg_mux_init.c | 24 3 files changed, 29 insertions(+), 26 deletions(-) diff --git a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 18/31] fftools/ffmpeg_filter: drop an unnecessary use of OutputStream

2024-04-05 Thread Anton Khirnov
OutputFilter.type contains the same information. --- fftools/ffmpeg_filter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 840502bd62..d2fd26af7e 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@

[FFmpeg-devel] [PATCH 19/31] fftools/ffmpeg_filter: pass sws/swr opts through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Do not read them from OutputStream directly. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 7 +-- fftools/ffmpeg_filter.c | 27 ++- fftools/ffmpeg_mux.c | 3 --- fftools/ffmpeg_mux_init.c | 11 --- 4

[FFmpeg-devel] [PATCH 08/31] fftools/ffmpeg: warn about ignored -enc_time_base for subtitles earlier

2024-04-05 Thread Anton Khirnov
Can do it as soon as that option is parsed, no need to postpone it until opening the encoder. --- fftools/ffmpeg_enc.c | 3 --- fftools/ffmpeg_mux_init.c | 6 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index

[FFmpeg-devel] [PATCH 09/31] fftools/ffmpeg_filter: pass enc_timebase through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Reduces the need to access OutputStream, which will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 7 +-- fftools/ffmpeg_filter.c | 2 +- fftools/ffmpeg_mux_init.c | 4 +++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH 11/31] fftools/ffmpeg_filter: stop accessing encoder AVCodecContext

2024-04-05 Thread Dennis Mungai
On Fri, 5 Apr 2024, 19:14 Anton Khirnov, wrote: > Pass all the necessary value through OutputFilterOptions. > > Will allow decoupling filtering from encoding in future commits. > --- > fftools/ffmpeg.h | 7 +++ > fftools/ffmpeg_filter.c | 22 +++--- >

[FFmpeg-devel] [PATCH 07/31] fftools/ffmpeg_filter: pass keep_pix_fmt through OutputFilterOptions

2024-04-05 Thread Anton Khirnov
Reduces the need to access OutputStream, which will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 9 +++-- fftools/ffmpeg_filter.c | 8 +--- fftools/ffmpeg_mux_init.c | 9 + 3 files changed, 17 insertions(+), 9 deletions(-) diff

[FFmpeg-devel] [PATCH 11/31] fftools/ffmpeg_filter: stop accessing encoder AVCodecContext

2024-04-05 Thread Anton Khirnov
Pass all the necessary value through OutputFilterOptions. Will allow decoupling filtering from encoding in future commits. --- fftools/ffmpeg.h | 7 +++ fftools/ffmpeg_filter.c | 22 +++--- fftools/ffmpeg_mux_init.c | 6 ++ 3 files changed, 24 insertions(+),

[FFmpeg-devel] [PATCH 03/31] fftools/ffmpeg_filter: do not pass OutputStream to set_channel_layout()

2024-04-05 Thread Anton Khirnov
It only needs a list of allowed layouts and the requested layout. --- fftools/ffmpeg_filter.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 2308abf82a..ba6c6c7673 100644 ---

[FFmpeg-devel] [PATCH 05/31] fftools/ffmpeg_filter: check that filter type matches output stream type

2024-04-05 Thread Anton Khirnov
For simple filtergraphs. For complex filtergraphs they always match. --- fftools/ffmpeg_filter.c | 8 1 file changed, 8 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 0d359303f7..a59c61b312 100644 --- a/fftools/ffmpeg_filter.c +++

[FFmpeg-devel] [PATCH 02/31] lavfi/avfilter: add an "auto" constant to the threads option

2024-04-05 Thread Anton Khirnov
Analogous to the same constant in avfiltergraph and avcodec. Cf. f599ae88c25. --- libavfilter/avfilter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 7f94e71fbc..049e4f62ca 100644 --- a/libavfilter/avfilter.c +++

[FFmpeg-devel] [PATCH 01/31] lavfi/vf_scale: fix AVOption flags for "size"/"s"

2024-04-05 Thread Anton Khirnov
--- libavfilter/vf_scale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index fc0e3802db..1c07daeddf 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -998,8 +998,8 @@ static const AVOption

[FFmpeg-devel] [PATCH 30/31] fftools/ffmpeg_filter: implement filtergraph chaining

2024-04-05 Thread Anton Khirnov
This allows one complex filtergraph's output to be sent as input to another one, which is useful in certain situations (one is described in the docs). Chaining filtergraphs was already effectively possible by using a wrapped_avframe encoder connected to a loopback decoder, but it is ugly,

Re: [FFmpeg-devel] [PATCH 11/31] fftools/ffmpeg_filter: stop accessing encoder AVCodecContext

2024-04-05 Thread Gyan Doshi
On 2024-04-05 10:20 pm, Dennis Mungai wrote: Does this imply that down the line, with this and additional patchsets, that FFmpeg can handle tasks such as stream copy and filtering in the same invocation? What do you mean? If you map a stream twice, you already can do that now. Regards,

Re: [FFmpeg-devel] [PATCH] avcodec/libaomenc: bump the minimum required version to 2.0.0

2024-04-05 Thread Anton Khirnov
Quoting James Almer (2024-04-05 19:16:21) > v2.0.0 is already four years old and available on stable distro releases. > With this we stop setting codec capabilities during static data > initialization. Sounds reasonable to me. -- Anton Khirnov ___

[FFmpeg-devel] [PATCH 10/11] fftools/ffmpeg_mux_init: switch to avcodec_get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas --- fftools/ffmpeg_mux_init.c | 22 +- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_mux_init.c b/fftools/ffmpeg_mux_init.c index d3d7d022ff6..508c4f7a697 100644 --- a/fftools/ffmpeg_mux_init.c +++ b/fftools/ffmpeg_mux_init.c

[FFmpeg-devel] [PATCH 11/11] fftools/ffmpeg_filter: switch to avcodec_get_supported_config()

2024-04-05 Thread Niklas Haas
From: Niklas Haas I preserved the no-op condition on `!ch_layouts`, even though I suspect it's not actually needed. --- fftools/ffmpeg_filter.c | 59 - 1 file changed, 46 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg_filter.c

Re: [FFmpeg-devel] [PATCH 01/11] avcodec: add avcodec_get_supported_config()

2024-04-05 Thread Niklas Haas
On Fri, 05 Apr 2024 20:57:11 +0200 Niklas Haas wrote: > From: Niklas Haas > In addition to the already covered lists, add two new entries for color > space and color range, mirroring the newly added negotiable fields in > libavfilter. If this passes review, I will submit a second series

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/huffyuvdec: Don't zero unnecessarily

2024-04-05 Thread Andreas Rheinhardt
Andreas Rheinhardt: > A decoder's private data has already been zeroed (apart from options) > before init is called. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/huffyuvdec.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/libavcodec/huffyuvdec.c b/libavcodec/huffyuvdec.c >

Re: [FFmpeg-devel] [PATCH] avcodec/dv: Don't pretend initializing work chunks can fail

2024-04-05 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/dv.c | 4 +--- > libavcodec/dv_internal.h | 2 +- > libavcodec/dvdec.c | 6 +- > libavcodec/dvenc.c | 6 +- > 4 files changed, 4 insertions(+), 14 deletions(-) > > diff --git

Re: [FFmpeg-devel] [PATCH] avcodec/libdav1d: Don't cast const away unnecessarily

2024-04-05 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Possible since c89f6ae6899e0f3ffb4f51da1f1776ab16f5b3a0. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/libdav1d.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c > index

Re: [FFmpeg-devel] [PATCH v1 7/7] lavc/vaapi_dec: Add VVC decoder

2024-04-05 Thread Nuo Mi
> > > > --- a/libavcodec/vaapi_decode.c > > > +++ b/libavcodec/vaapi_decode.c > > > @@ -455,6 +455,9 @@ static const struct { > > > MAP(AV1, AV1_MAIN,AV1Profile0), > > > MAP(AV1, AV1_HIGH,AV1Profile1), > > > #endif > > > +#if VA_CHECK_VERSION(1, 22, 0) >