[FFmpeg-devel] [PATCH v3] avfilter/vf_bwdif_cuda: CUDA accelerated bwdif deinterlacer

2023-06-14 Thread Philip Langdale
I've been sitting on this for 3 1/2 years now(!), and I finally got around to fixing the loose ends and convincing myself that it was correct. It follows the same basic structure as yadif_cuda, including leaving out the edge handling, to avoid expensive branching. Signed-off-by: Philip Langdale

[FFmpeg-devel] [PATCH] avfilter/vf_yadif_cuda: remove unnecessary private struct fields

2023-06-14 Thread Philip Langdale
I'm not sure why I originally did this, but there's no good reason to put pointers to the cuda context and stream in the priv struct. They are directly available in the device context that is already being stored there. Signed-off-by: Philip Langdale --- libavfilter/vf_yadif_cuda.c | 12

[FFmpeg-devel] [PATCH] avcodec: Align AVFrame memory to page size for access via Apple Metal

2023-06-14 Thread Iskandar Safarov
--- libavcodec/get_buffer.c | 52 - 1 file changed, 51 insertions(+), 1 deletion(-) diff --git a/libavcodec/get_buffer.c b/libavcodec/get_buffer.c index a04fd878de..b18af3be4a 100644 --- a/libavcodec/get_buffer.c +++ b/libavcodec/get_buffer.c @@ -33,6

Re: [FFmpeg-devel] [PATCH] avfilter/vf_bwdif: Remove undesireable spatial preference logic

2023-06-14 Thread Thomas Mundt
Lynne schrieb am So., 11. Juni 2023, 20:11: > Jun 11, 2023, 04:53 by phil...@overt.org: > > > On Sat, 25 Mar 2023 00:02:03 +0100 > > Thomas Mundt wrote: > > > >> Hi Philip, > >> > >> Philip Langdale schrieb am Fr., 24. März 2023, > >> 23:21: > >> > >> > bwdif inherited this check from yadif,

Re: [FFmpeg-devel] [PATCH] avformat/avcodec: Add DTS-UHD demuxer and parser, movenc support.

2023-06-14 Thread Roy Funderburk
Hi, I updated the libavcodec patch per Paul Mahol's reviews: dtsuhd_common.c:496 get_bits_long instead of get_bits used for reading 36 bits dtsuhd_common.c:224 get_bits_var changed to accept arrays in VarBits structure, allowing arrays with all values less than 256 to use uint8_t arrays. Also

Re: [FFmpeg-devel] [PATCH] avformat/avcodec: Add DTS-UHD demuxer and parser, movenc support.

2023-06-14 Thread Roy Funderburk
On 6/13/23 11:01 PM, Paul B Mahol wrote: > On Wed, Jun 14, 2023 at 7:37 AM Paul B Mahol wrote: > Also there is no reason to use int for elements in tables when max value > can be lower. > Current table reading/handling code should be completely rewritten to use > get_vlc2(). > And tables split

[FFmpeg-devel] [PATCH] avfilter/af_join: put all inputs to EOF on EOF

2023-06-14 Thread Paul B Mahol
Attached. From a6a50f8d7529e680d6a48719412e0608e3803962 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 30 May 2023 02:35:48 +0200 Subject: [PATCH] avfilter/af_join: put all inputs to EOF on EOF Signed-off-by: Paul B Mahol --- libavfilter/af_join.c | 2 ++ 1 file changed, 2

Re: [FFmpeg-devel] [RFC] [PATCH] avfilter/avfilter: add flag to signal filters that support w/h change

2023-06-14 Thread Nicolas George
Paul B Mahol (12023-06-14): > To flag filters that can work with variable frame size changes > all the time in graph. So no rescalers are need to be inserted or > filtergraph reset. > > Once all such filters are flaged with such capability then code will be > added so auto inserted rescale filter

Re: [FFmpeg-devel] [RFC] [PATCH] avfilter/avfilter: add flag to signal filters that support w/h change

2023-06-14 Thread Paul B Mahol
On Wed, Jun 14, 2023 at 7:05 PM Nicolas George wrote: > Paul B Mahol (12023-06-14): > > Will apply soon. > > A flag connected with no code at all? What is it supposed to do? > To flag filters that can work with variable frame size changes all the time in graph. So no rescalers are need to be

[FFmpeg-devel] [PATCH] avfilter/vf_drawtext: additions

