Re: [FFmpeg-devel] [PATCH] avformat/avio: avio_tell() only errors if the context is NULL

2024-07-16 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-07-11 11:49:37) > Found by code review related to coverity > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavformat/avio.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavformat/avio.h b/libavf

Re: [FFmpeg-devel] [PATCH v2] avcodec/hevc/hevcdec: Do not allow slices to depend on failed slices

2024-07-16 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-07-15 16:48:25) > An alternative would be to leave the context unchanged on failure of > hls_slice_header() > > Fixes: out of array access > Fixes: NULL pointer dereference > Fixes: > 69584/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5931086299

Re: [FFmpeg-devel] [PATCH] avutil/error: Provide better feedback about unknown error codes

2024-07-16 Thread Anton Khirnov
Quoting Marton Balint (2024-07-16 01:01:20) > I don't really like adding extra code for this, and from an API point of > view any negative error code can be valid, so you can't really warn about > them. > > If you want to make sure that every ffmpeg error code has a text, then add > a fate test

Re: [FFmpeg-devel] [PATCH 1/4] avformat/movenc: fix channel count and samplerate fields for IAMF tracks

2024-07-16 Thread Anton Khirnov
Quoting James Almer (2024-07-17 03:49:22) > diff --git a/libavformat/movenc.c b/libavformat/movenc.c > index 2bea55e33d..5de188f4cf 100644 > --- a/libavformat/movenc.c > +++ b/libavformat/movenc.c > @@ -1399,6 +1399,11 @@ static int mov_write_audio_tag(AVFormatContext *s, > AVIOContext *pb, MOVMux

[FFmpeg-devel] avisynth as an internal filter, any objections?

2024-07-16 Thread Roger Pack
Hi all, just wondering, if I were to write a libavfilter that basically "called out" to avisynth and had it process stuff, would there be any ideological pushback, or would it possibly be accepted? Cheers! ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg

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

2024-07-16 Thread Roger Pack
LGTM On Mon, Jul 15, 2024 at 12:51 AM patches via ffmpeg-devel wrote: > > The search of the current DirectShow device list has been customized so > that audio devices are always found even if no video device is connected. > > Signed-off-by: Jens Frederich > --- > libavdevice/dshow.c | 2 +- > 1

Re: [FFmpeg-devel] [OSS-Fuzz] Have you considered enabling memory sanitizer?

2024-07-16 Thread Kacper Michajlow
On Tue, 16 Jul 2024 at 14:14, Michael Niedermayer wrote: > > On Mon, Jul 15, 2024 at 01:32:20PM +0200, Kacper Michajlow wrote: > > On Sun, 14 Jul 2024 at 21:55, Michael Niedermayer > > wrote: > > > > > > On Sat, Jul 13, 2024 at 11:12:40PM +0200, Kacper Michajlow wrote: > > > > On Thu, 27 Jun 2024

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 8:24 PM, Rémi Denis-Courmont wrote: > > Le tiistaina 16. heinäkuuta 2024, 18.48.06 EEST Cosmin Stejerean via ffmpeg- > devel a écrit : >> To add another data point, the platform decoders might also be more secure >> due to sandboxing. I believe as of Android Q the software

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

2024-07-16 Thread Mohit Gupta
Sounds good. Sorry first time contributing, should I make another patch with the change and send that through again with git send-email? Thanks Mohit On Tue, Jul 16, 2024 at 2:26 AM Marth64 wrote: > > Could do. What level were you thinking? WARN? > > How about, > ``` > av_log(h, AV_LOG_WARNING,

Re: [FFmpeg-devel] [OSS-Fuzz] Have you considered enabling memory sanitizer?

2024-07-16 Thread Vittorio Giovara
On Tue, Jul 16, 2024 at 2:25 PM Michael Niedermayer wrote: > On Mon, Jul 15, 2024 at 02:36:15PM +0200, Vittorio Giovara wrote: > > On Sun, Jul 14, 2024 at 9:55 PM Michael Niedermayer < > mich...@niedermayer.cc> > > wrote: > > > > > On Sat, Jul 13, 2024 at 11:12:40PM +0200, Kacper Michajlow wrote:

Re: [FFmpeg-devel] FFmpeg at IBC

2024-07-16 Thread Vittorio Giovara
On Tue, Jul 16, 2024 at 7:06 PM Michael Niedermayer wrote: > On Tue, Jul 16, 2024 at 05:24:18PM +0200, Vittorio Giovara wrote: > > On Sun, Jul 14, 2024 at 9:45 AM Thilo Borgmann via ffmpeg-devel < > > ffmpeg-devel@ffmpeg.org> wrote: > > > > > Hi, > > > > > > FFmpeg will have a booth at the next I

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

2024-07-16 Thread Anton Khirnov
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 +++ 2 files changed, 37 insertions(+), 44 deletions(-) diff --git a/libav

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.h| 16 +--- libavcodec/ffv1dec.c | 4 ++-- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index ae81940073..cef61f38ec 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -86,8 +86,19 @@ typedef struc

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Rémi Denis-Courmont
Le tiistaina 16. heinäkuuta 2024, 18.48.06 EEST Cosmin Stejerean via ffmpeg- devel a écrit : > To add another data point, the platform decoders might also be more secure > due to sandboxing. I believe as of Android Q the software decoders provided > by MediaCodec have been moved to run within a con

Re: [FFmpeg-devel] FFmpeg at IBC

2024-07-16 Thread Rémi Denis-Courmont
Le tiistaina 16. heinäkuuta 2024, 19.57.07 EEST Michael Niedermayer a écrit : > > Quoting Micheal here, but "where did you discuss the creation of this > > Booth with the FFmpeg community?" > > Given that its not September the 13th yet, and this thread is a discussion, > iam not sure the quote is

[FFmpeg-devel] [PATCH 12/39] lavc/ffv1: drop redundant FFV1Context.quant_table

2024-07-16 Thread Anton Khirnov
In all cases except decoding version 1 it's either not used, or contains a copy of a table from quant_tables, which we can just as well use directly. When decoding version 1, we can just as well decode into quant_tables[0], which would otherwise be unused. --- libavcodec/ffv1.h| 1 - libavco

[FFmpeg-devel] [PATCH 29/39] lavc/thread: move generic-layer API to avcodec_internal.h

2024-07-16 Thread Anton Khirnov
thread.h currently contains both API for decoder use and functions internal to lavc generic layer. Move the latter to avcodec_internal.h, which is a more appropriate place for them. --- libavcodec/avcodec_internal.h | 24 libavcodec/pthread.c | 1 + libavcodec/th

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.h| 2 +- libavcodec/ffv1dec.c | 18 -- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index cef61f38ec..c4803654f2 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -91,6 +91,7 @@ typedef struct

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

2024-07-16 Thread Anton Khirnov
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(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 8bb9b83daa..be4a1

[FFmpeg-devel] [PATCH 10/39] lavc/ffv1dec: move the bitreader to stack

2024-07-16 Thread Anton Khirnov
There is no reason to place it in persistent state. --- libavcodec/ffv1.h | 1 - libavcodec/ffv1dec.c | 28 +++- libavcodec/ffv1dec_template.c | 23 --- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/libavcodec/ffv

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

2024-07-16 Thread Anton Khirnov
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 | 1 - libavcodec/ffv1dec.c | 54 ++-

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

2024-07-16 Thread Anton Khirnov
--- 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-ffv1-v2 | 4 5 files changed, 18 insertions(+), 1 deletion(-) create mod

[FFmpeg-devel] [PATCH 28/39] lavc/ffv1dec: fix races in accessing FFV1SliceContext.slice_damaged

2024-07-16 Thread Anton Khirnov
That variable is shared between frame threads in the same defective way described in the previous commit. Fix it by adding a RefStruct-managed arrays of flags that is propagated across frame threads in the standard manner. Remove now-unused FFV1Context.fsrc --- libavcodec/ffv1.c| 2 ++ libav

[FFmpeg-devel] [PATCH 18/39] lavc/ffv1: move FFV1Context.plane to per-slice context

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.c | 17 +++-- libavcodec/ffv1.h | 7 --- libavcodec/ffv1dec.c | 16 libavcodec/ffv1dec_template.c | 2 +- libavcodec/ffv1enc.c | 29 - libavcodec/ffv1enc_template.c | 2 +-

[FFmpeg-devel] [PATCH 09/39] lavc/ffv1: move run_index to the per-slice context

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.h | 3 ++- libavcodec/ffv1dec.c | 6 +++--- libavcodec/ffv1dec_template.c | 16 libavcodec/ffv1enc.c | 6 +++--- libavcodec/ffv1enc_template.c | 16 5 files changed, 24 insertions(+), 23 deletions(-) diff --git

[FFmpeg-devel] [PATCH 32/39] lavc/decode: reindent

2024-07-16 Thread Anton Khirnov
--- libavcodec/decode.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index b17cfba26f..42cee77ec5 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -614,21 +614,21 @@ static int decode_recei

[FFmpeg-devel] [PATCH 37/39] lavc/hevcdec: use a ContainerFifo to hold frames scheduled for output

2024-07-16 Thread Anton Khirnov
Instead of a single AVFrame. Will be useful in future commits, where we will want to produce multiple output frames for a single coded frame. --- libavcodec/Makefile | 2 +- libavcodec/hevc/hevcdec.c | 30 -- libavcodec/hevc/hevcdec.h | 5 +++-- libavcodec/hevc

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.c | 9 ++-- libavcodec/ffv1.h | 5 +-- libavcodec/ffv1dec.c | 72 libavcodec/ffv1dec_template.c | 2 +- libavcodec/ffv1enc.c | 78 ++- libavcodec/ffv1enc_template.c |

[FFmpeg-devel] [PATCH 30/39] lavc/internal: document the precise meaning of AVCodecInternal.draining

2024-07-16 Thread Anton Khirnov
Also, set draining=1 in case a bitstream filter returns an internally-triggered EOF. While no bitstream filters currently inserted by decoders will do that, that may change in the future and it is better to cover this case. --- libavcodec/decode.c | 12 +--- libavcodec/internal.h | 6 ++

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.h | 3 ++- libavcodec/ffv1enc.c | 7 --- libavcodec/ffv1enc_template.c | 14 +++--- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index c88aa8c30d..dce6e177eb 100644 --- a/libavcodec/ffv

[FFmpeg-devel] [PATCH 38/39] lavc/hevcdec: simplify output logic

2024-07-16 Thread Anton Khirnov
Current code is written around the "simple" decode API's limitation that a single input packet (AU/coded frame) triggers the output of at most one output frame. However the spec contains two cases where a coded frame may cause multiple frames to be output (cf. C.5.2.2.2): * start of a new sequence

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

2024-07-16 Thread Anton Khirnov
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 receive_frame()-based decoders to use frame threading. Further work by T

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

2024-07-16 Thread Anton Khirnov
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 purpose, the decoder's update_thread_context() callback stores a pointer

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

2024-07-16 Thread Anton Khirnov
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 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index acec2

[FFmpeg-devel] [PATCH 34/39] lavc/decode: reindent after previous commit

2024-07-16 Thread Anton Khirnov
--- libavcodec/decode.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index dd94280f0b..deaecf0c01 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -430,20 +430,20 @@ static inline int decode_simple_int

[FFmpeg-devel] [PATCH 39/39] lavc/hevcdec: call ff_thread_finish_setup() even if hwaccel is in use

2024-07-16 Thread Anton Khirnov
Serializing frame threading for non-threadsafe hwaccels is handled at the generic level, the decoder does not need to care about it. --- libavcodec/hevc/hevcdec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 28

[FFmpeg-devel] [PATCH 36/39] lavc: add private container FIFO API

2024-07-16 Thread Anton Khirnov
It provides a FIFO for "container" objects like AVFrame/AVPacket and features an integrated FFRefStructPool-based pool to avoid allocating an freeing them repeatedly. --- libavcodec/container_fifo.c | 195 libavcodec/container_fifo.h | 87 2 f

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

2024-07-16 Thread Anton Khirnov
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 pattern is highly confusing, as it is not clear which fields are per-slice an

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.h| 2 +- libavcodec/ffv1dec.c | 6 +++--- libavcodec/ffv1enc.c | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/ffv1.h b/libavcodec/ffv1.h index bee7b75614..ae81940073 100644 --- a/libavcodec/ffv1.h +++ b/libavcodec/ffv1.h @@ -85,6 +85,7

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

2024-07-16 Thread Anton Khirnov
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 ++-- libavcodec/ffv1enc_template.c | 4 ++-- 4 files changed, 17 insertions(+),

[FFmpeg-devel] [PATCH 35/39] lavc/hevcdec: switch to receive_frame()

2024-07-16 Thread Anton Khirnov
Required by following commits, where we will want to output multiple frames per packet. --- libavcodec/hevc/hevcdec.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index 0e4b26dad3..fc87169a

[FFmpeg-devel] [PATCH 31/39] lavc/decode: wrap AV_FRAME_FLAG_DISCARD handling in a loop

2024-07-16 Thread Anton Khirnov
Makes sure discarded frames do not cause EAGAIN to be returned during flushing, which is forbidden. --- libavcodec/decode.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 6ad74bd94b..b17cfba26f 100644 --- a/libavcodec

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

2024-07-16 Thread Anton Khirnov
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.c | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/lib

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

2024-07-16 Thread Anton Khirnov
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(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 60d04f04b9..dbb7e082a3 100644 --- a

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

2024-07-16 Thread Anton Khirnov
It cannot change between slices. --- libavcodec/ffv1.c | 6 +++--- libavcodec/ffv1dec.c | 14 ++ libavcodec/ffv1dec_template.c | 6 +++--- libavcodec/ffv1enc.c | 6 +++--- libavcodec/ffv1enc_template.c | 4 ++-- 5 files changed, 17 insertions(+), 19 de

[FFmpeg-devel] [PATCH 13/39] lavc/ffv1: drop redundant PlaneContext.quant_table

2024-07-16 Thread Anton Khirnov
It is a copy of FFV1Context.quant_tables[quant_table_index]. --- libavcodec/ffv1.h | 1 - libavcodec/ffv1_template.c| 22 +++--- libavcodec/ffv1dec.c | 28 libavcodec/ffv1dec_template.c | 14 +- libavcodec/ffv1enc.c

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.h | 6 +++--- libavcodec/ffv1dec.c | 14 +++--- libavcodec/ffv1dec_template.c | 10 +- libavcodec/ffv1enc.c | 26 +- libavcodec/ffv1enc_template.c | 10 +- 5 files changed, 33 insertions(+), 33 delet

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.c | 3 --- libavcodec/ffv1.h | 1 - 2 files changed, 4 deletions(-) diff --git a/libavcodec/ffv1.c b/libavcodec/ffv1.c index a102425596..6a0aca6429 100644 --- a/libavcodec/ffv1.c +++ b/libavcodec/ffv1.c @@ -169,9 +169,6 @@ void ff_ffv1_clear_slice_state(const FFV1Context *f,

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1dec.c | 45 ++-- 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 7a0d1909aa..5c515e97b6 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -46,7 +46,7 @@ static

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1.c | 35 --- libavcodec/ffv1.h | 5 +++-- libavcodec/ffv1dec.c | 27 +-- libavcodec/ffv1dec_template.c | 9 + libavcodec/ffv1enc.c | 30 -- lib

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

2024-07-16 Thread Anton Khirnov
It is unused otherwise --- libavcodec/ffv1dec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index dbb7e082a3..6d59355c23 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -1027,6 +1027,7 @@ static int decode_frame(AV

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

2024-07-16 Thread Anton Khirnov
--- libavcodec/ffv1dec.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c index 5c515e97b6..7066146477 100644 --- a/libavcodec/ffv1dec.c +++ b/libavcodec/ffv1dec.c @@ -259,10 +259,7 @@ static int decode_slice(AVCodecContext *c, voi

Re: [FFmpeg-devel] FFmpeg at IBC

2024-07-16 Thread Michael Niedermayer
On Tue, Jul 16, 2024 at 05:24:18PM +0200, Vittorio Giovara wrote: > On Sun, Jul 14, 2024 at 9:45 AM Thilo Borgmann via ffmpeg-devel < > ffmpeg-devel@ffmpeg.org> wrote: > > > Hi, > > > > FFmpeg will have a booth at the next IBC from September 13th to 16th > > 2024 in Amsterdam [1]! > > > > We recei

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 6:04 PM, Zhao Zhili wrote: > > > >> On Jul 16, 2024, at 23:48, Cosmin Stejerean via ffmpeg-devel >> wrote: >> >> >> >>> On Jul 16, 2024, at 4:58 PM, Zhao Zhili wrote: >>> >>> >>> On Jul 16, 2024, at 21:20, Matthieu Bouron wrote: On Wed, Ju

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vvc: Remove NOP condition check in alf_filter_luma

2024-07-16 Thread Zhao Zhili
> On Jul 17, 2024, at 00:07, Zhao Zhili wrote: > > > >> On Jul 16, 2024, at 20:31, Nuo Mi wrote: >> >> On Tue, Jul 16, 2024 at 10:50 AM Zhao Zhili > > wrote: >> >>> From: Zhao Zhili mailto:zhiliz...@tencent.com>> >>> >>> If (y + i == vb_above) or (y + i == v

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vvc: Remove NOP condition check in alf_filter_luma

2024-07-16 Thread Zhao Zhili
> On Jul 16, 2024, at 20:31, Nuo Mi wrote: > > On Tue, Jul 16, 2024 at 10:50 AM Zhao Zhili > wrote: > >> From: Zhao Zhili mailto:zhiliz...@tencent.com>> >> >> If (y + i == vb_above) or (y + i == vb_below), the if body has no >> operation. >> > 👍, How did you f

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Zhao Zhili
> On Jul 16, 2024, at 23:48, Cosmin Stejerean via ffmpeg-devel > wrote: > > > >> On Jul 16, 2024, at 4:58 PM, Zhao Zhili wrote: >> >> >> >>> On Jul 16, 2024, at 21:20, Matthieu Bouron >>> wrote: >>> >>> On Wed, Jul 10, 2024 at 6:31 PM Matthieu Bouron >>> wrote: On Wed, Jul

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 4:58 PM, Zhao Zhili wrote: > > > >> On Jul 16, 2024, at 21:20, Matthieu Bouron wrote: >> >> On Wed, Jul 10, 2024 at 6:31 PM Matthieu Bouron >> wrote: >>> >>> On Wed, Jul 10, 2024 at 4:04 PM Zhao Zhili wrote: > On Jun 12, 2024, at 21:42, Matthieu Bour

Re: [FFmpeg-devel] FFmpeg at IBC

2024-07-16 Thread Vittorio Giovara
On Sun, Jul 14, 2024 at 9:45 AM Thilo Borgmann via ffmpeg-devel < ffmpeg-devel@ffmpeg.org> wrote: > Hi, > > FFmpeg will have a booth at the next IBC from September 13th to 16th > 2024 in Amsterdam [1]! > > We received a corporate sponsorship for the booth, so there are no costs > for the FFmpeg pr

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: Fix variable type of AV_OPT_TYPE_BOOL

2024-07-16 Thread Zhao Zhili
> On Jul 16, 2024, at 23:10, James Almer wrote: > > On 7/16/2024 11:53 AM, Rémi Denis-Courmont wrote: >> Le tiistaina 16. heinäkuuta 2024, 17.46.53 EEST Zhao Zhili a écrit : >>> From: Zhao Zhili >>> >>> --- >>> libavcodec/videotoolboxenc.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deleti

[FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: initialize optical flow queues if available

2024-07-16 Thread Lynne via ffmpeg-devel
Lets us implement FPS conversion. --- libavutil/hwcontext_vulkan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 5baf68660a..19338cc069 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1177,6 +1

[FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: rewrite queue picking system for the new API

2024-07-16 Thread Lynne via ffmpeg-devel
This allows us to support different video ops on different queues, as well as any other arbitrary queues we need. --- libavutil/hwcontext_vulkan.c | 262 ++- 1 file changed, 167 insertions(+), 95 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hw

Re: [FFmpeg-devel] FFmpeg at IBC

2024-07-16 Thread Rémi Denis-Courmont
Le sunnuntaina 14. heinäkuuta 2024, 10.45.43 EEST Thilo Borgmann via ffmpeg- devel a écrit : > Share with us your broken workflows, unfulfilled requirements, ideas for > enhancements and after show drinks at W8.A23g! I think that we need to keep in mind who typically attends IBC. 1) The majority

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: Fix variable type of AV_OPT_TYPE_BOOL

2024-07-16 Thread Rémi Denis-Courmont
Le tiistaina 16. heinäkuuta 2024, 18.10.28 EEST James Almer a écrit : > No, because -1 is allowed for AV_OPT_TYPE_BOOL, which is used as > "undefined" in plenty of options. > And we don't use bool type anywhere as it's not really portable, or at > least didn't use to. Dunno the current state ever s

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: Fix variable type of AV_OPT_TYPE_BOOL

2024-07-16 Thread James Almer
On 7/16/2024 11:53 AM, Rémi Denis-Courmont wrote: Le tiistaina 16. heinäkuuta 2024, 17.46.53 EEST Zhao Zhili a écrit : From: Zhao Zhili --- libavcodec/videotoolboxenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolbox

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Zhao Zhili
> On Jul 16, 2024, at 21:20, Matthieu Bouron wrote: > > On Wed, Jul 10, 2024 at 6:31 PM Matthieu Bouron > wrote: >> >> On Wed, Jul 10, 2024 at 4:04 PM Zhao Zhili wrote: >>> >>> On Jun 12, 2024, at 21:42, Matthieu Bouron wrote: Hello, This patchset adds Med

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: Fix variable type of AV_OPT_TYPE_BOOL

2024-07-16 Thread Rémi Denis-Courmont
Le tiistaina 16. heinäkuuta 2024, 17.46.53 EEST Zhao Zhili a écrit : > From: Zhao Zhili > > --- > libavcodec/videotoolboxenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c > index 747681fd05..78ef474d7a 1006

[FFmpeg-devel] [PATCH 3/3] avcodec/videotoolboxenc: Fix variable type of AV_OPT_TYPE_BOOL

2024-07-16 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/videotoolboxenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 747681fd05..78ef474d7a 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -262,7 +2

Re: [FFmpeg-devel] [PATCH] lavc/vvc_mc: R-V V avg w_avg

2024-07-16 Thread Rémi Denis-Courmont
Le keskiviikkona 10. heinäkuuta 2024, 13.02.44 EEST u...@foxmail.com a écrit : > From: sunyuechi > > C908 X60 > avg_8_2x2_c:1.21.2 > avg_8_2x2_rvv_i32 :0.7

Re: [FFmpeg-devel] [PATCH] avformat/mov: sanity check count in IPRP

2024-07-16 Thread James Almer
On 7/16/2024 10:19 AM, Michael Niedermayer wrote: Fixes: Timeout Fixes: 69230/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6540512101203968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- l

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/j2kenc: Merge dwt_norm into lambda

2024-07-16 Thread Michael Niedermayer
On Thu, Jun 20, 2024 at 09:35:01PM +0200, Michael Niedermayer wrote: > This moves computations out of a loop > > Fixes: signed integer overflow: 31665934879948800 * 9998 cannot be > represented in type 'long' > Fixes: > 69024/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-5949

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/j2kenc: Merge dwt_norm into lambda

2024-07-16 Thread Michael Niedermayer
On Fri, Jun 21, 2024 at 11:09:45PM +0200, Michael Niedermayer wrote: > On Fri, Jun 21, 2024 at 11:38:46AM +0200, Andreas Rheinhardt wrote: > > Michael Niedermayer: > > > This moves computations out of a loop > > > > > > Fixes: signed integer overflow: 31665934879948800 * 9998 cannot be > > > repr

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-16 Thread Matthieu Bouron
On Wed, Jul 10, 2024 at 6:31 PM Matthieu Bouron wrote: > > On Wed, Jul 10, 2024 at 4:04 PM Zhao Zhili wrote: > > > > > > > On Jun 12, 2024, at 21:42, Matthieu Bouron > > > wrote: > > > > > > Hello, > > > > > > This patchset adds Mediacodec audio decoders support. Currently, only > > > AAC, AMR

[FFmpeg-devel] [PATCH] avformat/mov: sanity check count in IPRP

2024-07-16 Thread Michael Niedermayer
Fixes: Timeout Fixes: 69230/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6540512101203968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 5 + 1 file changed, 5 inserti

Re: [FFmpeg-devel] [OSS-Fuzz] Have you considered enabling memory sanitizer?

2024-07-16 Thread Andrew Sayers
On Tue, Jul 16, 2024 at 02:25:04PM +0200, Michael Niedermayer wrote: > On Mon, Jul 15, 2024 at 02:36:15PM +0200, Vittorio Giovara wrote: > > Disagree - this is not the right way to attract new contributors. > > no ? > did you do a study ? > > try this: > A. "please we need more maintainers" (we t

Re: [FFmpeg-devel] [PATCH 3/6] tools/target_dec_fuzzer: Adjust threshold for RV30

2024-07-16 Thread Michael Niedermayer
On Mon, Apr 01, 2024 at 10:56:04PM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 67530/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RV30_fuzzer-6635676118351872 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed

[FFmpeg-devel] [PATCH 2/2] avcodec/videotoolboxenc: Set default bitrate to zero

2024-07-16 Thread Zhao Zhili
From: Zhao Zhili Zero is auto mode. From the doc of videotoolbox: The default bit rate is zero, which indicates that the video encoder should determine the size of compressed data. Before the patch, the default bitrate is 20 setting by avcodec/options_table, which doesn't work for mos

[FFmpeg-devel] [PATCH 1/2] avcodec/videotoolboxenc: Fix bitrate doesn't work as expected

2024-07-16 Thread Zhao Zhili
From: Zhao Zhili Commit 4ef5e7d4722 add qmin/qmax support to videotoolbox encoder. The default value of (qmin, qmax) is (2, 31), which makes bitrate control doesn't work as users' expectations. --- libavcodec/videotoolboxenc.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libavcod

Re: [FFmpeg-devel] [PATCH] avcodec/vvc: Add aarch64 neon optimization for ALF

2024-07-16 Thread Nuo Mi
Hi Zhili, Good job. Appreciate it. With this patch, we're very close to smooth 4K@30 playback on my M2. On Tue, Jul 16, 2024 at 12:19 AM Zhao Zhili wrote: > From: Zhao Zhili > > vvc_alf_filter_chroma_4x4_8_c: 3.0 > vvc_alf_filter_chroma_4x4_8_neon: 1.0 > vvc_alf_filter_chroma_4x4_10_c: 2.7 > vv

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/vvc: Remove NOP condition check in alf_filter_luma

2024-07-16 Thread Nuo Mi
On Tue, Jul 16, 2024 at 10:50 AM Zhao Zhili wrote: > From: Zhao Zhili > > If (y + i == vb_above) or (y + i == vb_below), the if body has no > operation. > 👍, How did you find this? From a compiler warning or by reading the code? > --- > libavcodec/vvc/filter_template.c | 4 ++-- > 1 file chan

Re: [FFmpeg-devel] [OSS-Fuzz] Have you considered enabling memory sanitizer?

2024-07-16 Thread Michael Niedermayer
On Mon, Jul 15, 2024 at 02:36:15PM +0200, Vittorio Giovara wrote: > On Sun, Jul 14, 2024 at 9:55 PM Michael Niedermayer > wrote: > > > On Sat, Jul 13, 2024 at 11:12:40PM +0200, Kacper Michajlow wrote: > > > On Thu, 27 Jun 2024 at 02:50, Kacper Michajlow > > wrote: > > > > > > > > On Thu, 27 Jun

Re: [FFmpeg-devel] [OSS-Fuzz] Have you considered enabling memory sanitizer?

2024-07-16 Thread Michael Niedermayer
On Mon, Jul 15, 2024 at 01:32:20PM +0200, Kacper Michajlow wrote: > On Sun, 14 Jul 2024 at 21:55, Michael Niedermayer > wrote: > > > > On Sat, Jul 13, 2024 at 11:12:40PM +0200, Kacper Michajlow wrote: > > > On Thu, 27 Jun 2024 at 02:50, Kacper Michajlow wrote: > > > > > > > > On Thu, 27 Jun 2024

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Fix build with older SDKs

2024-07-16 Thread Zhao Zhili
> On Jul 9, 2024, at 22:46, Marvin Scholz wrote: > > I've accidentally used API not available on the checked version. > Additionally check for the SDK to be new enough to even have the > CVImageBufferCreateColorSpaceFromAttachments API to not fail > the build. > --- > libavutil/hwcontext_video

Re: [FFmpeg-devel] [PATCH 4/5] avformat/dump: implement dv_md_compression

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 1:23 PM, Niklas Haas wrote: > > From: Niklas Haas > > --- > libavformat/dump.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/libavformat/dump.c b/libavformat/dump.c > index 78b2481d90..5e1f367742 100644 > --- a/libavformat/dump.c > +++ b/

Re: [FFmpeg-devel] [PATCH 3/5] avformat/mpegts: implement dv_md_compression

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 1:23 PM, Niklas Haas wrote: > > From: Niklas Haas > > --- > libavformat/mpegts.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > > diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c > index c66a1ea6ed..6b02187eb1 100644 > --- a/libavformat/mpegts.

Re: [FFmpeg-devel] [PATCH 2/5] avformat/dovi_isom: implement dv_md_compression

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 1:23 PM, Niklas Haas wrote: > > From: Niklas Haas > > --- > libavformat/dovi_isom.c | 19 +-- > 1 file changed, 13 insertions(+), 6 deletions(-) > > diff --git a/libavformat/dovi_isom.c b/libavformat/dovi_isom.c > index d49aa5a75f..269374cff9 100644 > ---

Re: [FFmpeg-devel] [PATCH 5/5] fftools/ffprobe: implement dv_md_compression

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 1:23 PM, Niklas Haas wrote: > > From: Niklas Haas > > --- > fftools/ffprobe.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c > index 0b7d4ce0d7..265718467f 100644 > --- a/fftools/ffprobe.c > +++ b/fftools/ffprobe.c > @@ -26

Re: [FFmpeg-devel] [PATCH 1/5] avutil/dovi_meta: add dv_md_compression to cfg record

2024-07-16 Thread Cosmin Stejerean via ffmpeg-devel
> On Jul 16, 2024, at 1:23 PM, Niklas Haas wrote: > > From: Niklas Haas > > This field is used to signal the compression method in use. > --- > doc/APIchanges| 3 +++ > libavutil/dovi_meta.h | 9 + > libavutil/version.h | 2 +- > 3 files changed, 13 insertions(+), 1 deletion(-)

[FFmpeg-devel] [PATCH 1/5] avutil/dovi_meta: add dv_md_compression to cfg record

2024-07-16 Thread Niklas Haas
From: Niklas Haas This field is used to signal the compression method in use. --- doc/APIchanges| 3 +++ libavutil/dovi_meta.h | 9 + libavutil/version.h | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 5751216b24..80a

[FFmpeg-devel] [PATCH 2/5] avformat/dovi_isom: implement dv_md_compression

2024-07-16 Thread Niklas Haas
From: Niklas Haas --- libavformat/dovi_isom.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/libavformat/dovi_isom.c b/libavformat/dovi_isom.c index d49aa5a75f..269374cff9 100644 --- a/libavformat/dovi_isom.c +++ b/libavformat/dovi_isom.c @@ -57,11 +57,1

[FFmpeg-devel] [PATCH 3/5] avformat/mpegts: implement dv_md_compression

2024-07-16 Thread Niklas Haas
From: Niklas Haas --- libavformat/mpegts.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c index c66a1ea6ed..6b02187eb1 100644 --- a/libavformat/mpegts.c +++ b/libavformat/mpegts.c @@ -2213,10 +2213,12 @@ int ff_parse_mpeg2_

[FFmpeg-devel] [PATCH 4/5] avformat/dump: implement dv_md_compression

2024-07-16 Thread Niklas Haas
From: Niklas Haas --- libavformat/dump.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/dump.c b/libavformat/dump.c index 78b2481d90..5e1f367742 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -416,13 +416,15 @@ static void dump_dovi_conf(void *

[FFmpeg-devel] [PATCH 5/5] fftools/ffprobe: implement dv_md_compression

2024-07-16 Thread Niklas Haas
From: Niklas Haas --- fftools/ffprobe.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 0b7d4ce0d7..265718467f 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2611,6 +2611,7 @@ static void print_pkt_side_data(WriterContext *w,

[FFmpeg-devel] [RFC PATCH v2] avutil/error: Provide better feedback about unknown error codes

2024-07-16 Thread Andrew Sayers
AVERROR messages should always be less than zero, and are usually based on three or four ASCII characters. For error codes that aren't explicitly handled by error.c (e.g. FFERROR_REDO), print the ASCII code so the user has a little more information. If a non-negative number somehow gets passed to

[FFmpeg-devel] [RFC PATCH v2 0/1] avutil/error: Provide better feedback about unknown error codes

2024-07-16 Thread Andrew Sayers
I'm having trouble managing this conversation. On one hand, you've brought up several important details that would need to be included in a new patch. On the other hand, I'm pretty sure we're talking past each other on the big problems, and need to start over. So let's fork the discussion. # Fir

Re: [FFmpeg-devel] [PATCH v3] avformat/hls: Fixed incorrect behaviour of default

2024-07-16 Thread Steven Liu
Steven Liu 于2024年7月15日周一 21:47写道: > > CoderVenkat 于2024年7月15日周一 00:07写道: > > > > Apologies > > Correct file attached in this > > mail.___ > I need more time look at the deep for and if logic. Hi CoderVenkat, +/* Check only one default audio stream