[FFmpeg-devel] [PATCH v2] libavformat/tls_mbedtls: Changes the return code handling of mbedtls_x509_crt_parse_file

2024-07-24 Thread Mohit Gupta
mbedtls_x509_crt_parse_file returns an error with negative numbers, and positive numbers indicate the number of failed certificates to load from certificate specific issues, such as critical extensions. This would fix ticket #11079. Signed-off-by: Mohit Gupta --- libavformat/tls_mbedtls.c |

Re: [FFmpeg-devel] [PATCH 27/39] lavc/ffv1: change FFV1SliceContext.plane into a RefStruct object

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:42PM +0200, Anton Khirnov wrote: > Frame threading in the FFV1 decoder works in a very unusual way - the > state that needs to be propagated from the previous frame is not decoded > pixels(¹), but each slice's entropy coder state after decoding the slice. > > For that

Re: [FFmpeg-devel] [PATCH 26/39] lavc/ffv1dec: inline copy_fields() into update_thread_context()

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:41PM +0200, Anton Khirnov wrote: > It is now only called from a single place, so there is no point in it > being a separate function. > --- > libavcodec/ffv1dec.c | 38 -- > 1 file changed, 16 insertions(+), 22 deletions(-) ok thx

Re: [FFmpeg-devel] [PATCH 25/39] lavc/ffv1dec: stop using per-slice FFV1Context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:40PM +0200, Anton Khirnov wrote: > All remaining accesses to them are for fields that have the same value > in the main encoder context. > > Drop now-unused FFV1Context.slice_contexts. > --- > libavcodec/ffv1.c | 18 +++- > libavcodec/ffv1.h

Re: [FFmpeg-devel] [PATCH 24/39] lavc/ffv1dec: move slice_damaged to per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:39PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.h| 2 +- > libavcodec/ffv1dec.c | 18 -- > 2 files changed, 9 insertions(+), 11 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Ob

Re: [FFmpeg-devel] [PATCH 23/39] lavc/ffv1dec: move slice_reset_contexts to per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:38PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.h| 16 +--- > libavcodec/ffv1dec.c | 4 ++-- > 2 files changed, 15 insertions(+), 5 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I

Re: [FFmpeg-devel] [PATCH 22/39] lavc/ffv1enc: stop using per-slice FFV1Context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:37PM +0200, Anton Khirnov wrote: > All remaining accesses to them are for fields that have the same value > in the main encoder context. > --- > libavcodec/ffv1enc.c | 57 --- > libavcodec/ffv1enc_template.c | 24 +++---

Re: [FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-24 Thread Rémi Denis-Courmont
Le keskiviikkona 24. heinäkuuta 2024, 16.08.17 EEST Michael Niedermayer a écrit : > The question is not if its "warning-worthy", the question is what action > creates the best FFmpeg. And also an enviroment we are all happy to work in. That is complete nonsense. It is more obvious than patently o

Re: [FFmpeg-devel] [PATCH 21/39] lavc/ffv1: move ac_byte_count to per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:36PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.h| 2 +- > libavcodec/ffv1dec.c | 6 +++--- > libavcodec/ffv1enc.c | 6 +++--- > 3 files changed, 7 insertions(+), 7 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133

Re: [FFmpeg-devel] [PATCH 20/39] lavc/ffv1enc: store per-slice rc_stat(2?) in FFV1SliceContext

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:35PM +0200, Anton Khirnov wrote: > Instead of the per-slice FFV1Context, which will be removed in future > commits. > --- > libavcodec/ffv1.c | 6 ++ > libavcodec/ffv1.h | 3 +++ > libavcodec/ffv1enc.c | 20 ++-- >

Re: [FFmpeg-devel] [PATCH 19/39] lavc/ffv1: move RangeCoder to per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:34PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.c | 9 ++-- > libavcodec/ffv1.h | 5 +-- > libavcodec/ffv1dec.c | 72 > libavcodec/ffv1dec_template.c | 2 +- > libavcodec/ffv1enc.c

Re: [FFmpeg-devel] [PATCH 17/39] lavc/ffv1: always use the main context values of ac

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:32PM +0200, Anton Khirnov wrote: > It cannot change between slices. that is true currently but considering that its used in some of the inner loops i dont think carrying an additional pointer around into these loops makes sense either leave it or move the ac value to

Re: [FFmpeg-devel] [PATCH 16/39] lavc/ffv1: move FFV1Context.slice_{coding_mode, rct_.y_coef} to per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:31PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.h | 6 +++--- > libavcodec/ffv1dec.c | 14 +++--- > libavcodec/ffv1dec_template.c | 10 +- > libavcodec/ffv1enc.c | 26 +- > libavcodec/ffv1

Re: [FFmpeg-devel] [PATCH 15/39] lavc/ffv1: always use the main context values of plane_count/transparency

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:30PM +0200, Anton Khirnov wrote: > They cannot change between slices. > --- > libavcodec/ffv1.c | 2 -- > libavcodec/ffv1dec.c | 5 ++--- > libavcodec/ffv1dec_template.c | 2 +- > libavcodec/ffv1enc.c | 2 +- > libavcodec/ffv1enc_template

Re: [FFmpeg-devel] [PATCH 14/39] lavc/ffv1: drop write-only PlaneContext.interlace_bit_state

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:29PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.c | 3 --- > libavcodec/ffv1.h | 1 - > 2 files changed, 4 deletions(-) ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities

Re: [FFmpeg-devel] [PATCH 11/39] lavc/ffv1enc: move bit writer to per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:26PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.h | 3 ++- > libavcodec/ffv1enc.c | 7 --- > libavcodec/ffv1enc_template.c | 14 +++--- > 3 files changed, 13 insertions(+), 11 deletions(-) LGTM thx [...] -- Michael G

Re: [FFmpeg-devel] [PATCH 08/39] lavc/ffv1: move sample_buffer to the per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:23PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1.c | 35 --- > libavcodec/ffv1.h | 5 +++-- > libavcodec/ffv1dec.c | 27 +-- > libavcodec/ffv1dec_template.c | 9 +---

Re: [FFmpeg-devel] [PATCH 07/39] lavc/ffv1: add a per-slice context

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:22PM +0200, Anton Khirnov wrote: > FFV1 decoder and encoder currently use the same struct - FFV1Context - > both as codec private data and per-slice context. For this purpose > FFV1Context contains an array of pointers to per-slice FFV1Context > instances. > > This pa

Re: [FFmpeg-devel] [PATCH 06/39] lavc/ffv1dec: move copy_fields() under HAVE_THREADS

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:21PM +0200, Anton Khirnov wrote: > It is unused otherwise > --- > libavcodec/ffv1dec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Frequently ignored answer#1 FFmp

Re: [FFmpeg-devel] [PATCH 05/39] lavc/ffv1dec: drop a pointless variable in decode_slice()

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:20PM +0200, Anton Khirnov wrote: > fsdst is by construction always equal to fs, there is even an > av_assert1() checking that. Just use fs directly. > --- > libavcodec/ffv1dec.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) probably ok thx [...] -