2023-06-14 Thread Paul B Mahol
Set of patches attached extending drawtext filter with libharfbuzz. Will apply if nobody comments within week. From a0243134b4b60205a359c11cec7c237222d65341 Mon Sep 17 00:00:00 2001 From: yethie Date: Fri, 26 May 2023 12:51:05 +0200 Subject: [PATCH 6/8] avfilter/vf_drawtext: implement text

Re: [FFmpeg-devel] [PATCH 12/21] fftools/ffmpeg_filter: reject filtergraphs with zero outputs

2023-06-14 Thread Anton Khirnov
Quoting Paul B Mahol (2023-06-14 19:11:35) > On Wed, Jun 14, 2023 at 7:01 PM Anton Khirnov wrote: > > > Quoting Paul B Mahol (2023-06-14 18:53:52) > > > On Wed, Jun 14, 2023 at 6:51 PM Anton Khirnov wrote: > > > > > > > Nothing useful can be done with them currently. > > > > --- > > > >

Re: [FFmpeg-devel] [PATCH 12/21] fftools/ffmpeg_filter: reject filtergraphs with zero outputs

2023-06-14 Thread Paul B Mahol
On Wed, Jun 14, 2023 at 7:01 PM Anton Khirnov wrote: > Quoting Paul B Mahol (2023-06-14 18:53:52) > > On Wed, Jun 14, 2023 at 6:51 PM Anton Khirnov wrote: > > > > > Nothing useful can be done with them currently. > > > --- > > > fftools/ffmpeg_filter.c | 6 ++ > > > 1 file changed, 6

Re: [FFmpeg-devel] [RFC] [PATCH] avfilter/avfilter: add flag to signal filters that support w/h change

2023-06-14 Thread Nicolas George
Paul B Mahol (12023-06-14): > Will apply soon. A flag connected with no code at all? What is it supposed to do? -- Nicolas George signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH 12/21] fftools/ffmpeg_filter: reject filtergraphs with zero outputs

2023-06-14 Thread Anton Khirnov
Quoting Paul B Mahol (2023-06-14 18:53:52) > On Wed, Jun 14, 2023 at 6:51 PM Anton Khirnov wrote: > > > Nothing useful can be done with them currently. > > --- > > fftools/ffmpeg_filter.c | 6 ++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/fftools/ffmpeg_filter.c

Re: [FFmpeg-devel] [PATCH 04/21] tests/fate: add a test for -streamloop with transcoding video+audio

2023-06-14 Thread Andreas Rheinhardt
Anton Khirnov: > --- > tests/fate/ffmpeg.mak | 6 + > tests/ref/fate/ffmpeg-streamloop-transcode-av | 151 ++ > 2 files changed, 157 insertions(+) > create mode 100644 tests/ref/fate/ffmpeg-streamloop-transcode-av > > diff --git a/tests/fate/ffmpeg.mak

Re: [FFmpeg-devel] [PATCH 12/21] fftools/ffmpeg_filter: reject filtergraphs with zero outputs

2023-06-14 Thread Paul B Mahol
On Wed, Jun 14, 2023 at 6:51 PM Anton Khirnov wrote: > Nothing useful can be done with them currently. > --- > fftools/ffmpeg_filter.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c > index 4f7565e44e..54c7ed1f5c 100644 > ---

Re: [FFmpeg-devel] [FFmpeg-cvslog] fftools/ffmpeg: rework setting sub2video parameters

2023-06-14 Thread Anton Khirnov
Quoting Michael Niedermayer (2023-06-07 21:17:06) > On Wed, May 31, 2023 at 02:26:11PM +, Anton Khirnov wrote: > > ffmpeg | branch: master | Anton Khirnov | Tue May 23 > > 22:54:23 2023 +0200| [20cacfe4936a8d5b643421b5ca93bb098f6b76dd] | > > committer: Anton Khirnov > > > > fftools/ffmpeg:

[FFmpeg-devel] [PATCH 18/21] fftools/ffmpeg_dec: move InputStream.prev_sub to Decoder

2023-06-14 Thread Anton Khirnov
It does not need to be visible outside of decoding code. --- fftools/ffmpeg.h | 4 fftools/ffmpeg_dec.c | 26 ++ fftools/ffmpeg_demux.c | 1 - 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index

[FFmpeg-devel] [PATCH 13/21] fftools/ffmpeg_filter: make configure_filtergraph() static

