Re: [FFmpeg-devel] [PATCH v2] avfilter: add overlay vaapi filter

2022-01-11 Thread Xiang, Haihao
On Mon, 2021-11-22 at 15:53 +0800, Fei Wang wrote: > From: Xinpeng Sun > > Overlay one video on the top of another. > > It takes two inputs and has one output. The first input is the "main" video on > which the second input is overlaid. This filter requires same memory layout > for > all the inp

[FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread Gijs Peskens
Introduce fifo_size and overrun_nonfatal params to configure fifo buffer behavior. Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun and error out in that case. --- doc/protocols.texi| 9 + libavformat/librist.c | 40 +++- 2 f

Re: [FFmpeg-devel] [PATCH] avformat/asfdec: fix crash caused by free wlid pointers

2022-01-11 Thread Andreas Rheinhardt
Yang Xiao: > From: Yang Xiao > > This commit fixed a crash when seeking wma frames, asf decoder will try to > demux in function asf_read_pts(). > Pointer member side_data of AVPacket that allocated by stack may be wild > pointer. > Prevent releasing wild pointers in AVPacket when some functions

Re: [FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread zhilizhao(赵志立)
> On Jan 11, 2022, at 5:23 PM, Gijs Peskens wrote: > > Introduce fifo_size and overrun_nonfatal params to configure fifo buffer > behavior. > > Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun > and error out in that case. > --- > doc/protocols.texi| 9 + > l

Re: [FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread Gijs Peskens
On 11-01-2022 10:43, "zhilizhao(赵志立)" wrote: On Jan 11, 2022, at 5:23 PM, Gijs Peskens wrote: Introduce fifo_size and overrun_nonfatal params to configure fifo buffer behavior. Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun and error out in that case. --- doc/protoco

[FFmpeg-devel] [PATCH 04/28] ffmpeg: move writing the trailer to ffmpeg_mux.c

2022-01-11 Thread Anton Khirnov
--- fftools/ffmpeg.c | 16 +++- fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux.c | 21 + 3 files changed, 25 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index e0aa533dc9..87e8b0be59 100644 --- a/fftools/ffmpeg.c +++ b/fftool

[FFmpeg-devel] [PATCH 01/28] ffmpeg: pass the muxer context explicitly to some functions

2022-01-11 Thread Anton Khirnov
Stop accessing OutputFile.ctx. This will be useful in the following commits, where it will become hidden. --- fftools/ffmpeg_opt.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 9c820ab73f..f638edace9 100644 --

[FFmpeg-devel] [PATCH 05/28] ffmpeg: move freeing the output file to ffmpeg_mux.c

2022-01-11 Thread Anton Khirnov
--- fftools/ffmpeg.c | 14 ++ fftools/ffmpeg.h | 1 + fftools/ffmpeg_mux.c | 17 + 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 87e8b0be59..320ab8e0ca 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmp

[FFmpeg-devel] [PATCH 03/28] ffmpeg: move some muxing-related code into a separate file

2022-01-11 Thread Anton Khirnov
This is a first step towards making muxers more independent from the rest of the code. --- fftools/Makefile | 6 +- fftools/ffmpeg.c | 273 ++-- fftools/ffmpeg.h | 10 ++ fftools/ffmpeg_mux.c | 293 +++ 4 fi

[FFmpeg-devel] [PATCH 07/28] ffmpeg_mux: add private muxer context

2022-01-11 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 06/28] ffmpeg: store output format separately from the muxer context

2022-01-11 Thread Anton Khirnov
Allows accessing it without going through the muxer context. This will be useful in the following commits, where the muxer context will be hidden. --- fftools/ffmpeg.c | 18 ++ fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 1 + 3 files changed, 13 insertions(+), 8 delet

[FFmpeg-devel] [PATCH 02/28] ffmpeg: store the output file index in OutputFile

2022-01-11 Thread Anton Khirnov
Use it to simplify check_init_output_file(). Will allow further simplifications in the following commits. --- fftools/ffmpeg.c | 10 +- fftools/ffmpeg.h | 2 ++ fftools/ffmpeg_opt.c | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/f

[FFmpeg-devel] [PATCH 10/28] ffmpeg: refactor limiting output file size with -fs

2022-01-11 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 08/28] ffmpeg: add a helper function to access output file size

2022-01-11 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 9360c8a475..1b5cf4d9

[FFmpeg-devel] [PATCH 16/28] ffmpeg: do not log to the muxer context

2022-01-11 Thread Anton Khirnov
All other logging goes to NULL context. --- fftools/ffmpeg.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 2637b25526..6c774e9615 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2954,7 +2954,6 @@ static void init_encode

[FFmpeg-devel] [PATCH 18/28] ffmpeg: fix initial muxing queue size

2022-01-11 Thread Anton Khirnov
It stores pointers to AVPacket, not AVPackets themselves. --- 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 f03202bbb7..f48031096d 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -411,7 +41

[FFmpeg-devel] [PATCH 21/28] ffmpeg: move a comment to a more appropriate place

2022-01-11 Thread Anton Khirnov
--- fftools/ffmpeg.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 4215be0098..f39b1b9375 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1064,6 +1064,11 @@ static void do_video_out(OutputFile *of, }

[FFmpeg-devel] [PATCH 20/28] ffmpeg_mux: split of_write_packet()

2022-01-11 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 22/28] ffmpeg: move output file opts into private context

