[FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread Anton Khirnov
C11 atomics in some configurations (e.g. 64bit operations on ppc64 with GCC) require linking to libatomic. --- Testing welcome, especially in configurations where * libatomic is not present * libatomic is actually needed --- configure | 9 - 1 file changed, 8 insertions(+), 1 deletion(-)

Re: [FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread James Almer
On 1/19/2022 8:54 AM, Anton Khirnov wrote: C11 atomics in some configurations (e.g. 64bit operations on ppc64 with GCC) require linking to libatomic. --- Testing welcome, especially in configurations where * libatomic is not present * libatomic is actually needed --- configure | 9 -

Re: [FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread Andreas Rheinhardt
James Almer: > > > On 1/19/2022 8:54 AM, Anton Khirnov wrote: >> C11 atomics in some configurations (e.g. 64bit operations on ppc64 with >> GCC) require linking to libatomic. >> --- >> Testing welcome, especially in configurations where >> * libatomic is not present >> * libatomic is actually nee

Re: [FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread Anton Khirnov
Quoting James Almer (2022-01-19 13:34:20) > > > On 1/19/2022 8:54 AM, Anton Khirnov wrote: > > C11 atomics in some configurations (e.g. 64bit operations on ppc64 with > > GCC) require linking to libatomic. > > --- > > Testing welcome, especially in configurations where > > * libatomic is not pres

Re: [FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread James Almer
On 1/19/2022 9:40 AM, Anton Khirnov wrote: Quoting James Almer (2022-01-19 13:34:20) On 1/19/2022 8:54 AM, Anton Khirnov wrote: C11 atomics in some configurations (e.g. 64bit operations on ppc64 with GCC) require linking to libatomic. --- Testing welcome, especially in configurations where *

[FFmpeg-devel] [PATCH 1/3] lavu/hwcontext_opencl: clear dangling pointers on map failure

2022-01-19 Thread Anton Khirnov
--- untested --- libavutil/hwcontext_opencl.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavutil/hwcontext_opencl.c b/libavutil/hwcontext_opencl.c index 26a3a24593..40ee611943 100644 --- a/libavutil/hwcontext_opencl.c +++ b/libavutil/hwcontext_opencl.c @@ -2146,6 +2146,7 @@ fail:

[FFmpeg-devel] [PATCH 2/3] lavu/hwcontext_vulkan: clear dangling pointers on map failure

2022-01-19 Thread Anton Khirnov
--- untested --- libavutil/hwcontext_vulkan.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 60a6cf6a91..ae19fc2ab6 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -2927,6 +2927,7 @@ static int v

[FFmpeg-devel] [PATCH 3/3] lavu/hwcontext: clarify behavior on av_hwframe_map() failure

2022-01-19 Thread Anton Khirnov
Clear anything that av_hwframe_map() might have done to the destination frame, but leave caller-provided fields unchanged. --- libavutil/hwcontext.c | 23 +-- libavutil/hwcontext.h | 4 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext.c

Re: [FFmpeg-devel] [PATCH 3/3] lavu/hwcontext: clarify behavior on av_hwframe_map() failure

2022-01-19 Thread James Almer
On 1/19/2022 10:40 AM, Anton Khirnov wrote: Clear anything that av_hwframe_map() might have done to the destination frame, but leave caller-provided fields unchanged. --- libavutil/hwcontext.c | 23 +-- libavutil/hwcontext.h | 4 2 files changed, 25 insertions(+),

Re: [FFmpeg-devel] [PATCH 3/3] lavu/hwcontext: clarify behavior on av_hwframe_map() failure

2022-01-19 Thread Anton Khirnov
Quoting James Almer (2022-01-19 14:45:12) > > > On 1/19/2022 10:40 AM, Anton Khirnov wrote: > > Clear anything that av_hwframe_map() might have done to the destination > > frame, but leave caller-provided fields unchanged. > > --- > > libavutil/hwcontext.c | 23 +-- > > lib

[FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread Anton Khirnov
C11 atomics in some configurations (e.g. 64bit operations on ppc64 with GCC) require linking to libatomic. Fixes #9275 --- configure | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/configure b/configure index 1413122d87..3059c154df 100755 --- a/confi

[FFmpeg-devel] [PATCH] lavu/hwcontext: clarify behavior on av_hwframe_map() failure

2022-01-19 Thread Anton Khirnov
Clear anything that av_hwframe_map() might have done to the destination frame, but leave caller-provided fields unchanged. --- Interdiff: diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c index ae33da1262..ab9ad3703e 100644 --- a/libavutil/hwcontext.c +++ b/libavutil/hwcontext.c

[FFmpeg-devel] [PATCH 0/5] macos avdevice fixes and improvements

2022-01-19 Thread Romain Beauxis
This is a follow-up from a previous series of patches that fix, enhance and cleanup support for audio and video input on macos in libavdevice. Due to some important recent refactoring and addition, version is reset. Patches: libavdevice/avfoundation.m: use setAudioSettings, extend supported form

[FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Romain Beauxis
This patch switches the logic around audio settings to let the caller drive the format. After experimenting with the AudioConverter, we realized that, even when adhering to a strict implementation of the documented API, we were still getting errors during conversions. The input device would ran

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Marvin Scholz
On 19 Jan 2022, at 15:23, Romain Beauxis wrote: This patch switches the logic around audio settings to let the caller drive the format. Hi, just a quick technical feedback, with the patch sent as attachment it now finally applies fine for me, thanks! After experimenting with the AudioConv

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Andreas Rheinhardt
Romain Beauxis: > This patch switches the logic around audio settings to let the caller drive > the > format. > > After experimenting with the AudioConverter, we realized that, even when > adhering to a strict implementation of the documented API, we were still > getting > errors during conve

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Gyan Doshi
On 2022-01-19 07:53 pm, Romain Beauxis wrote: This patch switches the logic around audio settings to let the caller drive the format. After experimenting with the AudioConverter, we realized that, even when adhering to a strict implementation of the documented API, we were still getting err

[FFmpeg-devel] [PATCH 2/5] libavdevice/avfoundation.m: Replace mutex-based concurrency by a thread-safe fifo queue with maximum length

2022-01-19 Thread Romain Beauxis
The existing implementation of avdevice input has issues in its concurrent model as it only allows for one shared frame between writing and reading threads. This means that, if reading thread gets late, frames get dropped, resulting in corrupted input. This patch changes the concurrency logic t

[FFmpeg-devel] [PATCH 3/5] libavdevice/avfoundation.m: Allow to select devices by unique ID

2022-01-19 Thread Romain Beauxis
This patch changes the logic around device selection to allow to use a static, machine-readable unique ID when selecting devices. Device names depends on locale settings and device index can change when plugging/unplugging devices. --- Begin Message --- From bf72d48c846f5116866ec588fc0ee54a2c354

[FFmpeg-devel] [PATCH 4/5] Use appropriate method for device discovery.

2022-01-19 Thread Romain Beauxis
This adds support for the non-deprecated methods for selecting devices, when available. --- Begin Message --- From c42612b455289622edb638436b1892e43279d8ac Mon Sep 17 00:00:00 2001 From: Romain Beauxis Date: Fri, 14 Jan 2022 10:06:08 -0600 Subject: [PATCH] Use appropriate method for device disco

[FFmpeg-devel] [PATCH 5/5] Add AudioToolbox audio input device.

2022-01-19 Thread Romain Beauxis
This patch adds support for a new, audio-specific input device using the documented and battle-tested AUHAL input. This provides a pendant to the AudioToolbox audio-only output. A couple of advantages for this: * It avoids a lot of the complexity of supporting audio and video in a single input

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Romain Beauxis
Le mer. 19 janv. 2022 à 08:31, Gyan Doshi a écrit : > On 2022-01-19 07:53 pm, Romain Beauxis wrote: > > This patch switches the logic around audio settings to let the caller drive > > the format. > > > > After experimenting with the AudioConverter, we realized that, even when > > adhering to a s

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Gyan Doshi
On 2022-01-19 08:44 pm, Romain Beauxis wrote: Le mer. 19 janv. 2022 à 08:31, Gyan Doshi a écrit : On 2022-01-19 07:53 pm, Romain Beauxis wrote: This patch switches the logic around audio settings to let the caller drive the format. After experimenting with the AudioConverter, we realized t

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Romain Beauxis
Le mer. 19 janv. 2022 à 09:19, Gyan Doshi a écrit : > On 2022-01-19 08:44 pm, Romain Beauxis wrote: > > Le mer. 19 janv. 2022 à 08:31, Gyan Doshi a écrit : > >> On 2022-01-19 07:53 pm, Romain Beauxis wrote: > >>> This patch switches the logic around audio settings to let the caller > >>> drive t

Re: [FFmpeg-devel] [PATCH] configure: link to libatomic when it's present

2022-01-19 Thread James Almer
On 1/19/2022 10:48 AM, Anton Khirnov wrote: C11 atomics in some configurations (e.g. 64bit operations on ppc64 with GCC) require linking to libatomic. Fixes #9275 --- configure | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/configure b/configure

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Gyan Doshi
On 2022-01-19 08:51 pm, Romain Beauxis wrote: Le mer. 19 janv. 2022 à 09:19, Gyan Doshi a écrit : On 2022-01-19 08:44 pm, Romain Beauxis wrote: Le mer. 19 janv. 2022 à 08:31, Gyan Doshi a écrit : On 2022-01-19 07:53 pm, Romain Beauxis wrote: This patch switches the logic around audio sett

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Romain Beauxis
Le mer. 19 janv. 2022 à 09:45, Gyan Doshi a écrit : > On 2022-01-19 08:51 pm, Romain Beauxis wrote: > > Le mer. 19 janv. 2022 à 09:19, Gyan Doshi a écrit : > >> On 2022-01-19 08:44 pm, Romain Beauxis wrote: > >>> Le mer. 19 janv. 2022 à 08:31, Gyan Doshi a écrit : > On 2022-01-19 07:53 pm,

Re: [FFmpeg-devel] [PATCH 1/5] libavdevice/avfoundation.m: use setAudioSettings, extend supported formats

2022-01-19 Thread Thilo Borgmann
Am 19.01.22 um 15:28 schrieb Andreas Rheinhardt: Romain Beauxis: This patch switches the logic around audio settings to let the caller drive the format. After experimenting with the AudioConverter, we realized that, even when adhering to a strict implementation of the documented API, we were st

Re: [FFmpeg-devel] [PATCH 5/5] Add AudioToolbox audio input device.

2022-01-19 Thread Marvin Scholz
On 19 Jan 2022, at 15:42, Romain Beauxis wrote: Hi, thanks for the patch. I've not done a full code review yet, just a few initial remarks below: This patch adds support for a new, audio-specific input device using the documented and battle-tested AUHAL input. This provides a pendant to th

Re: [FFmpeg-devel] [PATCH 274/281] swresample: convert to new channel layout API

2022-01-19 Thread Andreas Rheinhardt
James Almer: > Signed-off-by: James Almer > --- > libswresample/options.c | 33 +++- > libswresample/rematrix.c| 237 ++-- > libswresample/rematrix_template.c | 7 +- > libswresample/swresample.c | 152 +++--- > libswresamp

Re: [FFmpeg-devel] [PATCH 274/281] swresample: convert to new channel layout API

2022-01-19 Thread James Almer
On 1/19/2022 2:20 PM, Andreas Rheinhardt wrote: James Almer: Signed-off-by: James Almer --- libswresample/options.c | 33 +++- libswresample/rematrix.c| 237 ++-- libswresample/rematrix_template.c | 7 +- libswresample/swresample.c

Re: [FFmpeg-devel] [PATCH 001/289 v6] Add a new channel layout API

2022-01-19 Thread Andreas Rheinhardt
James Almer: > From: Anton Khirnov > > The new API is more extensible and allows for custom layouts. > More accurate information is exported, eg for decoders that do not > set a channel layout, lavc will not make one up for them. > > Deprecate the old API working with just uint64_t bitmasks. >

Re: [FFmpeg-devel] [PATCH] avfilter/vf_libvmaf: update filter for libvmaf v2.0.0

2022-01-19 Thread Kyle Swanson
Hi, On Thu, Jan 13, 2022 at 6:38 PM Kyle Swanson wrote: > > Hi, > > On Mon, Jan 10, 2022 at 10:22 AM Andreas Rheinhardt > wrote: > > 1. FFmpeg uses the ancient C90 rule that only allows variable > > declarations at the beginning of a block (before all statements). You > > should actually have re

[FFmpeg-devel] [PATCH] avfilter/adelay: Add command support

2022-01-19 Thread David Lacko
Adds command 'delays' to the adelay filter. This command accepts same values as option with one difference, to apply delay to all channels prefix 'all:' to the arguments is accepted. Signed-off-by: David Lacko --- libavfilter/af_adelay.c | 183 ++-- 1 file cha

Re: [FFmpeg-devel] [PATCH 109/281] mxf: convert to new channel layout API

2022-01-19 Thread Tomas Härdin
ons 2022-01-12 klockan 22:56 -0300 skrev James Almer: > From: Vittorio Giovara > > Signed-off-by: Vittorio Giovara > Signed-off-by: Anton Khirnov > Signed-off-by: James Almer > --- >  libavformat/mxfdec.c | 34 +- >  libavformat/mxfenc.c | 20 +++-

Re: [FFmpeg-devel] [PATCH] avfilter/adelay: Add command support

2022-01-19 Thread Andreas Rheinhardt
David Lacko: > Adds command 'delays' to the adelay filter. > This command accepts same values as option with one difference, to apply > delay to all channels prefix 'all:' to the arguments is accepted. > > Signed-off-by: David Lacko > --- > libavfilter/af_adelay.c | 183 +

[FFmpeg-devel] [PATCH 1/2] libfdk-aacdec: Add an option for setting the decoder's DRC album mode

2022-01-19 Thread Martin Storsjö
--- libavcodec/libfdk-aacdec.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/libfdk-aacdec.c b/libavcodec/libfdk-aacdec.c index ffa1fdcce3..93b52023b0 100644 --- a/libavcodec/libfdk-aacdec.c +++ b/libavcodec/libfdk-aacdec.c @@ -56,6 +56,7 @@ typedef struct FDKAACDe

[FFmpeg-devel] [PATCH 2/2] libfdk-aacdec: Flush delayed samples at the end

2022-01-19 Thread Martin Storsjö
Also trim off delay samples at the start instead of adjusting pts to compensate for them; this avoids unwanted offsets if working with raw samples without considering their pts. --- libavcodec/libfdk-aacdec.c | 80 +++--- 1 file changed, 65 insertions(+), 15 deletio

Re: [FFmpeg-devel] [PATCH 001/289 v6] Add a new channel layout API

2022-01-19 Thread Marton Balint
On Tue, 18 Jan 2022, James Almer wrote: From: Anton Khirnov The new API is more extensible and allows for custom layouts. More accurate information is exported, eg for decoders that do not set a channel layout, lavc will not make one up for them. Deprecate the old API working with just uin

[FFmpeg-devel] [PATCH v2 1/6] avformat/mux: Remove assert based on faulty assumptions

2022-01-19 Thread Andreas Rheinhardt
This assert is based upon the wrong assumption that the noninterleaved codepath is never used; if it is used, max_interleave_delta is irrelevant. It furthermore ignores audio_preload. Signed-off-by: Andreas Rheinhardt --- libavformat/mux.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libav

[FFmpeg-devel] [PATCH v2 2/6] fate/matroska: Add test for avoiding negative timestamps

2022-01-19 Thread Andreas Rheinhardt
This tests the issue from tickets #4536, #5784; the output of this test is currently broken. Signed-off-by: Andreas Rheinhardt --- Now only performing codec copy. tests/fate/matroska.mak | 17 + tests/ref/fate/matroska-avoid-negative-ts | 42 +++ 2

[FFmpeg-devel] [PATCH v2 3/6] avformat/avformat: Add AVFMT_AVOID_NEG_TS_DISABLED

2022-01-19 Thread Andreas Rheinhardt
And also don't use explicit constants in the movenc test. Signed-off-by: Andreas Rheinhardt --- libavformat/avformat.h | 1 + libavformat/mux.c | 2 +- libavformat/options_table.h | 2 +- libavformat/tests/movenc.c | 4 ++-- libavformat/webm_chunk.c| 2 +- 5 files changed, 6

[FFmpeg-devel] [PATCH v2 4/6] avformat/mux: Preserve sync even if later packet has negative ts

2022-01-19 Thread Andreas Rheinhardt
write_packet() has code to shift the packets timestamps to make them nonnegative or even make them start at ts zero; this code inspects every packet that is written and if a packet with negative timestamp (whether this is dts or pts depends upon another flag; basically: Matroska uses pts, everyone

[FFmpeg-devel] [PATCH v2 5/6] avformat/mux: Peek into the muxing queue for avoid_negative_ts

2022-01-19 Thread Andreas Rheinhardt
Peeking into the muxing queue can improve the estimate of the lowest timestamp needed for avoid_negative_ts in case the lowest timestamp is in a packet other than the first packet to be muxed. This fixes tickets #4536 and #5784 as well as the output from the matroska-avoid-negative-ts FATE-test. S

[FFmpeg-devel] [PATCH v2 6/6] avformat/hls: Remove redundant cast

2022-01-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 8c526f748f..4568e72cb2 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -2024,7 +2024,7 @@ static int hls_read_header(AV

Re: [FFmpeg-devel] [PATCH 001/289 v6] Add a new channel layout API

2022-01-19 Thread James Almer
On 1/19/2022 5:51 PM, Marton Balint wrote: On Tue, 18 Jan 2022, James Almer wrote: From: Anton Khirnov The new API is more extensible and allows for custom layouts. More accurate information is exported, eg for decoders that do not set a channel layout, lavc will not make one up for them

Re: [FFmpeg-devel] [PATCH 001/289 v6] Add a new channel layout API

2022-01-19 Thread James Almer
On 1/19/2022 3:07 PM, Andreas Rheinhardt wrote: James Almer: From: Anton Khirnov The new API is more extensible and allows for custom layouts. More accurate information is exported, eg for decoders that do not set a channel layout, lavc will not make one up for them. Deprecate the old API

[FFmpeg-devel] [PATCH v2 00/26] Subtitle Filtering 2022

2022-01-19 Thread ffmpegagent
Subtitle Filtering 2022 === This is a substantial update to the earlier subtitle filtering patch series. A primary goal has been to address others' concerns as much as possible on one side and to provide more clarity and control over the way things are working. Clarity is is

[FFmpeg-devel] [PATCH v2 01/26] avcodec, avutil: Move enum AVSubtitleType to avutil, add new and deprecate old values

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/avcodec.h | 19 + libavutil/Makefile | 1 + libavutil/subfmt.h | 68 libavutil/version.h | 1 + 4 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 libavuti

[FFmpeg-devel] [PATCH v2 02/26] avutil/frame: Prepare AVFrame for subtitle handling

2022-01-19 Thread ffmpegagent
From: softworkz Root commit for adding subtitle filtering capabilities. In detail: - Add type (AVMediaType) field to AVFrame Replaces previous way of distinction which was based on checking width and height to determine whether a frame is audio or video - Add subtitle fields to AVFrame - Add

[FFmpeg-devel] [PATCH v2 03/26] avcodec/subtitles: Introduce new frame-based subtitle decoding API

2022-01-19 Thread ffmpegagent
From: softworkz - Modify avcodec_send_packet() to support subtitles via the regular frame based decoding API - Add decode_subtitle_shim() which takes subtitle frames, and serves as a compatibility shim to the legacy subtitle decoding API until all subtitle decoders are migrated to the frame

[FFmpeg-devel] [PATCH v2 04/26] avfilter/subtitles: Update vf_subtitles to use new decoding api

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavfilter/vf_subtitles.c | 56 +- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 3fc4eeb63d..25e217e845 100644 --- a/libavfilter/vf_s

[FFmpeg-devel] [PATCH v2 10/26] avfilter/avfilter: Fix hardcoded input index

2022-01-19 Thread ffmpegagent
From: softworkz This fix targets (rare) cases where multiple input pads have a .filter_frame function. ff_request_frame_to_filter needs to call ff_request_frame with the correct input pad instead of the hardcoded first one. Signed-off-by: softworkz --- libavfilter/avfilter.c | 18 +

[FFmpeg-devel] [PATCH v2 06/26] avcodec/subtitles: Replace deprecated enum values

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/ass.h | 2 +- libavcodec/assdec.c| 2 +- libavcodec/dvbsubdec.c | 2 +- libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/pgssubdec.c | 2 +- libavcodec/xsubdec.c | 2 +- 7 files changed, 7 insertions(+),

[FFmpeg-devel] [PATCH v2 05/26] avcodec, avutil: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing

2022-01-19 Thread ffmpegagent
From: softworkz Also add - hard_space callback (for upcoming fix) - extensible callback (for future extension) Signed-off-by: softworkz --- libavcodec/Makefile | 56 +++ libavcodec/ass.h | 144 ++ libavcodec/assdec.c

[FFmpeg-devel] [PATCH v2 11/26] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- configure| 2 +- libavfilter/allfilters.c | 2 ++ libavfilter/buffersink.c | 54 ++ libavfilter/buffersink.h | 7 libavfilter/buffersrc.c | 72 libavfilter/

[FFmpeg-devel] [PATCH v2 07/26] fftools/play, probe: Adjust for subtitle changes

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- fftools/ffplay.c | 102 +- fftools/ffprobe.c | 47 + 2 files changed, 77 insertions(+), 72 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index e7b20be76b..94286eb678 1

[FFmpeg-devel] [PATCH v2 12/26] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters

2022-01-19 Thread ffmpegagent
From: softworkz - overlaygraphicsubs (VS -> V) Overlay graphic subtitles onto a video stream - graphicsub2video {S -> V) Converts graphic subtitles to video frames (with alpha) Gets auto-inserted for retaining compatibility with sub2video command lines Signed-off-by: softworkz --- doc

[FFmpeg-devel] [PATCH v2 08/26] avfilter/subtitles: Add subtitles.c for subtitle frame allocation

2022-01-19 Thread ffmpegagent
From: softworkz Analog to avfilter/video.c and avfilter/audio.c Signed-off-by: softworkz --- libavfilter/Makefile| 1 + libavfilter/avfilter.c | 4 +++ libavfilter/internal.h | 1 + libavfilter/subtitles.c | 63 + libavfilter/subtitles.h | 44 ++

[FFmpeg-devel] [PATCH v2 13/26] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2022-01-19 Thread ffmpegagent
From: softworkz - overlaytextsubs {VS -> V) Overlay text subtitles onto a video stream. - textsubs2video {S -> V) Converts text subtitles to video frames Signed-off-by: softworkz --- configure| 2 + doc/filters.texi | 113 ++ libavfilter/Makef

[FFmpeg-devel] [PATCH v2 09/26] avfilter/avfilter: Handle subtitle frames

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavfilter/avfilter.c | 8 +--- libavfilter/avfilter.h | 11 +++ libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 22 ++ libavfilter/formats.h | 3 +++ libavfilter/internal.h

[FFmpeg-devel] [PATCH v2 14/26] avfilter/textmod: Add textmod, censor and show_speaker filters

2022-01-19 Thread ffmpegagent
From: softworkz - textmod {S -> S) Modify subtitle text in a number of ways - censor {S -> S) Censor subtitles using a word list - show_speaker {S -> S) Prepend speaker names from ASS subtitles to the visible text lines Signed-off-by: softworkz --- doc/filters.texi | 206 ++

[FFmpeg-devel] [PATCH v2 15/26] avfilter/stripstyles: Add stripstyles filter

2022-01-19 Thread ffmpegagent
From: softworkz - stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- doc/filters.texi | 37 ++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 211

[FFmpeg-devel] [PATCH v2 16/26] avfilter/splitcc: Add splitcc filter for closed caption handling

2022-01-19 Thread ffmpegagent
From: softworkz - splitcc {V -> VS) Extract closed-caption (A53) data from video frames as subtitle Frames ffmpeg -y -loglevel verbose -i "https://streams.videolan.org/streams /ts/CC/NewsStream-608-ac3.ts" -filter_complex "[0:v]splitcc[vid1], textmod=mode=remove_chars:find='@',[vid1]overlay_

[FFmpeg-devel] [PATCH v2 17/26] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- configure|1 + doc/filters.texi | 55 ++ libavfilter/Makefile |2 + libavfilter/allfilters.c |1 + libavfilter/sf_graphicsub2text.c | 1132 ++ 5 fil

[FFmpeg-devel] [PATCH v2 18/26] avfilter/subscale: Add filter for scaling and/or re-arranging graphical subtitles

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 164 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 884 ++ 5 files changed, 1051 insertions

[FFmpeg-devel] [PATCH v2 19/26] avfilter/subfeed: add subtitle feed filter

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subfeed.c | 366 +++ 3 files changed, 368 insertions(+) create mode 100644 libavfilter/sf_subfeed.c diff --git a/libavfilter/Make

[FFmpeg-devel] [PATCH v2 20/26] avcodec/subtitles: Migrate subtitle encoders to frame-based API

2022-01-19 Thread ffmpegagent
From: softworkz and provide a compatibility shim for the legacy api Signed-off-by: softworkz --- libavcodec/assenc.c| 189 ++--- libavcodec/avcodec.h | 5 +- libavcodec/dvbsubenc.c | 96 ++- libavcodec/dvdsubenc.c | 102 +

[FFmpeg-devel] [PATCH v2 22/26] avutil/ass_split: Add parsing of hard-space tags (\h)

2022-01-19 Thread ffmpegagent
From: softworkz The \h tag in ASS/SSA is indicating a non-breaking space. See https://github.com/Aegisub/aegisite/blob/master/source/docs/3.2/ ASS_Tags.html.md The ass_split implementation is used by almost all text subtitle encoders and it didn't handle this tag. Interestingly, several tests ar

[FFmpeg-devel] [PATCH v2 23/26] avcodec/webvttenc: convert hard-space tags to  

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/webvttenc.c | 6 ++ tests/ref/fate/sub-webvttenc | 10 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index c0436f5739..48945dcb8e 100644 --- a/libavcod

[FFmpeg-devel] [PATCH v2 24/26] doc/APIchanges: update for subtitle filtering changes

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- doc/APIchanges | 24 libavcodec/version.h | 2 +- libavutil/version.h | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 8df0364e4c..c8238fb008 100644 --- a/

[FFmpeg-devel] [PATCH v2 25/26] avcodec/webvttenc: Don't encode drawing codes and empty lines

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/webvttenc.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index 48945dcb8e..62c4aa7ffd 100644 --- a/libavcodec/webvttenc.c +++ b/libavco

[FFmpeg-devel] [PATCH v2 26/26] avcodec/dvbsubdec: Fix conditions for fallback to default resolution

2022-01-19 Thread ffmpegagent
From: softworkz The previous code expected a segment of type CLUT definition to exist in order to accept a set of segments to be complete. This was an incorrect assumption as the presence of a CLUT segment is not mandatory. (version 1.6.1 of the spec is probably a bit more clear about this than e

[FFmpeg-devel] [PATCH v3 00/26] Subtitle Filtering 2022

2022-01-19 Thread ffmpegagent
Subtitle Filtering 2022 === This is a substantial update to the earlier subtitle filtering patch series. A primary goal has been to address others' concerns as much as possible on one side and to provide more clarity and control over the way things are working. Clarity is is

[FFmpeg-devel] [PATCH v3 01/26] avcodec, avutil: Move enum AVSubtitleType to avutil, add new and deprecate old values

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/avcodec.h | 19 + libavutil/Makefile | 1 + libavutil/subfmt.h | 68 libavutil/version.h | 1 + 4 files changed, 71 insertions(+), 18 deletions(-) create mode 100644 libavuti

[FFmpeg-devel] [PATCH v3 02/26] avutil/frame: Prepare AVFrame for subtitle handling

2022-01-19 Thread ffmpegagent
From: softworkz Root commit for adding subtitle filtering capabilities. In detail: - Add type (AVMediaType) field to AVFrame Replaces previous way of distinction which was based on checking width and height to determine whether a frame is audio or video - Add subtitle fields to AVFrame - Add

[FFmpeg-devel] [PATCH v3 03/26] avcodec/subtitles: Introduce new frame-based subtitle decoding API

2022-01-19 Thread ffmpegagent
From: softworkz - Modify avcodec_send_packet() to support subtitles via the regular frame based decoding API - Add decode_subtitle_shim() which takes subtitle frames, and serves as a compatibility shim to the legacy subtitle decoding API until all subtitle decoders are migrated to the frame

[FFmpeg-devel] [PATCH v3 09/26] avfilter/avfilter: Handle subtitle frames

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavfilter/avfilter.c | 8 +--- libavfilter/avfilter.h | 11 +++ libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 22 ++ libavfilter/formats.h | 3 +++ libavfilter/internal.h

[FFmpeg-devel] [PATCH v3 04/26] avfilter/subtitles: Update vf_subtitles to use new decoding api

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavfilter/vf_subtitles.c | 56 +- 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 3fc4eeb63d..25e217e845 100644 --- a/libavfilter/vf_s

[FFmpeg-devel] [PATCH v3 10/26] avfilter/avfilter: Fix hardcoded input index

2022-01-19 Thread ffmpegagent
From: softworkz This fix targets (rare) cases where multiple input pads have a .filter_frame function. ff_request_frame_to_filter needs to call ff_request_frame with the correct input pad instead of the hardcoded first one. Signed-off-by: softworkz --- libavfilter/avfilter.c | 18 +

[FFmpeg-devel] [PATCH v3 05/26] avcodec, avutil: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing

2022-01-19 Thread ffmpegagent
From: softworkz Also add - hard_space callback (for upcoming fix) - extensible callback (for future extension) Signed-off-by: softworkz --- libavcodec/Makefile | 56 +++ libavcodec/ass.h | 144 ++ libavcodec/assdec.c

[FFmpeg-devel] [PATCH v3 06/26] avcodec/subtitles: Replace deprecated enum values

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/ass.h | 2 +- libavcodec/assdec.c| 2 +- libavcodec/dvbsubdec.c | 2 +- libavcodec/dvdsubdec.c | 2 +- libavcodec/dvdsubenc.c | 2 +- libavcodec/pgssubdec.c | 2 +- libavcodec/xsubdec.c | 2 +- 7 files changed, 7 insertions(+),

[FFmpeg-devel] [PATCH v3 11/26] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- configure| 2 +- libavfilter/allfilters.c | 2 ++ libavfilter/buffersink.c | 54 ++ libavfilter/buffersink.h | 7 libavfilter/buffersrc.c | 72 libavfilter/

[FFmpeg-devel] [PATCH v3 07/26] fftools/play, probe: Adjust for subtitle changes

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- fftools/ffplay.c | 102 +- fftools/ffprobe.c | 47 + 2 files changed, 77 insertions(+), 72 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index e7b20be76b..94286eb678 1

[FFmpeg-devel] [PATCH v3 12/26] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters

2022-01-19 Thread ffmpegagent
From: softworkz - overlaygraphicsubs (VS -> V) Overlay graphic subtitles onto a video stream - graphicsub2video {S -> V) Converts graphic subtitles to video frames (with alpha) Gets auto-inserted for retaining compatibility with sub2video command lines Signed-off-by: softworkz --- doc

[FFmpeg-devel] [PATCH v3 08/26] avfilter/subtitles: Add subtitles.c for subtitle frame allocation

2022-01-19 Thread ffmpegagent
From: softworkz Analog to avfilter/video.c and avfilter/audio.c Signed-off-by: softworkz --- libavfilter/Makefile| 1 + libavfilter/avfilter.c | 4 +++ libavfilter/internal.h | 1 + libavfilter/subtitles.c | 63 + libavfilter/subtitles.h | 44 ++

[FFmpeg-devel] [PATCH v3 13/26] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2022-01-19 Thread ffmpegagent
From: softworkz - overlaytextsubs {VS -> V) Overlay text subtitles onto a video stream. - textsubs2video {S -> V) Converts text subtitles to video frames Signed-off-by: softworkz --- configure| 2 + doc/filters.texi | 113 ++ libavfilter/Makef

[FFmpeg-devel] [PATCH v3 14/26] avfilter/textmod: Add textmod, censor and show_speaker filters

2022-01-19 Thread ffmpegagent
From: softworkz - textmod {S -> S) Modify subtitle text in a number of ways - censor {S -> S) Censor subtitles using a word list - show_speaker {S -> S) Prepend speaker names from ASS subtitles to the visible text lines Signed-off-by: softworkz --- doc/filters.texi | 206 ++

[FFmpeg-devel] [PATCH v3 15/26] avfilter/stripstyles: Add stripstyles filter

2022-01-19 Thread ffmpegagent
From: softworkz - stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- doc/filters.texi | 37 ++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 211

[FFmpeg-devel] [PATCH v3 16/26] avfilter/splitcc: Add splitcc filter for closed caption handling

2022-01-19 Thread ffmpegagent
From: softworkz - splitcc {V -> VS) Extract closed-caption (A53) data from video frames as subtitle Frames ffmpeg -y -loglevel verbose -i "https://streams.videolan.org/streams /ts/CC/NewsStream-608-ac3.ts" -filter_complex "[0:v]splitcc[vid1], textmod=mode=remove_chars:find='@',[vid1]overlay_

[FFmpeg-devel] [PATCH v3 17/26] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- configure|1 + doc/filters.texi | 55 ++ libavfilter/Makefile |2 + libavfilter/allfilters.c |1 + libavfilter/sf_graphicsub2text.c | 1132 ++ 5 fil

[FFmpeg-devel] [PATCH v3 18/26] avfilter/subscale: Add filter for scaling and/or re-arranging graphical subtitles

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 164 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 884 ++ 5 files changed, 1051 insertions

[FFmpeg-devel] [PATCH v3 19/26] avfilter/subfeed: add subtitle feed filter

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subfeed.c | 366 +++ 3 files changed, 368 insertions(+) create mode 100644 libavfilter/sf_subfeed.c diff --git a/libavfilter/Make

[FFmpeg-devel] [PATCH v3 20/26] avcodec/subtitles: Migrate subtitle encoders to frame-based API

2022-01-19 Thread ffmpegagent
From: softworkz and provide a compatibility shim for the legacy api Signed-off-by: softworkz --- libavcodec/assenc.c| 189 ++--- libavcodec/avcodec.h | 5 +- libavcodec/dvbsubenc.c | 96 ++- libavcodec/dvdsubenc.c | 102 +

[FFmpeg-devel] [PATCH v3 22/26] avutil/ass_split: Add parsing of hard-space tags (\h)

2022-01-19 Thread ffmpegagent
From: softworkz The \h tag in ASS/SSA is indicating a non-breaking space. See https://github.com/Aegisub/aegisite/blob/master/source/docs/3.2/ ASS_Tags.html.md The ass_split implementation is used by almost all text subtitle encoders and it didn't handle this tag. Interestingly, several tests ar

[FFmpeg-devel] [PATCH v3 23/26] avcodec/webvttenc: convert hard-space tags to  

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/webvttenc.c | 6 ++ tests/ref/fate/sub-webvttenc | 10 +- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index c0436f5739..48945dcb8e 100644 --- a/libavcod

[FFmpeg-devel] [PATCH v3 24/26] doc/APIchanges: update for subtitle filtering changes

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- doc/APIchanges | 24 libavcodec/version.h | 2 +- libavutil/version.h | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 8df0364e4c..c8238fb008 100644 --- a/

[FFmpeg-devel] [PATCH v3 25/26] avcodec/webvttenc: Don't encode drawing codes and empty lines

2022-01-19 Thread ffmpegagent
From: softworkz Signed-off-by: softworkz --- libavcodec/webvttenc.c | 31 +++ 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/libavcodec/webvttenc.c b/libavcodec/webvttenc.c index 48945dcb8e..62c4aa7ffd 100644 --- a/libavcodec/webvttenc.c +++ b/libavco

[FFmpeg-devel] [PATCH v3 26/26] avcodec/dvbsubdec: Fix conditions for fallback to default resolution

2022-01-19 Thread ffmpegagent
From: softworkz The previous code expected a segment of type CLUT definition to exist in order to accept a set of segments to be complete. This was an incorrect assumption as the presence of a CLUT segment is not mandatory. (version 1.6.1 of the spec is probably a bit more clear about this than e

[FFmpeg-devel] [PATCH] libavcodec/qsvenc: fix a memory leak problem

2022-01-19 Thread Wenbin Chen
"qf->frame" ref to input frame but it isn't released. av_frame_unref() is added before refering qf->frame to new frame to make sure the previous reference is released. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvenc.c b/lib

  1   2   >