2023-06-14 Thread Anton Khirnov
It is no longer used outside of ffmpeg_filter. --- fftools/ffmpeg.h| 1 - fftools/ffmpeg_filter.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 8de8e94e31..80d9ab52bc 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 09/21] fftools/ffmpeg_dec: move InputStream.hwaccel_pix_fmt to Decoder

2023-06-14 Thread Anton Khirnov
It is purely decoder-internal state. --- fftools/ffmpeg.h | 2 -- fftools/ffmpeg_dec.c | 8 ++-- fftools/ffmpeg_demux.c | 2 -- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 2559225dd6..3c7e819507 100644 --- a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 16/21] fftools/ffmpeg_dec: move decoding to a separate thread

2023-06-14 Thread Anton Khirnov
This is only a preparatory step to a fully threaded architecture and does not yet make decoding truly parallel - the main thread will currently submit a packet and wait until it has been fully processed by the decoding thread before moving on. Decoded behavior as observed by the rest of the

[FFmpeg-devel] [PATCH 11/21] fftools/ffmpeg_filter: add an AVClass to FilterGraph

2023-06-14 Thread Anton Khirnov
Use it for logging. --- fftools/ffmpeg.h| 1 + fftools/ffmpeg_filter.c | 59 + 2 files changed, 43 insertions(+), 17 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 3c7e819507..8de8e94e31 100644 --- a/fftools/ffmpeg.h +++

[FFmpeg-devel] [PATCH 15/21] fftools/ffmpeg: attach bits_per_raw_sample information to frames

2023-06-14 Thread Anton Khirnov
This way avoids encoders reaching into filters or decoders for this information. --- fftools/ffmpeg.h | 7 ++- fftools/ffmpeg_dec.c | 21 ++--- fftools/ffmpeg_enc.c | 13 ++--- fftools/ffmpeg_filter.c | 27 ++-

[FFmpeg-devel] [PATCH 05/21] fftools/ffmpeg_demux: move the loop out of add_input_streams()

2023-06-14 Thread Anton Khirnov
Make the function process just one input stream at a time and save an indentation level. Also rename it to ist_add() to be consistent with an analogous function in ffmpeg_mux_init. --- fftools/ffmpeg_demux.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git

[FFmpeg-devel] [PATCH 08/21] fftools/ffmpeg_dec: remove pointless InputStream.hwaccel_retrieve_data

2023-06-14 Thread Anton Khirnov
It is always set to hwaccel_retrieve_data() from ffmpeg_hw.c, so that function can just be called directly instead. --- fftools/ffmpeg.h | 1 - fftools/ffmpeg_dec.c | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index

[FFmpeg-devel] [PATCH 21/21] fftools/ffmpeg: pass subtitle decoder dimensions to sub2video

2023-06-14 Thread Anton Khirnov
Restores behavior from before 20cacfe4936a8d5b643421b5ca93bb098f6b76dd. Eventually this should be handled similarly to audio/video - with a filtergraph reset or a manual scaler. --- fftools/ffmpeg_dec.c| 3 +++ fftools/ffmpeg_filter.c | 3 +++ 2 files changed, 6 insertions(+) diff --git

[FFmpeg-devel] [PATCH 10/21] fftools/ffmpeg_enc: move dup_warning global variable to Encoder