2022-01-11 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 374dca9189..d9

[FFmpeg-devel] [PATCH 13/28] ffmpeg: move closing the file into of_write_trailer()

2022-01-11 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 17/28] ffmpeg: move the mux queue into muxer private data

2022-01-11 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 23/28] ffmpeg: move processing video stats to ffmpeg_mux

2022-01-11 Thread Anton Khirnov
Currently it is called from - do_video_out(), at the end of each encode loop iteration - from flush_encoders(), after muxing each packet Since this function processes the data from the last encoded packet, neither of the above is fully correct, because - an encoder can in principle produce multipl

[FFmpeg-devel] [PATCH 24/28] ffmpeg_mux: drop a useless check and reduce indentation

2022-01-11 Thread Anton Khirnov
do_video_stats() is only ever called for video. --- fftools/ffmpeg_mux.c | 42 -- 1 file changed, 20 insertions(+), 22 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 76d9d4b9c4..8a64661c9c 100644 --- a/fftools/ffmpeg_mux.c +++ b

[FFmpeg-devel] [PATCH 27/28] ffmpeg_mux: merge variable declaration and initialization

2022-01-11 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 54020880eb..21771b3ae6 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -58,7 +58,7 @@ static int want_sdp = 1; static void do_video_st

[FFmpeg-devel] [PATCH 25/28] ffmpeg_mux: stop using AVStream.nb_frames in do_video_stats()

2022-01-11 Thread Anton Khirnov
Its use for muxing is not documented, in practice it is incremented per each packet successfully passed to the muxer's write_packet(). Since there is a lot of indirection between ffmpeg submitting a packet to the muxer and it actually being written (e.g. the interleaving queue), using nb_frames to

[FFmpeg-devel] [PATCH 26/28] ffmpeg_mux: stop using av_stream_get_end_pts() in do_video_stats()

2022-01-11 Thread Anton Khirnov
It retrieves libavformat's internal dts value (contrary to the function's name), which is not necessary here because we can access the packet directly. --- fftools/ffmpeg_mux.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.

[FFmpeg-devel] [PATCH 12/28] ffmpeg: write the header for stream-less outputs when initializing the muxer

2022-01-11 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 d856b5b38f..f28cc17f51 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -

[FFmpeg-devel] [PATCH 09/28] ffmpeg: fix the type of limit_filesize

2022-01-11 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 dfcaa875d9..80b9

[FFmpeg-devel] [PATCH 15/28] ffmpeg: access output file chapters through a wrapper

2022-01-11 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 11/28] ffmpeg: set want_sdp when initializing the muxer

2022-01-11 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 37c4a0d285..d856b5b38f 100644 --- a/fftools/f

[FFmpeg-devel] [PATCH 14/28] ffmpeg: refactor the code checking for bitexact output

2022-01-11 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 19/28] ffmpeg_mux: split queuing packets into a separate function

2022-01-11 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 f48031096d..4ab2279739 100644 --- a/fftools/ffmpeg_mux.c +++ b/fftools/ffmpeg_mux.c @@ -63,12 +63,50 @@ stat

[FFmpeg-devel] [PATCH 28/28] ffmpeg_mux: move processing AV_PKT_DATA_QUALITY_STATS to do_video_stats()