Re: [FFmpeg-devel] [PATCH 33/39] lavc: convert frame threading to the receive_frame() pattern

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:48PM +0200, Anton Khirnov wrote: > Reorganize the code such that the frame threading code does not call the > decoders directly, but instead calls back into the generic decoding > code. This avoids duplicating the logic that wraps the decoder > invocation and allows re

Re: [FFmpeg-devel] [PATCH 04/39] lavc/ffv1dec: drop FFV1Context.cur

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:19PM +0200, Anton Khirnov wrote: > It is merely a pointer to FFV1Context.picture.f, which can just as well > be used directly. > --- > libavcodec/ffv1.h| 1 - > libavcodec/ffv1dec.c | 33 + > 2 files changed, 17 insertions(+), 17 d

Re: [FFmpeg-devel] [PATCH 03/39] lavc/ffv1dec: simplify slice index calculation

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:18PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1dec.c | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact

Re: [FFmpeg-devel] [PATCH 02/39] lavc/ffv1dec: declare loop variables in the loop where possible

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:17PM +0200, Anton Khirnov wrote: > --- > libavcodec/ffv1dec.c | 45 ++-- > 1 file changed, 22 insertions(+), 23 deletions(-) LGTM [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind

Re: [FFmpeg-devel] [PATCH 01/39] tests/fate/vcodec: add vsynth tests for FFV1 version 2

2024-07-24 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 07:11:16PM +0200, Anton Khirnov wrote: > --- > tests/fate/vcodec.mak| 3 ++- > tests/ref/vsynth/vsynth1-ffv1-v2 | 4 > tests/ref/vsynth/vsynth2-ffv1-v2 | 4 > tests/ref/vsynth/vsynth3-ffv1-v2 | 4 > tests/ref/vsynth/vsynth_lena-ffv

[FFmpeg-devel] [PATCH] lavfi/framesync: avoid forcing frame writability unnecessarily

2024-07-24 Thread Anton Khirnov
Callers of ff_framesync_get_frame() generally do not expect the result to be writable, those that do (e.g. ff_framesync_dualinput_get_writable()) ensure writability themselves. Significantly reduces memory consumption in complex graphs with framesync-based filters (e.g. scale, ssim). Reported-By:

Re: [FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-24 Thread Michael Niedermayer
On Wed, Jul 24, 2024 at 06:49:04AM +0200, Marvin Scholz (ePirat) wrote: > > > On 24. Jul 2024, at 00:10, Michael Niedermayer > > wrote: > > > > On Tue, Jul 23, 2024 at 12:17:43PM -0300, James Almer wrote: > >>> On 7/19/2024 12:31 PM, Paul B Mahol wrote: > >>> Internal/private filter structures

Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

2024-07-24 Thread Michael Niedermayer
On Wed, Jul 24, 2024 at 07:09:45AM +, patches via ffmpeg-devel wrote: > > > -Original Message- > From: Michael Niedermayer > Sent: Tuesday, July 23, 2024 10:22 PM > To: FFmpeg development discussions and patches > Cc: patches > Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: D

Re: [FFmpeg-devel] [PATCH] checkasm: Increase the tolerance for ac3_sum_square_butterfly_float

2024-07-24 Thread Martin Storsjö
On Tue, 23 Jul 2024, Michael Niedermayer wrote: On Wed, Jul 24, 2024 at 12:01:32AM +0300, Martin Storsjö via ffmpeg-devel wrote: Increase the tolerance from 10 ulp to 11 ulp. This fixes occasional errors for some inputs; the errors could be reproduced on aarch64/neon builds, with "checkasm --te

Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present

2024-07-24 Thread patches via ffmpeg-devel
-Original Message- From: Michael Niedermayer Sent: Tuesday, July 23, 2024 10:22 PM To: FFmpeg development discussions and patches Cc: patches Subject: Re: [FFmpeg-devel] [PATCH] avdevice/dshow: Don't skip audio devices if no video device is present On Tue, Jul 23, 2024 at 08:21:31AM