2023-06-14 Thread Anton Khirnov
--- fftools/ffmpeg_enc.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 2bf4782a9f..0fdf7e7c4d 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -66,11 +66,11 @@ struct Encoder { // number of

[FFmpeg-devel] [PATCH 19/21] fftools/ffmpeg_enc: constify the subtitle passed to enc_subtitle()

2023-06-14 Thread Anton Khirnov
--- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_enc.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 63ca542337..3da5bc4f7c 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -816,7 +816,7 @@ int enc_alloc(Encoder **penc,

[FFmpeg-devel] [PATCH 12/21] fftools/ffmpeg_filter: reject filtergraphs with zero outputs

2023-06-14 Thread Anton Khirnov
Nothing useful can be done with them currently. --- fftools/ffmpeg_filter.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 4f7565e44e..54c7ed1f5c 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -845,6 +845,12

[FFmpeg-devel] [PATCH 17/21] fftools/ffmpeg: move fix_sub_duration_heartbeat() to ffmpeg_dec

2023-06-14 Thread Anton Khirnov
This way ffmpeg.c does not need to access InputStream.prev_sub and it can be made private. --- fftools/ffmpeg.c | 18 -- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_dec.c | 20 +++- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git

[FFmpeg-devel] [PATCH 07/21] fftools/ffmpeg_hw: inline hwaccel_decode_init() into its caller

2023-06-14 Thread Anton Khirnov
The function is now trivial and cannot fail, so all error handling in its caller can be removed. --- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_dec.c | 15 +-- fftools/ffmpeg_hw.c | 11 +-- 3 files changed, 3 insertions(+), 25 deletions(-) diff --git a/fftools/ffmpeg.h

[FFmpeg-devel] [PATCH 20/21] fftools/ffmpeg: use AVFrame to pass subtitles from decoders to filters

2023-06-14 Thread Anton Khirnov
Allows to use the same buffering code for all media types. Will also be important for the following commit. --- fftools/ffmpeg.h| 2 +- fftools/ffmpeg_dec.c| 88 ++--- fftools/ffmpeg_filter.c | 51 ++-- 3 files changed, 70

[FFmpeg-devel] [PATCH 06/21] fftools/ffmpeg_demux: reindent after previous commit

2023-06-14 Thread Anton Khirnov
--- fftools/ffmpeg_demux.c | 390 - 1 file changed, 195 insertions(+), 195 deletions(-) diff --git a/fftools/ffmpeg_demux.c b/fftools/ffmpeg_demux.c index ea407d1f28..84c286dd65 100644 --- a/fftools/ffmpeg_demux.c +++ b/fftools/ffmpeg_demux.c @@ -1035,231

[FFmpeg-devel] [PATCH 14/21] fftools/ffmpeg_dec: stop using Decoder.pkt

2023-06-14 Thread Anton Khirnov
It is only used for flushing the subtitle decoder, so allocate a dedicated packet for that. Keep Decoder.pkt unused for now, it will be repurposed in future commits. --- fftools/ffmpeg_dec.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git

[FFmpeg-devel] [PATCH 04/21] tests/fate: add a test for -streamloop with transcoding video+audio

2023-06-14 Thread Anton Khirnov
--- tests/fate/ffmpeg.mak | 6 + tests/ref/fate/ffmpeg-streamloop-transcode-av | 151 ++ 2 files changed, 157 insertions(+) create mode 100644 tests/ref/fate/ffmpeg-streamloop-transcode-av diff --git a/tests/fate/ffmpeg.mak b/tests/fate/ffmpeg.mak index

[FFmpeg-devel] [PATCH 03/21] tests/fate: rename ffmpeg-streamloop to ffmpeg-streamloop-copy

2023-06-14 Thread Anton Khirnov
Makes it clear that this tests -streamloop with streamcopy, to distinguish it from further -streamloop tests added in future commits. --- tests/fate/ffmpeg.mak| 4 ++-- tests/ref/fate/{ffmpeg-streamloop => ffmpeg-streamloop-copy} | 0 2 files changed, 2

[FFmpeg-devel] [PATCH 02/21] fftools/ffmpeg_dec: simplify process_subtitle()

2023-06-14 Thread Anton Khirnov
Its got_output argument always points to 1. --- fftools/ffmpeg.c | 3 +-- fftools/ffmpeg.h | 2 +- fftools/ffmpeg_dec.c | 9 + 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index d62ccc56c9..45e71ed626 100644 ---

[FFmpeg-devel] [PATCH 01/21] fftools/ffmpeg_dec: drop always-0 InputStream.prev_sub.ret

2023-06-14 Thread Anton Khirnov
--- fftools/ffmpeg.h | 1 - fftools/ffmpeg_dec.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 88e3516243..7b38812f74 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -365,7 +365,6 @@ typedef struct InputStream {

Re: [FFmpeg-devel] [RFC] [PATCH] avfilter/avfilter: add flag to signal filters that support w/h change

2023-06-14 Thread Paul B Mahol
Will apply soon. ___ 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] pthread_frame: uninit the hwaccel of each frame thread

2023-06-14 Thread Lynne
Jun 13, 2023, 04:11 by d...@lynne.ee: > The issue is that with a threadsafe hwaccel and multiple enabled > frame threads, hwaccel->uninit() is never called. > Previously, the function was guaranteed to never have any threads > with hwaccel contexts, so it never bothered to uninit it. > > Patch

Re: [FFmpeg-devel] [PATCH] lavc/h264chroma: RISC-V V add motion compensation for 4xH and 2xH chroma blocks

2023-06-14 Thread Rémi Denis-Courmont
Le perjantaina 9. kesäkuuta 2023, 10.17.27 EEST Arnie Chang a écrit : > Optimize the put and avg filtering for 4xH and 2xH blocks > > Signed-off-by: Arnie Chang > --- > checkasm: using random seed 3475799765 > RVVi32: > - h264chroma.chroma_mc [OK] > checkasm: all 6 tests passed >

Re: [FFmpeg-devel] [PATCH v1 3/4] libavcodec/webp: add support for animated WebP decoding

2023-06-14 Thread Thilo Borgmann
Am 14.06.23 um 04:04 schrieb James Zern: On Thu, Jun 8, 2023 at 7:21 AM Thilo Borgmann wrote: From: Josef Zlomek Fixes: 4907 Adds support for decoding of animated WebP. The WebP decoder adds the animation related features according to the specs:

Re: [FFmpeg-devel] [PATCH v1 4/4] avcodec/webp: make init_canvas_frame static

2023-06-14 Thread Thilo Borgmann
Am 14.06.23 um 11:42 schrieb Andreas Rheinhardt: Thilo Borgmann: --- libavcodec/webp.c | 143 +++--- 1 file changed, 71 insertions(+), 72 deletions(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index bee43fcf19..d3e3f85dd3 100644 ---

Re: [FFmpeg-devel] [PATCH v1 1/4] avcodec/webp: move definitions into header

2023-06-14 Thread Thilo Borgmann
Am 14.06.23 um 12:08 schrieb Andreas Rheinhardt: Thilo Borgmann: --- libavcodec/webp.c | 17 +-- libavcodec/webp.h | 55 +++ 2 files changed, 56 insertions(+), 16 deletions(-) create mode 100644 libavcodec/webp.h diff --git

Re: [FFmpeg-devel] [PATCH v1 1/4] avcodec/webp: move definitions into header

2023-06-14 Thread Andreas Rheinhardt
Thilo Borgmann: > --- > libavcodec/webp.c | 17 +-- > libavcodec/webp.h | 55 +++ > 2 files changed, 56 insertions(+), 16 deletions(-) > create mode 100644 libavcodec/webp.h > > diff --git a/libavcodec/webp.c b/libavcodec/webp.c > index

Re: [FFmpeg-devel] [PATCH v1 4/4] avcodec/webp: make init_canvas_frame static

2023-06-14 Thread Andreas Rheinhardt
Thilo Borgmann: > --- > libavcodec/webp.c | 143 +++--- > 1 file changed, 71 insertions(+), 72 deletions(-) > > diff --git a/libavcodec/webp.c b/libavcodec/webp.c > index bee43fcf19..d3e3f85dd3 100644 > --- a/libavcodec/webp.c > +++ b/libavcodec/webp.c >

Re: [FFmpeg-devel] [PATCH] avformat/avcodec: Add DTS-UHD demuxer and parser, movenc support.

2023-06-14 Thread Paul B Mahol
On Wed, Jun 14, 2023 at 8:06 AM Paul B Mahol wrote: > > > On Wed, Jun 14, 2023 at 8:01 AM Paul B Mahol wrote: > >> >> >> On Wed, Jun 14, 2023 at 7:37 AM Paul B Mahol wrote: >> >>> >>> >>> On Wed, Jun 14, 2023 at 2:00 AM Roy Funderburk >>> wrote: >>> On 6/13/23 11:35 AM, Paul B Mahol

Re: [FFmpeg-devel] [PATCH] avformat/avcodec: Add DTS-UHD demuxer and parser, movenc support.

2023-06-14 Thread Paul B Mahol
On Wed, Jun 14, 2023 at 8:01 AM Paul B Mahol wrote: > > > On Wed, Jun 14, 2023 at 7:37 AM Paul B Mahol wrote: > >> >> >> On Wed, Jun 14, 2023 at 2:00 AM Roy Funderburk >> wrote: >> >>> >>> On 6/13/23 11:35 AM, Paul B Mahol wrote: >>> > Doing allocation in probe? >>> > Probing should be very

Re: [FFmpeg-devel] [PATCH] avformat/avcodec: Add DTS-UHD demuxer and parser, movenc support.

2023-06-14 Thread Paul B Mahol
On Wed, Jun 14, 2023 at 7:37 AM Paul B Mahol wrote: > > > On Wed, Jun 14, 2023 at 2:00 AM Roy Funderburk > wrote: > >> >> On 6/13/23 11:35 AM, Paul B Mahol wrote: >> > Doing allocation in probe? >> > Probing should be very fast. >> >> In line 143 of the avformat patch, memory allocation is