2022-01-11 Thread Anton Khirnov
This is a more appropriate place for this code, since the values we read from AV_PKT_DATA_QUALITY_STATS side data are primarily written into video stats. Rename the function to update_video_stats() to better reflect its new purpose. --- fftools/ffmpeg_mux.c | 37 +++---

[FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread Gijs Peskens
Introduce fifo_size and overrun_nonfatal params to configure fifo buffer behavior. Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun and error out in that case. --- doc/protocols.texi| 9 + libavformat/librist.c | 37 + 2 file

Re: [FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread Gijs Peskens
V2, I don't know why send-patch didn't pick up the subject override :/ On 11-01-2022 11:34, Gijs Peskens wrote: Introduce fifo_size and overrun_nonfatal params to configure fifo buffer behavior. Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun and error out in that case.

Re: [FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread zhilizhao(赵志立)
> On Jan 11, 2022, at 6:34 PM, Gijs Peskens wrote: > > Introduce fifo_size and overrun_nonfatal params to configure fifo buffer > behavior. > > Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun > and error out in that case. > --- > doc/protocols.texi| 9 + >

Re: [FFmpeg-devel] [PATCH v2] avcodec/av1dec: honor the requested skip_frame level

2022-01-11 Thread James Almer
On 1/9/2022 4:18 PM, James Almer wrote: This supports dropping non-intra, non-key, or all frames. Signed-off-by: James Almer --- Now dropping the frames without decoding them. Untested with actual hardware. Tested by nevcairiel and confirmed to work, so will apply. libavcodec/av1dec.

[FFmpeg-devel] [PATCH] avformat/asfdec_f: init avpacket by av_packet_alloc()

2022-01-11 Thread yshaw1999
From: Yang Xiao Pointer member side_data of AVPacket that allocated by stack may be wild pointer. Prevent releasing wild pointers in AVPacket when some functions try to call av_packet_unref() --- libavformat/asfdec_f.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --gi

Re: [FFmpeg-devel] [PATCH] avformat/asfdec_f: init avpacket by av_packet_alloc()

2022-01-11 Thread Andreas Rheinhardt
yshaw1...@163.com: > From: Yang Xiao > > Pointer member side_data of AVPacket that allocated by stack may be wild > pointer. > Prevent releasing wild pointers in AVPacket when some functions try to call > av_packet_unref() > --- > libavformat/asfdec_f.c | 10 -- > 1 file changed, 8 ins

[FFmpeg-devel] [PATCH] libRIST: allow setting fifo size and fail on overflow.

2022-01-11 Thread Gijs Peskens
Introduce fifo_size and overrun_nonfatal params to configure fifo buffer behavior. Use newly introduced RIST_DATA_FLAGS_OVERFLOW flag to check for overrun and error out in that case. --- doc/protocols.texi| 9 + libavformat/librist.c | 37 + 2 file

Re: [FFmpeg-devel] [PATCH] IEC61937_EAC3 decoding support

2022-01-11 Thread Denis Shulyaka
Hi all, Is there anything I could do to kindly ask to review and accept the patch? Best regards, Denis Shulyaka вт, 28 сент. 2021 г. в 17:53, Denis Shulyaka : > Hi all, > > This is a kind reminder. > > Best regards, > Denis Shulyaka > > вс, 11 апр. 2021 г. в 13:21, Denis Shulyaka : > >> Hi Carl

Re: [FFmpeg-devel] [PATCH 8/9] avcodec/mpeg4videodec: Avoid multiple consecutive av_log()

2022-01-11 Thread Michael Niedermayer
On Mon, Jan 10, 2022 at 11:55:35PM +0100, Andreas Rheinhardt wrote: > These messages belong together, yet they can be torn apart > if some other call to av_log() happens between them. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mpeg4videodec.c | 59 +++---

Re: [FFmpeg-devel] [PATCH] vf_tonemap: Fix order of planes

2022-01-11 Thread Vittorio Giovara
On Wed, Jan 5, 2022 at 4:15 PM Vittorio Giovara wrote: > This resulted in a dimmed tonemapping due to bad resulting luma > calculation. > > Found by: Derek Buitenhuis > > Signed-off-by: Vittorio Giovara > --- > libavfilter/vf_tonemap.c | 10 +- > 1 file changed, 5 insertions(+), 5 delet

Re: [FFmpeg-devel] [PATCH v3 1/2] swscale/x86/output.asm: add x86-optimized planer gbr yuv2anyX functions

2022-01-11 Thread Paul B Mahol
Can someone apply this? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Re: [FFmpeg-devel] [PATCH v3 1/2] swscale/x86/output.asm: add x86-optimized planer gbr yuv2anyX functions

2022-01-11 Thread James Almer
On 1/8/2022 8:13 PM, Mark Reid wrote: On Sat, Jan 1, 2022 at 2:35 AM Paul B Mahol wrote: will apply soon ping Applied. Sorry for the delay. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

[FFmpeg-devel] [PATCH 04/35] lavu/fifo: add new functions for determinining reading/writing size

2022-01-11 Thread Anton Khirnov
Consistently use size_t for sizes. The new names should also be more clear - e.g. current av_fifo_size() could be misinterpreted as meaning the allocated size. --- doc/APIchanges | 2 +- libavutil/fifo.c | 16 +--- libavutil/fifo.h | 10 ++ 3 files changed, 24 insertions(+)

[FFmpeg-devel] [PATCH 01/35] lavu/fifo: disallow overly large fifo sizes

2022-01-11 Thread Anton Khirnov
The API currently allows creating FIFOs up to - UINT_MAX: av_fifo_alloc(), av_fifo_realloc(), av_fifo_grow() - SIZE_MAX: av_fifo_alloc_array() However the usable limit is determined by - rndx/wndx being uint32_t - av_fifo_[size,space] returning int so no FIFO should be larger than the smallest of -

[FFmpeg-devel] [PATCH 03/35] lavu/fifo: introduce the notion of element size

2022-01-11 Thread Anton Khirnov
Many AVFifoBuffer users operate on fixed-size elements (e.g. pointers), but the current FIFO API deals exclusively in bytes, requiring extra complexity in all these callers. Add a new AVFifoBuffer constructor creating a FIFO with an element size that may be larger than a byte. All operations on su

[FFmpeg-devel] [PATCH 05/35] lavu/fifo: add a new FIFO grow function

2022-01-11 Thread Anton Khirnov
Consistently use size_t for sizes. Unlike av_fifo_grow(), which addds to the currently used size, this function adds to the allocated size. No new function is provided for a generic realloc, since the current code only supports increasing the FIFO size. --- doc/APIchanges | 3 ++- libavutil/f

[FFmpeg-devel] [PATCH 07/35] lavu/fifo: add new FIFO writing functions

2022-01-11 Thread Anton Khirnov
Use separate functions for writing from a buffer and a callback, since the overwhelming majority of callers use a buffer and should not be forced to pass extra NULL parameters or use a longer name. Consistently use size_t for sizes. --- doc/APIchanges | 2 +- libavutil/fifo.c | 58

[FFmpeg-devel] [PATCH 14/35] lavc/cuviddec: do not reallocate the fifo unnecessarily

2022-01-11 Thread Anton Khirnov
--- libavcodec/cuviddec.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index f03bbd8c4b..b1a3d674ab 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -1030,13 +1030,7 @@ static void cuvid_flush(AVCodecConte

[FFmpeg-devel] [PATCH 24/35] lavf/mpegenc: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavformat/mpegenc.c | 36 +--- 1 file changed, 21 insertions(+), 15 deletions(-) diff --git a/libavformat/mpegenc.c b/libavformat/mpegenc.c index b1d8bf9c38..909df7f484 100644 --- a/libavformat/mpegenc.c +++ b/libavformat/mpegenc.c @@ -459,7 +459,7 @@ static

[FFmpeg-devel] [PATCH 16/35] lavc/libvorbisenc: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/libvorbisenc.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c index fa0d5f4b42..8db782b188 100644 --- a/libavcodec/libvorbisenc.c +++ b/libavcodec/libvorbisenc.c @@ -271,7 +271,7 @@ static av_c

[FFmpeg-devel] [PATCH 17/35] lavc/libvpxenc: switch to the new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/libvpxenc.c | 28 1 file changed, 8 insertions(+), 20 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 10e5a22fa9..55f587c490 100644 --- a/libavcodec/libvpxenc.c +++ b/libavcodec/libvpxenc.c @@ -324,20 +324,11 @@ static av

[FFmpeg-devel] [PATCH 18/35] lavc/libvpxenc: remove unneeded context variable

2022-01-11 Thread Anton Khirnov
discard_hdr10_plus is 0 IFF hdr10_plus_fifo is non-NULL, so we can test for the latter and avoid an extra variable. --- libavcodec/libvpxenc.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c index 55f587c490..6bb19289ff 100

[FFmpeg-devel] [PATCH 21/35] lavc/qsvenc: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/qsvenc.c | 120 +++- 1 file changed, 52 insertions(+), 68 deletions(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 4e7a15f060..ee489325f5 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -85,6 +85,12 @@ static co

[FFmpeg-devel] [PATCH 19/35] lavc/nvenc: switch to the new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/nvenc.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/libavcodec/nvenc.c b/libavcodec/nvenc.c index 850c46022b..ae57399e96 100644 --- a/libavcodec/nvenc.c +++ b/libavcodec/nvenc.c @@ -1568,7 +1568,7 @@ static av_cold int n

[FFmpeg-devel] [PATCH 25/35] lavf/swfenc: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavformat/swfenc.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/libavformat/swfenc.c b/libavformat/swfenc.c index 1fd2ad81a3..ca9a358ccc 100644 --- a/libavformat/swfenc.c +++ b/libavformat/swfenc.c @@ -211,7 +211,7 @@ static int swf_write_header(AVF

[FFmpeg-devel] [PATCH 27/35] lavf/async: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavformat/async.c | 62 ++--- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/libavformat/async.c b/libavformat/async.c index 5a81507ef1..59b0e7d352 100644 --- a/libavformat/async.c +++ b/libavformat/async.c @@ -83,7 +83,7 @@ typedef st

[FFmpeg-devel] [PATCH 15/35] lavc/cuviddec: convert to the new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/cuviddec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/cuviddec.c b/libavcodec/cuviddec.c index b1a3d674ab..5121fdb6a4 100644 --- a/libavcodec/cuviddec.c +++ b/libavcodec/cuviddec.c @@ -363,13 +363,13 @@ static int CUDAAPI cuvid_hand

[FFmpeg-devel] [PATCH 08/35] lavu/fifo: add new FIFO read/peek functions

2022-01-11 Thread Anton Khirnov
As for writing, use separate functions for reading to a buffer and a callback. Allow the callbacks to limit the amount of data read, similarly to what is done for writing. Consistently use size_t for sizes. --- doc/APIchanges | 3 ++- libavutil/fifo.c | 68 +

[FFmpeg-devel] [PATCH 10/35] lavu/fifo: deprecate old API

2022-01-11 Thread Anton Khirnov
--- doc/APIchanges | 3 +++ libavutil/fifo.c| 10 ++ libavutil/fifo.h| 37 + libavutil/version.h | 1 + 4 files changed, 51 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index 52b42762ea..3531596a7f 100644 --- a/doc/APIchange

[FFmpeg-devel] [PATCH 11/35] lavu/tests/fifo: switch to the new API

2022-01-11 Thread Anton Khirnov
--- libavutil/tests/fifo.c | 45 +++--- 1 file changed, 20 insertions(+), 25 deletions(-) diff --git a/libavutil/tests/fifo.c b/libavutil/tests/fifo.c index e5aa88d252..952d0a5b2c 100644 --- a/libavutil/tests/fifo.c +++ b/libavutil/tests/fifo.c @@ -23,74 +23,69

[FFmpeg-devel] [PATCH 06/35] lavu/fifo: add a new function for draining the FIFO

2022-01-11 Thread Anton Khirnov
Consistently use size_t for sizes --- doc/APIchanges | 2 +- libavutil/fifo.c | 36 +--- libavutil/fifo.h | 7 +++ 3 files changed, 29 insertions(+), 16 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 98eae55719..f2769d4165 100644 --- a/doc/

[FFmpeg-devel] [PATCH 20/35] lavc/qsvdec: switch to the new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/qsvdec.c | 80 +++-- 1 file changed, 33 insertions(+), 47 deletions(-) diff --git a/libavcodec/qsvdec.c b/libavcodec/qsvdec.c index 08370c8a0b..acdf7804f6 100644 --- a/libavcodec/qsvdec.c +++ b/libavcodec/qsvdec.c @@ -56,6 +56,11 @@ static co

[FFmpeg-devel] [PATCH 02/35] lavu/fifo: make the contents of AVFifoBuffer private on next major bump

2022-01-11 Thread Anton Khirnov
There should be no good reason for the callers to access any of its contents. Define a new type for the internal struct that currently matches AVFifoBuffer. This will allow adding new private fields without waiting for the major bump and will be useful in the following commits. Unfortunately AVFi

[FFmpeg-devel] [PATCH 09/35] lavu/fifo: add a flag for automatically growing the FIFO as needed

2022-01-11 Thread Anton Khirnov
This will not increase the FIFO beyond 1MB, unless the caller explicitly specifies otherwise. --- doc/APIchanges | 3 ++- libavutil/fifo.c | 41 +++-- libavutil/fifo.h | 15 ++- 3 files changed, 55 insertions(+), 4 deletions(-) diff --git a/doc/A

[FFmpeg-devel] [PATCH 13/35] lavc/amfenc: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- fftools/ffmpeg_mux.c | 22 +++--- fftools/ffmpeg_opt.c | 2 -- libavcodec/amfenc.c | 39 +-- 3 files changed, 24 insertions(+), 39 deletions(-) diff --git a/fftools/ffmpeg_mux.c b/fftools/ffmpeg_mux.c index 52986b002a..e97d7d50c6 100644 --

[FFmpeg-devel] [PATCH 23/35] lavf/dvenc: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavformat/dvenc.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index 03b63cff89..b9c9ba236d 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -202,7 +202,7 @@ static void dv_inject_audio(DVMuxCon

[FFmpeg-devel] [PATCH 12/35] lavc/avcodec: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavcodec/avcodec.c | 15 ++- libavcodec/decode.c | 22 -- 2 files changed, 14 insertions(+), 23 deletions(-) diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c index c00a9b2af8..a75bbe721f 100644 --- a/libavcodec/avcodec.c +++ b/libavcodec/avcodec.c @@

[FFmpeg-devel] [PATCH 26/35] lavf/udp: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavformat/udp.c | 28 ++-- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/libavformat/udp.c b/libavformat/udp.c index 83c042d079..4c8f104d9d 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -500,7 +500,7 @@ static void *circular_buffer_task_r

[FFmpeg-devel] [PATCH 22/35] lavf/dvenc: return an error on audio/video desync

2022-01-11 Thread Anton Khirnov
--- libavformat/dvenc.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavformat/dvenc.c b/libavformat/dvenc.c index b76539b59f..03b63cff89 100644 --- a/libavformat/dvenc.c +++ b/libavformat/dvenc.c @@ -255,8 +255,10 @@ static int dv_assemble_frame(AVFormatContext *s

[FFmpeg-devel] [PATCH 28/35] lavd/jack: switch to the new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavdevice/jack.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/libavdevice/jack.c b/libavdevice/jack.c index 0d5465e407..eb75cc9dc6 100644 --- a/libavdevice/jack.c +++ b/libavdevice/jack.c @@ -81,13 +81,14 @@ static int process_callback(jack_nfra

[FFmpeg-devel] [PATCH 29/35] lavu/audio_fifo: drop an unnecessary include

2022-01-11 Thread Anton Khirnov
Nothing in audio_fifo.h uses anything from fifo.h --- libavutil/audio_fifo.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libavutil/audio_fifo.h b/libavutil/audio_fifo.h index d8a9194a8d..9d570b04c0 100644 --- a/libavutil/audio_fifo.h +++ b/libavutil/audio_fifo.h @@ -28,7 +28,6 @@ #define A

[FFmpeg-devel] [PATCH 30/35] lavu/audio_fifo: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavutil/audio_fifo.c | 38 ++ 1 file changed, 14 insertions(+), 24 deletions(-) diff --git a/libavutil/audio_fifo.c b/libavutil/audio_fifo.c index 243efc39e4..1ab0c9bcdc 100644 --- a/libavutil/audio_fifo.c +++ b/libavutil/audio_fifo.c @@ -80,7 +80,7 @@ AV

[FFmpeg-devel] [PATCH 34/35] ffplay: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- fftools/ffplay.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index e7b20be76b..4bef9a6ecc 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -424,19 +424,18 @@ int64_t get_valid_channel_layout(int64_t channel

[FFmpeg-devel] [PATCH 31/35] lavu/threadmessage: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavutil/threadmessage.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libavutil/threadmessage.c b/libavutil/threadmessage.c index 764b7fb813..39d3525a78 100644 --- a/libavutil/threadmessage.c +++ b/libavutil/threadmessage.c @@ -64,7

[FFmpeg-devel] [PATCH 35/35] ffmpeg: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- fftools/ffmpeg.c| 36 ++-- fftools/ffmpeg_filter.c | 12 ++-- 2 files changed, 20 insertions(+), 28 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index c89a95937e..319e295df3 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @

[FFmpeg-devel] [PATCH 33/35] lavfi/vf_deshake_opencl: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavfilter/vf_deshake_opencl.c | 80 ++--- 1 file changed, 24 insertions(+), 56 deletions(-) diff --git a/libavfilter/vf_deshake_opencl.c b/libavfilter/vf_deshake_opencl.c index 9c761ba5ad..c8ad1d2a4a 100644 --- a/libavfilter/vf_deshake_opencl.c +++ b/libavfilter/

[FFmpeg-devel] [PATCH 32/35] lavfi/qsvvpp: switch to new FIFO API

2022-01-11 Thread Anton Khirnov
--- libavfilter/qsvvpp.c | 46 +++- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/libavfilter/qsvvpp.c b/libavfilter/qsvvpp.c index d1218355c7..60da1d47c5 100644 --- a/libavfilter/qsvvpp.c +++ b/libavfilter/qsvvpp.c @@ -40,6 +40,11 @@ st

Re: [FFmpeg-devel] [RFC] QSV: Introduce min Compile-SDK Version and check for Runtime-Versions instead

2022-01-11 Thread Xiang, Haihao
On Mon, 2022-01-03 at 21:53 +, Soft Works wrote: > Hi, > > this is a follow-up to my recently submitted patch: > > “avfilter/vpp_qsv: fix regression on older api versions (e.g. 1.11)” > > That patch only fixes the one important regression from multiple issues which > have been introduced by

Re: [FFmpeg-devel] [PATCH V2] libavcodec/qsvdec.c: using queue count to unref frame

2022-01-11 Thread Xiang, Haihao
On Fri, 2021-03-12 at 06:21 +, Xiang, Haihao wrote: > On Fri, 2021-03-12 at 10:44 +0800, wenbin.c...@intel.com wrote: > > From: "Chen,Wenbin" > > > > MSDK vc1 and av1 sometimes output frame into the same suface, but > > ffmpeg-qsv assume the surface will be used only once, so it will > > unre

Re: [FFmpeg-devel] [PATCH, v2] lavf/vf_deinterlace_vaapi: flush queued frame for field in DeinterlacingBob

2022-01-11 Thread Xiang, Haihao
On Mon, 2022-01-10 at 06:58 +, Xiang, Haihao wrote: > On Sun, 2022-01-09 at 18:32 +, Mark Thompson wrote: > > On 29/12/2021 03:45, Xiang, Haihao wrote: > > > > -Original Message- > > > > From: ffmpeg-devel On Behalf Of Linjie > > > > Fu > > > > Sent: Wednesday, September 18, 2019 1

Re: [FFmpeg-devel] [PATCH] avformat/asfdec: fix crash caused by free wlid pointers

2022-01-11 Thread XiaoYang
At 2022-01-11 17:29:35, "Andreas Rheinhardt" wrote: >Yang Xiao: >> From: Yang Xiao >> >> This commit fixed a crash when seeking wma frames, asf decoder will try to >> demux in function asf_read_pts(). >> Pointer member side_data of AVPacket that allocated by stack may be wild >> pointer.

Re: [FFmpeg-devel] [RFC] QSV: Introduce min Compile-SDK Version and check for Runtime-Versions instead

2022-01-11 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Xiang, > Haihao > Sent: Wednesday, January 12, 2022 3:53 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [RFC] QSV: Introduce min Compile-SDK Version and > check for Runtime-Versions instead > > On Mon, 2022-01-03 at

Re: [FFmpeg-devel] [PATCH v1] avfilter/tonemap_vaapi: set va parameters filters and numbers

2022-01-11 Thread Xiang, Haihao
> -Original Message- > From: ffmpeg-devel On Behalf Of Fei > Wang > Sent: Tuesday, June 30, 2020 09:19 > To: ffmpeg-devel@ffmpeg.org > Cc: Wang, Fei W > Subject: [FFmpeg-devel] [PATCH v1] avfilter/tonemap_vaapi: set va parameters > filters and numbers > > This can fill VAProcPipelinePa

Re: [FFmpeg-devel] [PATCH v1] avfilter/tonemap_vaapi: set va parameters filters and numbers

2022-01-11 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Xiang, > Haihao > Sent: Wednesday, January 12, 2022 5:16 AM > To: FFmpeg development discussions and patches > Cc: Wang, Fei W > Subject: Re: [FFmpeg-devel] [PATCH v1] avfilter/tonemap_vaapi: set va > parameters filters and number

Re: [FFmpeg-devel] [PATCH v5 5/7] avcodec/v4l2_context: resume the decoding process after source change event received.

2022-01-11 Thread Ming Qian
On Tue, 04. Jan 17:41, Andriy Gelman wrote: > On Tue, 04. Jan 17:08, Ming Qian wrote: > > client need to resume the decoding process > > after it dequeues the source change event. > > no matter what's the return value of v4l2_resolution_changed(). > > if the client doesn't resume the decoding proce

[FFmpeg-devel] [PATCH v2] lavc/qsvenc_hevc: add -pic_timing_sei option

2022-01-11 Thread Haihao Xiang
The SDK may insert picture timing SEI for hevc and the code to set mfx parameter has been added in qsvenc, however the corresponding option is missing in the hevc option array Reviewed-by: Limin Wang Signed-off-by: Haihao Xiang --- v2: added option description in the doc doc/encoders.texi

[FFmpeg-devel] [PATCH] Fix setsockopt IP_MULTICAST_TTL on OpenBSD

2022-01-11 Thread Brad Smith
Fix setsockopt() usage on OpenBSD with IP_MULTICAST_TTL. The field type should be an unsigned char on anything but Linux. diff --git a/libavformat/udp.c b/libavformat/udp.c index 180d96a988..29aa865fff 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -163,7 +163,13 @@ static int udp_set_

Re: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When deriving a hwdevice, search for existing device in both directions

2022-01-11 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Mark > Thompson > Sent: Monday, January 10, 2022 9:57 PM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v4 1/1] avutils/hwcontext: When deriving a > hwdevice, search for existing device in both directions > > On

[FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add DisableDeblockingIdc support to qsv

2022-01-11 Thread Wenbin Chen
Add dblk_idc option to 264_qsv and hevc_qsv. Turining on this opion can disable deblocking. Signed-off-by: Wenbin Chen --- doc/encoders.texi | 6 ++ libavcodec/qsvenc.c | 8 libavcodec/qsvenc.h | 3 +++ 3 files changed, 17 insertions(+) diff --git a/doc/encoders.texi b/doc/encode

[FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add low latency P-pyramid support to qsv

2022-01-11 Thread Wenbin Chen
Add low latency P-pyramid support to qsv. This feature relates to command line option "-p_strategy". To enable this flag, user also need to set "-bf" to 0. P-strategy has two modes "1-simple" and "2-pyramid". The details of the two models refer to https://github.com/Intel-Media-SDK/MediaSDK/blob/ma

[FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add max_frame_size support to hevc_qsv

2022-01-11 Thread Wenbin Chen
Add max_frame_size support to hevc_qsv as well. Signed-off-by: Wenbin Chen --- doc/encoders.texi | 3 +++ libavcodec/qsvenc.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index 7cc8be1209..68921fbd40 100644 --- a/doc/encoders.te

[FFmpeg-devel] [PATCH V2] libavcodec/qsvenc: Add transform skip to hevc_qsv

2022-01-11 Thread Wenbin Chen
Add transform_skip option to hevc_qsv. By enabling this option, the transform_skip_enabled_flag in PPS will be set to 1. This option is only supported in the platform newer than ICL. Signed-off-by: Wenbin Chen --- doc/encoders.texi| 3 +++ libavcodec/qsvenc.c | 10 +- libav

Re: [FFmpeg-devel] 5.0 blocking issues

2022-01-11 Thread Lynne
8 Jan 2022, 17:30 by mich...@niedermayer.cc: > Hi all > > This is a simple go/no go call > if you know of something that still should go into 5.0 please reply here > with a list of what you are working on and a timelimit until when you > will be done with it > > if you think everything is ready fo