[FFmpeg-devel] [PATCH] avcodec/mfenc: set frame size for audio encoders.

2022-06-16 Thread Gyan Doshi
Default avctx->frame_size is 0 which leads to init failure for audio MediaFoundation encoders. --- libavcodec/mfenc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/mfenc.c b/libavcodec/mfenc.c index 13ed7b3e11..ff9ffe4827 100644 --- a/libavcodec/mfenc.c +++ b/libavcodec/mfenc.c

Re: [FFmpeg-devel] [PATCH v2] lavc/vaapi_hevc: fill rext luma/chroma offset in the right way

2022-06-16 Thread Xiang, Haihao
On Fri, 2022-06-10 at 20:47 +0800, Fei Wang wrote: > From: Xu Guangxin > > For range extension, the luma/chroma offset is larger than 8 bits, we > need fill the 16 bits version. > > Signed-off-by: Xu Guangxin > Signed-off-by: Linjie Fu > Signed-off-by: Fei Wang > --- > update: > 1. Add some w

Re: [FFmpeg-devel] [PATCH 1/2] avformat/demux: Make read_frame_internal() return AVERREOR(EAGAIN) on stuck empty input parser

2022-06-16 Thread Michael Niedermayer
On Tue, Feb 08, 2022 at 09:23:52PM +0100, Michael Niedermayer wrote: > Fixes: read_frame_internal() which does not return even though both demuxer > and parser do return > Fixes: > 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 > > Found-by: continuous fuzzing pro

Re: [FFmpeg-devel] [PATCH 1/2] avformat/aaxdec: Check for overlaping segments

2022-06-16 Thread Michael Niedermayer
On Wed, Mar 23, 2022 at 10:30:32AM +0100, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 45875/clusterfuzz-testcase-minimized-ffmpeg_dem_AAX_fuzzer-6121689903136768 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by:

Re: [FFmpeg-devel] [PATCH 1/2] avformat/aiffdec: avoid integer overflow in get_meta()

2022-06-16 Thread Michael Niedermayer
On Wed, Mar 23, 2022 at 03:05:02PM +0100, Michael Niedermayer wrote: > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type > 'int' > Fixes: > 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 > > Found-by: continuous fuzzing process > https://

Re: [FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes

2022-06-16 Thread Michael Niedermayer
On Thu, Jun 16, 2022 at 11:04:01PM +0200, Tomas Härdin wrote: > tor 2022-06-16 klockan 20:27 +0200 skrev Michael Niedermayer: > > > > >   > > >  void avpriv_slicethread_free(AVSliceThread **pctx) > > > @@ -236,8 +244,8 @@ void avpriv_slicethread_free(AVSliceThread > > > **pctx) > > >  #else /* HAV

Re: [FFmpeg-devel] [PATCH] avcodec/pcm_rechunk_bsf: unref packet before putting a new one in

2022-06-16 Thread Michael Niedermayer
On Mon, Apr 11, 2022 at 07:56:07PM +0200, Andreas Rheinhardt wrote: > James Almer: > > > > > > On 4/10/2022 11:14 AM, Michael Niedermayer wrote: > >> On Sat, Apr 09, 2022 at 08:56:05PM +0200, Marton Balint wrote: > >>> > >>> > >>> On Wed, 30 Mar 2022, Michael Niedermayer wrote: > >>> > On Tu

[FFmpeg-devel] [PATCH] avformat/hls: Limit start_seq_no to one bit less

2022-06-16 Thread Michael Niedermayer
This avoids overflow checks on additions with 32bit numbers Fixes: signed integer overflow: 9223372036854775806 + 2 cannot be represented in type 'long' Fixes: 44012/clusterfuzz-testcase-minimized-ffmpeg_dem_HLS_fuzzer-474777073544 Found-by: continuous fuzzing process https://github.com/go

Re: [FFmpeg-devel] The case for a good string API

2022-06-16 Thread Stefano Sabatini
Hi Nicolas! On date Thursday 2022-06-16 17:47:40 +0200, Nicolas George wrote: > Stefano Sabatini (12022-06-15): > > Hi, and sorry for the long delay (I'll comment soon about the AVWriter > > API). > > Thanks. I was starting to despair that somebody else gives a damn about > it. > > > Before jump

Re: [FFmpeg-devel] [PATCH 21/35] fftools: add an object pool

2022-06-16 Thread Andreas Rheinhardt
Anton Khirnov: > Allows to avoid constantly allocating and freeing objects like AVFrame > or AVPacket. > --- > fftools/objpool.c | 131 ++ > fftools/objpool.h | 37 + > 2 files changed, 168 insertions(+) > create mode 100644 fftools/objpool

Re: [FFmpeg-devel] [PATCH 22/35] fftools/ffmpeg: rework -shortest implementation

2022-06-16 Thread Andreas Rheinhardt
Anton Khirnov: > +struct SyncQueue { > +enum SyncQueueType type; > + > +/* no more frames will be sent for any stream */ > +int finished; > +/* sync head: the stream with the _smallest_ head timestamp > + * this stream determines which frames can be output */ > +int head_str

Re: [FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes

2022-06-16 Thread Tomas Härdin
tor 2022-06-16 klockan 20:27 +0200 skrev Michael Niedermayer: > > >   > >  void avpriv_slicethread_free(AVSliceThread **pctx) > > @@ -236,8 +244,8 @@ void avpriv_slicethread_free(AVSliceThread > > **pctx) > >  #else /* HAVE_PTHREADS || HAVE_W32THREADS || HAVE_OS32THREADS */ > >   > >  int avpriv_s

Re: [FFmpeg-devel] [PATCH 24/35] fftools/ffmpeg: use the sync queues to handle -frames

2022-06-16 Thread Andreas Rheinhardt
Anton Khirnov: > Same issues apply to it as to -shortest. > > Changes the results of the following tests: > - matroska-flac-extradata-update > The test reencodes two input FLAC streams into three output FLAC > streams. The last output stream is limited to 8 frames. The current > code results

[FFmpeg-devel] [PATCH 27/35] fftools/ffmpeg: make the muxer AVFormatContext private to ffmpeg_mux.c

2022-06-16 Thread Anton Khirnov
Since the muxer will operate in a separate thread in the future, the muxer context should not be accessed from the outside. --- fftools/ffmpeg.c| 4 +-- fftools/ffmpeg.h| 6 ++-- fftools/ffmpeg_filter.c | 6 ++-- fftools/ffmpeg_mux.c| 80 +

[FFmpeg-devel] [PATCH 33/35] fftools/ffmpeg: depend on threads

2022-06-16 Thread Anton Khirnov
ffmpeg will be switched to a fully threaded architecture, starting with muxers. --- configure| 2 +- fftools/ffmpeg.c | 20 fftools/ffmpeg.h | 2 -- fftools/ffmpeg_opt.c | 2 -- 4 files changed, 1 insertion(+), 25 deletions(-) diff --git a/configure b/c

[FFmpeg-devel] [PATCH 31/35] fftools/ffmpeg_mux: do not call exit_program() in print_sdp()

2022-06-16 Thread Anton Khirnov
Return an error instead, as is already done in other places in this function. --- fftools/ffmpeg_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index cf24ae7700..2abadd3f9b 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg

[FFmpeg-devel] [PATCH 18/35] fate/ffmpeg: add a test for interleaving video+subs

2022-06-16 Thread Anton Khirnov
--- tests/fate/ffmpeg.mak | 8 tests/ref/fate/shortest-sub | 4 2 files changed, 12 insertions(+) create mode 100644 tests/ref/fate/shortest-sub diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index 94f50423be..154af2fac8 100644 --- a/tests/fate/ffmpeg.mak +++ b/te

[FFmpeg-devel] [PATCH 25/35] fftools/ffmpeg: stop using OutputStream.frame_number in print_report()

2022-06-16 Thread Anton Khirnov
This field means different things when the video is encoded (number of frames emitted to the encoding sync queue/encoder by the video sync code) or copied (number of packets sent to the muxer sync queue). Print the value of packets_written instead, which means the same thing in both cases. It is a

[FFmpeg-devel] [PATCH 32/35] fftools/ffmpeg: stop using av_stream_get_end_pts()

2022-06-16 Thread Anton Khirnov
It retrieves the muxer's internal timestamp with under-defined semantics. Continuing to use this value would also require synchronization once the muxer is moved to a separate thread. Replace the value with last_mux_dts. --- fftools/ffmpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions

[FFmpeg-devel] [PATCH 22/35] fftools/ffmpeg: rework -shortest implementation

2022-06-16 Thread Anton Khirnov
The -shortest option (which finishes the output file at the time the shortest stream ends) is currently implemented by faking the -t option when an output stream ends. This approach is fragile, since it depends on the frames/packets being processed in a specific order. E.g. there are currently some

[FFmpeg-devel] [PATCH 35/35] fftools/ffmpeg: move each muxer to a separate thread

2022-06-16 Thread Anton Khirnov
--- doc/ffmpeg.texi | 11 +- fftools/ffmpeg.c | 18 ++- fftools/ffmpeg.h | 7 +- fftools/ffmpeg_mux.c | 299 +++ fftools/ffmpeg_opt.c | 4 +- 5 files changed, 236 insertions(+), 103 deletions(-) diff --git a/doc/ffmpeg.texi b/doc/ffmpeg.t

[FFmpeg-devel] [PATCH 30/35] fftools/ffmpeg_mux: return errors from write_packet()

2022-06-16 Thread Anton Khirnov
Do not call exit_program(), as that would conflict with moving this code into a separate thread. --- fftools/ffmpeg_mux.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 98d3adaeac..cf24ae7700 100644 --

[FFmpeg-devel] [PATCH 16/35] fftools/ffmpeg: use refcounted packets for encoded subtitles

2022-06-16 Thread Anton Khirnov
--- fftools/ffmpeg.c | 25 - 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index f60013eace..b8a11818b8 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -140,8 +140,6 @@ unsigned nb_output_dumped = 0; static Bench

[FFmpeg-devel] [PATCH 29/35] fftools/ffmpeg_mux: return errors from submit_packet()

2022-06-16 Thread Anton Khirnov
Do not call exit_program(), as that would conflict with moving this code into a separate thread. --- fftools/ffmpeg_mux.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 490e0e54eb..98d3adaeac 100644 --- a/ff

[FFmpeg-devel] [PATCH 23/35] fftools/ffmpeg_mux: reindent

2022-06-16 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 42 +- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 453ccac912..641bdb98b0 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -98,16 +98,16 @@ static

[FFmpeg-devel] [PATCH 19/35] fftools/ffmpeg: use last filter output pts to choose next output stream

2022-06-16 Thread Anton Khirnov
This will be needed in the following commit that will add a new buffering stages after encoding and bitstream filtering. --- fftools/ffmpeg.c | 23 ++- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 1 + 3 files changed, 21 insertions(+), 5 deletions(-) diff --git a

[FFmpeg-devel] [PATCH 01/35] fftools/ffmpeg_mux: add private muxer context

2022-06-16 Thread Anton Khirnov
Move header_written into it, which is not (and should not be) used by any code outside of ffmpeg_mux. In the future this context will contain more muxer-private state that should not be visible to other code. --- fftools/ffmpeg.h | 6 -- fftools/ffmpeg_mux.c | 26 ++--

[FFmpeg-devel] [PATCH 17/35] fftools/ffmpeg: do not send spurious EOF for streamcopy when looping

2022-06-16 Thread Anton Khirnov
--- fftools/ffmpeg.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index b8a11818b8..53ca8c7f7b 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2516,7 +2516,8 @@ static int process_input_packet(InputStream *ist, const AVPacket *

[FFmpeg-devel] [PATCH 21/35] fftools: add an object pool

2022-06-16 Thread Anton Khirnov
Allows to avoid constantly allocating and freeing objects like AVFrame or AVPacket. --- fftools/objpool.c | 131 ++ fftools/objpool.h | 37 + 2 files changed, 168 insertions(+) create mode 100644 fftools/objpool.c create mode 100644 fftool

[FFmpeg-devel] [PATCH 09/35] fftools/ffmpeg: access output file chapters through a wrapper

2022-06-16 Thread Anton Khirnov
Avoid accessing the muxer context directly, as this will become forbidden in future commits. --- fftools/ffmpeg.c | 15 +-- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_mux.c | 7 +++ 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ff

[FFmpeg-devel] [PATCH 12/35] fftools/ffmpeg_mux: split queuing packets into a separate function

2022-06-16 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 72 +++- 1 file changed, 44 insertions(+), 28 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index d49235ee63..98637004aa 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -63,12 +63,50 @@ stat

[FFmpeg-devel] [PATCH 15/35] fftools/ffmpeg: move freeing 2pass input stats to a better place

2022-06-16 Thread Anton Khirnov
The current placement of this free is historical - it used to be followed by avcodec_close(), since removed. The proper place for freeing the stats is currently right before the encoder context itself is freed. --- fftools/ffmpeg.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff

[FFmpeg-devel] [PATCH 03/35] fftools/ffmpeg: fix the type of limit_filesize

2022-06-16 Thread Anton Khirnov
The option is parsed as INT64 (signed). It is also compared to the output of avio_tell(), which is also int64_t. --- fftools/ffmpeg.h | 4 ++-- fftools/ffmpeg_opt.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 10a51db469..d126

[FFmpeg-devel] [PATCH 34/35] fftools: add a multistream thread-safe queue

2022-06-16 Thread Anton Khirnov
It is similar to AVThreadMessageQueue, but supports multiple streams, each with its own EOF state. --- fftools/Makefile | 1 + fftools/thread_queue.c | 245 + fftools/thread_queue.h | 81 ++ 3 files changed, 327 insertions(+) create mod

[FFmpeg-devel] [PATCH 14/35] fftools/ffmpeg: move output file opts into private context

2022-06-16 Thread Anton Khirnov
It is private to the muxer, no reason to access it from outside. --- fftools/ffmpeg.h | 3 +-- fftools/ffmpeg_mux.c | 9 ++--- fftools/ffmpeg_opt.c | 12 ++-- 3 files changed, 13 insertions(+), 11 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index c7db12a640..2a

[FFmpeg-devel] [PATCH 10/35] fftools/ffmpeg: do not log to the muxer context

2022-06-16 Thread Anton Khirnov
All other logging goes to NULL context. --- fftools/ffmpeg.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d8ab0ffb9c..8f5901137b 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2905,7 +2905,6 @@ static void init_enc

[FFmpeg-devel] [PATCH 28/35] fftools/ffmpeg_mux: return errors from of_submit_packet()

2022-06-16 Thread Anton Khirnov
Do not call exit_program(), as that would conflict with moving this code into a separate thread. --- fftools/ffmpeg.c | 54 +++- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_mux.c | 6 +++-- 3 files changed, 43 insertions(+), 19 deletions(-) diff --git

[FFmpeg-devel] [PATCH 13/35] fftools/ffmpeg_mux: split of_write_packet()

2022-06-16 Thread Anton Khirnov
It is currently called from two places: - output_packet() in ffmpeg.c, which submits the newly available output packet to the muxer - from of_check_init() in ffmpeg_mux.c after the header has been written, to flush the muxing queue Some packets will thus be processed by this function twice, so

[FFmpeg-devel] [PATCH 26/35] fftools/ffmpeg: only set OutputStream.frame_number for video encoding

2022-06-16 Thread Anton Khirnov
It is unused otherwise. Rename the field to vsync_frame_number to better reflect its current purpose. --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 3 ++- fftools/ffmpeg_mux.c | 10 -- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/fftools/ffmpeg.c b/f

[FFmpeg-devel] [PATCH 11/35] fftools/ffmpeg: move the mux queue into muxer private data

2022-06-16 Thread Anton Khirnov
The muxing queue currently lives in OutputStream, which is a very large struct storing the state for both encoding and muxing. The muxing queue is only used by the code in ffmpeg_mux, so it makes sense to restrict it to that file. This makes the first step towards reducing the scope of OutputStrea

[FFmpeg-devel] [PATCH 08/35] fftools/ffmpeg: refactor the code checking for bitexact output

2022-06-16 Thread Anton Khirnov
Figure out earlier whether the output stream/file should be bitexact and store this information in a flag in OutputFile/OutputStream. Stop accessing the muxer in set_encoder_id(), which will become forbidden in future commits. --- fftools/ffmpeg.c | 21 + fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 24/35] fftools/ffmpeg: use the sync queues to handle -frames

2022-06-16 Thread Anton Khirnov
Same issues apply to it as to -shortest. Changes the results of the following tests: - matroska-flac-extradata-update The test reencodes two input FLAC streams into three output FLAC streams. The last output stream is limited to 8 frames. The current code results in the first two output stre

[FFmpeg-devel] [PATCH 20/35] fftools/ffmpeg: use pre-BSF DTS for choosing next output

2022-06-16 Thread Anton Khirnov
The following commits will add a new buffering stage after bitstream filters, which should not be taken into account for choosing next output. OutputStream.last_mux_dts is also used by the muxing code to make up missing DTS values - that field is now moved to the muxer-private MuxStream object. --

[FFmpeg-devel] [PATCH 07/35] fftools/ffmpeg: move closing the file into of_write_trailer()

2022-06-16 Thread Anton Khirnov
The current code postpones closing the files until after printing the final report, which accesses the output file size. Deal with this by storing the final file size before closing the file. --- fftools/ffmpeg.c | 13 - fftools/ffmpeg_mux.c | 16 +++- 2 files changed,

[FFmpeg-devel] [PATCH 06/35] fftools/ffmpeg: write the header for stream-less outputs when initializing the muxer

2022-06-16 Thread Anton Khirnov
There is no reason to delay this. --- fftools/ffmpeg.c | 11 --- fftools/ffmpeg_mux.c | 7 +++ 2 files changed, 7 insertions(+), 11 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 51616cf51d..2463056f8f 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -

[FFmpeg-devel] [PATCH 04/35] fftools/ffmpeg: refactor limiting output file size with -fs

2022-06-16 Thread Anton Khirnov
Move the file size checking code to ffmpeg_mux. Use the recently introduced of_filesize(), making this code consistent with the size shown by print_report(). --- fftools/ffmpeg.c | 4 +--- fftools/ffmpeg.h | 4 ++-- fftools/ffmpeg_mux.c | 11 ++- fftools/ffmpeg_opt.c | 3 +-- 4

[FFmpeg-devel] [PATCH 05/35] fftools/ffmpeg: set want_sdp when initializing the muxer

2022-06-16 Thread Anton Khirnov
Allows making the variable local to ffmpeg_mux. --- fftools/ffmpeg.c | 9 + fftools/ffmpeg.h | 1 - fftools/ffmpeg_mux.c | 5 + 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 8d5f071fd1..51616cf51d 100644 --- a/fftools/f

[FFmpeg-devel] [PATCH 02/35] fftools/ffmpeg: add a helper function to access output file size

2022-06-16 Thread Anton Khirnov
Stop accessing muxer internals from outside of ffmpeg_mux. --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux.c | 14 ++ 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 09caa3e3c4..5763f231

Re: [FFmpeg-devel] [PATCH] lavc/libx264.c: Fix possible UB by NULL pointer LHS

2022-06-16 Thread Michael Niedermayer
On Thu, Jun 16, 2022 at 05:58:09PM +0200, Thilo Borgmann wrote: > Hi, > > the LHS pointer might be NULL so that += would be UB. > > Thanks, > Thilo > libx264.c |4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > 558de1ca7a30aa728193297a7d605c051b5bbfc0 > 0001-lavc-libx264.c-Fix-po

Re: [FFmpeg-devel] [PATCH 1/3] Revert "avdevice/pulse_audio_dec: only set adjust latency flag if fragment_size is not set"

2022-06-16 Thread Marton Balint
On Sat, 11 Jun 2022, Marton Balint wrote: This reverts commit 7f059a250bb7bcbf7bba537c1a059a5934413035. Apparently adjusting latency makes a difference even if fragment size is specifed. Signed-off-by: Marton Balint --- libavdevice/pulse_audio_dec.c | 2 +- 1 file changed, 1 insertion(+),

Re: [FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes

2022-06-16 Thread Michael Niedermayer
On Thu, Jun 16, 2022 at 02:04:47PM +0200, Tomas Härdin wrote: > > libavcodec/avcodec.c | 10 ++ > libavcodec/pthread_slice.c|9 + > libavfilter/pthread.c |3 ++- > libavutil/slicethread.c | 34 +- > libavutil/

Re: [FFmpeg-devel] [PATCH] avcodec/libaomenc: Get number of operating points

2022-06-16 Thread James Zern
On Thu, Jun 16, 2022 at 9:24 AM Wan-Teh Chang wrote: > > Use the new codec control AV1E_GET_NUM_OPERATING_POINTS to get the > number of operating points. This is the size of the output arrays of > AV1E_GET_SEQ_LEVEL_IDX and AV1E_GET_TARGET_SEQ_LEVEL_IDX. > > Signed-off-by: Wan-Teh Chang > --- >

[FFmpeg-devel] [PATCH] avcodec/libaomenc: Get number of operating points

2022-06-16 Thread Wan-Teh Chang
Use the new codec control AV1E_GET_NUM_OPERATING_POINTS to get the number of operating points. This is the size of the output arrays of AV1E_GET_SEQ_LEVEL_IDX and AV1E_GET_TARGET_SEQ_LEVEL_IDX. Signed-off-by: Wan-Teh Chang --- libavcodec/libaomenc.c | 20 ++-- 1 file changed, 14

Re: [FFmpeg-devel] [PATCH 1/2] lavf/avio: add avio_vprintf()

2022-06-16 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Nicolas George > Sent: Sunday, June 12, 2022 7:01 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH 1/2] lavf/avio: add avio_vprintf() > > Stefano Sabatini (12022-06-12):

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/libopusdec: Enable FEC/PLC

2022-06-16 Thread Philip-Dylan Gleonec
Hello, Is there some interest in this patch ? If so, is there something I can modify to improve it ? Regards, Philip-Dylan Gleonec ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, vi

[FFmpeg-devel] [PATCH] lavc/libx264.c: Fix possible UB by NULL pointer LHS

2022-06-16 Thread Thilo Borgmann
Hi, the LHS pointer might be NULL so that += would be UB. Thanks, ThiloFrom cfb7ce8092c34436fae3120645aa96fe082af4ea Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 16 Jun 2022 17:52:56 +0200 Subject: [PATCH] lavc/libx264.c: Fix possible UB by NULL pointer LHS It is UB to attempt to d

Re: [FFmpeg-devel] The case for a good string API

2022-06-16 Thread Nicolas George
Stefano Sabatini (12022-06-15): > Hi, and sorry for the long delay (I'll comment soon about the AVWriter > API). Thanks. I was starting to despair that somebody else gives a damn about it. > Before jumping to the discussion, probably it's good to think a bit > about the bprint.h API and its limit

Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder using libaribcaption

2022-06-16 Thread TADANO Tokumei
On 2022/06/16 22:40, Soft Works wrote: -Original Message- From: ffmpeg-devel On Behalf Of TADANO Tokumei Sent: Thursday, June 16, 2022 3:23 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder using libaribcaption ping again! Are there

Re: [FFmpeg-devel] [PATCH v9 09/10] qsv: use a new method to create mfx session when using oneVPL

2022-06-16 Thread Xiang, Haihao
On Mon, 2022-06-13 at 13:01 +0200, Anton Khirnov wrote: > Quoting Xiang, Haihao (2022-06-02 05:41:17) > > From: Haihao Xiang > > > > In oneVPL, MFXLoad() and MFXCreateSession() are required to create a > > workable mfx session[1] > > > > Add config filters for D3D9/D3D11 session (galinart) > >

Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder using libaribcaption

2022-06-16 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > TADANO Tokumei > Sent: Thursday, June 16, 2022 3:23 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder > using libaribcaption > > ping again! > > Are there any objections to th

Re: [FFmpeg-devel] [PATCH v4 0/4] add ARIB caption decoder using libaribcaption

2022-06-16 Thread TADANO Tokumei
ping again! Are there any objections to this patch set? If not, would someone push it to the repository? On 2022/06/08 18:48, TADANO Tokumei wrote: ping The patch set has been well tested by Japanese ISDB-related developers and works fine. I think it already has good quality to merge. It req

Re: [FFmpeg-devel] [PATCH 06/13] lavu/mem: Add ff_fast_recalloc()

2022-06-16 Thread Tomas Härdin
ons 2022-06-15 klockan 09:15 -0300 skrev James Almer: > On 6/15/2022 6:59 AM, Tomas Härdin wrote: > > tis 2022-06-14 klockan 22:26 +0200 skrev Michael Niedermayer: > > > On Tue, Jun 14, 2022 at 04:42:06PM +0200, Tomas Härdin wrote: > > > > Left this as an ff_ funtion for now since it's only used by

[FFmpeg-devel] [PATCH] Make execute() and execute2() return FFMIN() of thread return codes

2022-06-16 Thread Tomas Härdin
From 2895c86dd908f6ddf3562d81050c50ea697a0bad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 Jun 2022 12:16:44 +0200 Subject: [PATCH] Make execute() and execute2() return FFMIN() of thread return codes At the moment only fic.c actually checks return code of execute

Re: [FFmpeg-devel] [PATCH 1/4] avformat/mxf: Use AVUUID for uids

2022-06-16 Thread Tomas Härdin
tor 2022-06-16 klockan 11:49 +0200 skrev Andreas Rheinhardt: > Andreas Rheinhardt: > > This is in preparation for using av_uuid functions directly. > > > > Signed-off-by: Andreas Rheinhardt > > --- > >  libavformat/mxf.h | 3 ++- > >  1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --

Re: [FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Thilo Borgmann
Am 16.06.22 um 12:40 schrieb Andreas Rheinhardt: Thilo Borgmann: Am 16.06.22 um 12:13 schrieb Andreas Rheinhardt: Thilo Borgmann: diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index a87562c8a3..833ce9e705 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -153,7 +15

Re: [FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Andreas Rheinhardt
Thilo Borgmann: > Am 16.06.22 um 12:13 schrieb Andreas Rheinhardt: >> Thilo Borgmann: >>> diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c >>> index a87562c8a3..833ce9e705 100644 >>> --- a/libavcodec/dovi_rpu.c >>> +++ b/libavcodec/dovi_rpu.c >>> @@ -153,7 +153,7 @@ static inline uint64_t

Re: [FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Thilo Borgmann
Am 16.06.22 um 12:13 schrieb Andreas Rheinhardt: Thilo Borgmann: diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index a87562c8a3..833ce9e705 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -153,7 +153,7 @@ static inline uint64_t get_ue_coef(GetBitContext *gb, const

Re: [FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Andreas Rheinhardt
Thilo Borgmann: > diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c > index a87562c8a3..833ce9e705 100644 > --- a/libavcodec/dovi_rpu.c > +++ b/libavcodec/dovi_rpu.c > @@ -153,7 +153,7 @@ static inline uint64_t get_ue_coef(GetBitContext *gb, > const AVDOVIRpuDataHeader > case RPU_COE

Re: [FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Thilo Borgmann
Am 16.06.22 um 11:44 schrieb Andreas Rheinhardt: Thilo Borgmann: Hi, avoid left-shifting possibly negative values in case of RPU_COEFF_FLOAT. Changed RPU_COEFF_FIXED as well for consistency. This is wrong: Both of your changes only affect RPU_COEFF_FIXED. Indeed I'm sorry, got confused loo

Re: [FFmpeg-devel] [PATCH] doc: describe QOI image format

2022-06-16 Thread Gyan Doshi
On 2022-06-15 01:06 pm, Peter Ross wrote: --- doc/general_contents.texi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/general_contents.texi b/doc/general_contents.texi index 93a90a5e52..987a2f82fb 100644 --- a/doc/general_contents.texi +++ b/doc/general_contents.texi @@ -785,6 +

Re: [FFmpeg-devel] [PATCH] avcodec/vlc: Use structure instead of VLC_TYPE array as VLC element

2022-06-16 Thread Andreas Rheinhardt
Andreas Rheinhardt: > In C, qualifiers for arrays are broken: > const VLC_TYPE (*foo)[2] is a pointer to an array of two const VLC_TYPE > elements and unfortunately this is not compatible with a pointer > to a const array of two VLC_TYPE, because the latter does not exist > as array types are never

Re: [FFmpeg-devel] [PATCH 1/4] avformat/mxf: Use AVUUID for uids

2022-06-16 Thread Andreas Rheinhardt
Andreas Rheinhardt: > This is in preparation for using av_uuid functions directly. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/mxf.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/mxf.h b/libavformat/mxf.h > index d53a16df51..4d9f5119a3 1006

Re: [FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Andreas Rheinhardt
Thilo Borgmann: > Hi, > > avoid left-shifting possibly negative values in case of RPU_COEFF_FLOAT. > Changed RPU_COEFF_FIXED as well for consistency. > This is wrong: Both of your changes only affect RPU_COEFF_FIXED. - Andreas ___ ffmpeg-devel mailing

Re: [FFmpeg-devel] [PATCH 05/13] lavc/jpeg2000dec: Thread init_tile()

2022-06-16 Thread Tomas Härdin
ons 2022-06-15 klockan 23:05 +0200 skrev Michael Niedermayer: > On Wed, Jun 15, 2022 at 03:11:34PM +0200, Tomas Härdin wrote: > > tis 2022-06-14 klockan 23:11 +0200 skrev Michael Niedermayer: > > > On Tue, Jun 14, 2022 at 04:41:14PM +0200, Tomas Härdin wrote: > > > > > > > > > > >  jpeg2000dec.c

[FFmpeg-devel] [PATCH] avformat: add AVFormatContext.first_pts_wallclock

2022-06-16 Thread Gyan Doshi
Stores wallclock time for the first packet received with a pts. --- doc/APIchanges | 3 +++ libavformat/avformat.h | 10 ++ libavformat/demux.c| 3 +++ libavformat/options.c | 1 + libavformat/version.h | 2 +- 5 files changed, 18 insertions(+), 1 deletion(-) diff --git

[FFmpeg-devel] [PATCH] tests/checkasm/sw_scale: Fix alignment for movdqa

2022-06-16 Thread Thilo Borgmann
Hi, movdqa in ff_yuv2yuvX_sse3() expects a 16-byte alignment according to its documentation causing segfaults in fate-checkasm-sw_scale. -ThiloFrom ed84410b2371a758dad03d3830bfb4f3d86cd4ed Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 16 Jun 2022 10:14:50 +0200 Subject: [PATCH] test

[FFmpeg-devel] [PATCH] lavc/dovi_rpu: Fix UB for possible left shift of negative values

2022-06-16 Thread Thilo Borgmann
Hi, avoid left-shifting possibly negative values in case of RPU_COEFF_FLOAT. Changed RPU_COEFF_FIXED as well for consistency. -ThiloFrom 7eca2659b588c404f058eccef478c889555957fd Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Thu, 16 Jun 2022 10:25:28 +0200 Subject: [PATCH] lavc/dovi_rpu:

Re: [FFmpeg-devel] [PATCH v9 08/10] qsv: support OPAQUE memory when MFX_VERSION < 2.0

2022-06-16 Thread Xiang, Haihao
On Mon, 2022-06-13 at 11:40 +0200, Anton Khirnov wrote: > Quoting Xiang, Haihao (2022-06-02 05:41:16) > > From: Haihao Xiang > > > > OPAQUE memory isn't supported for MFX_VERSION >= 2.0[1][2]. This is in > > preparation for oneVPL support > > > > [1] > > https://spec.oneapi.io/versions/latest/e

Re: [FFmpeg-devel] [PATCH] doc/APIchanges: add missing marker for release 5.0

2022-06-16 Thread Gyan Doshi
On 2022-06-15 01:49 pm, Gyan Doshi wrote: Will push later today. Pushed as 557a1a8af27a2666433ca9970a15addcd1d8a506 On 2022-06-14 03:11 pm, Gyan Doshi wrote: ---   doc/APIchanges | 2 ++   1 file changed, 2 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 5857e67ae6..20b