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

2021-10-20 Thread Soft Works
Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 159 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 883 ++ 5 files changed, 1045 insertions(+) create mode 1

[FFmpeg-devel] [PATCH v14 13/14] avfilter/graphicsub2text: Add new graphicsub2text filter (OCR)

2021-10-20 Thread Soft Works
Signed-off-by: softworkz --- configure| 1 + doc/filters.texi | 55 ++ libavfilter/Makefile | 2 + libavfilter/allfilters.c | 1 + libavfilter/sf_graphicsub2text.c | 323 +++ 5 files changed, 382 in

[FFmpeg-devel] [PATCH v14 12/14] avfilter/splitcc: Add splitcc filter for closed caption handling

2021-10-20 Thread Soft Works
- 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_textsubs" outpu

[FFmpeg-devel] [PATCH v14 11/14] avfilter/stripstyles: Add stripstyles filter

2021-10-20 Thread Soft Works
- stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- doc/filters.texi | 34 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 191 +++ 4 fi

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

2021-10-20 Thread Soft Works
- 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 | 211 libavfilte

[FFmpeg-devel] [PATCH v14 08/14] fftools/ffmpeg: Replace sub2video with subtitle frame filtering

2021-10-20 Thread Soft Works
This commit actually enables subtitle filtering in ffmpeg by sending and receiving subtitle frames to and from a filtergraph. The heartbeat functionality from the previous sub2video implementation is retained and applied to all subtitle frames (bitmap, text, ..). The other part of sub2video funct

[FFmpeg-devel] [PATCH v14 09/14] avfilter/overlaytextsubs: Add overlaytextsubs and textsubs2video filters

2021-10-20 Thread Soft Works
- 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/Makefile |

[FFmpeg-devel] [PATCH v14 07/14] avfilter/overlaygraphicsubs: Add overlaygraphicsubs and graphicsub2video filters

2021-10-20 Thread Soft Works
- 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/filters.texi

[FFmpeg-devel] [PATCH v14 06/14] avfilter/sbuffer: Add sbuffersrc and sbuffersink filters

2021-10-20 Thread Soft Works
Signed-off-by: softworkz --- configure| 2 +- libavfilter/allfilters.c | 2 ++ libavfilter/buffersink.c | 63 +++ libavfilter/buffersink.h | 15 + libavfilter/buffersrc.c | 72 libavfilter/buffersr

[FFmpeg-devel] [PATCH v14 05/14] avfilter/avfilter: Handle subtitle frames

2021-10-20 Thread Soft Works
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 | 18 +++

[FFmpeg-devel] [PATCH v14 04/14] avfilter/subtitles: Add subtitles.c for subtitle frame allocation

2021-10-20 Thread Soft Works
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 v14 03/14] fftools/play, probe: Adjust for subtitle changes

2021-10-20 Thread Soft Works
Signed-off-by: softworkz --- fftools/ffplay.c | 102 +- fftools/ffprobe.c | 48 ++ 2 files changed, 78 insertions(+), 72 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index ccea0e4578..e8d36485ae 100644 --- a/fftoo

[FFmpeg-devel] [PATCH v14 02/14] global: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing

2021-10-20 Thread Soft Works
Signed-off-by: softworkz --- libavcodec/Makefile | 56 +++ libavcodec/ass.h | 129 libavcodec/assdec.c | 2 +- libavcodec/assenc.c | 2 +- libavcodec/ccaption_dec.c

[FFmpeg-devel] [PATCH v14 01/14] global: Prepare AVFrame for subtitle handling

2021-10-20 Thread Soft Works
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 new struct AVSubt

[FFmpeg-devel] [PATCH v14 00/14] Subtitle Filtering

2021-10-20 Thread Soft Works
v14 Update: - FEATURE-COMPLETE Fixes: - get_subtitle_buffer: set extended data - overlaygraphicsubs: copy time base from input - subtitle_heartbeat: Fix pts when re-sending - subtitle_heartbeat: only beat on video stream timing - subtitle_heartbeat: propagate beat over all input files - overlay t

Re: [FFmpeg-devel] [PATCH v1] libavcodec/flac_parser: Validate subframe zero bit and type

2021-10-20 Thread Michael Niedermayer
On Wed, Oct 13, 2021 at 06:15:26PM +0200, Mattias Wadman wrote: > Reduces the risk of finding false frames that happens to have valid values > and CRC. > > Fixes ticket #9185 ffmpeg flac decoder incorrectly finds junk frame > https://trac.ffmpeg.org/ticket/9185 > --- > libavcodec/flac_parser.c |

Re: [FFmpeg-devel] [PATCH] avutil/mathematics: Document av_rescale_rnd() behavior on non int64 results

2021-10-20 Thread Derek Buitenhuis
On 10/20/2021 7:24 PM, Michael Niedermayer wrote: > * The operation is mathematically equivalent to `a * b / c`, but writing > that > * directly can overflow, and does not support different rounding methods. > + * If the result is not representable then INT64_MIN is returned. Seems reasonable

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: Use av_rescale when calculating bit rate

2021-10-20 Thread Derek Buitenhuis
On 10/20/2021 7:30 PM, Michael Niedermayer wrote: > Does something ensure time_scale * 8 fits in int ? if not this needs a cast > to *int64_t You're right, this could break on systems with 32-bit int. v2 sent. - erek ___ ffmpeg-devel mailing list ffmp

[FFmpeg-devel] [PATCH 1/2 v2] avformat/mov: Use av_rescale when calculating bit rate

2021-10-20 Thread Derek Buitenhuis
It is less susceptible to overflows. Signed-off-by: Derek Buitenhuis --- libavformat/mov.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 57c67e3aac..841818b547 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: Use av_rescale when calculating bit rate

2021-10-20 Thread Michael Niedermayer
On Wed, Oct 20, 2021 at 03:03:53PM +0100, Derek Buitenhuis wrote: > It is less susceptible to overflows. > > Signed-off-by: Derek Buitenhuis > --- > libavformat/mov.c | 13 - > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/libavformat/mov.c b/libavformat/mov.c > i

Re: [FFmpeg-devel] [PATCH v2] avcodec/libjxl: add JPEG XL decoding via libjxl

2021-10-20 Thread Michael Niedermayer
On Wed, Oct 20, 2021 at 01:33:57PM -0400, Leo Izen wrote: [...] > --- a/libavformat/img2dec.c > +++ b/libavformat/img2dec.c > @@ -830,6 +830,16 @@ static int jpegls_probe(const AVProbeData *p) > return 0; > } > > +static int jpegxl_probe(const AVProbeData *p) > +{ > +const uint8_t *b =

[FFmpeg-devel] [PATCH] avutil/mathematics: Document av_rescale_rnd() behavior on non int64 results

2021-10-20 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavutil/mathematics.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/mathematics.h b/libavutil/mathematics.h index 54901800ba6..64d4137a602 100644 --- a/libavutil/mathematics.h +++ b/libavutil/mathematics.h @@ -134,6 +134,7 @@ int64_t av_res

Re: [FFmpeg-devel] [PATCH] libaom: Dont use aom_codec_av1_dx_algo.

2021-10-20 Thread James Zern
On Wed, Oct 20, 2021 at 9:59 AM Matt Oliver wrote: > > This fixes linking errors where variables cannot be correctly linked in > from an external shared library such as with msvc (requires dllimport which > is not used by libaom). Instead just call the function that returns the > same variable. >

[FFmpeg-devel] [PATCH v2] avcodec/libjxl: add JPEG XL decoding via libjxl

2021-10-20 Thread Leo Izen
Use the external libjxl library to add decoding for JPEG XL images, and add the appropriate image2 muxers and demuxers to read/write JPEG XL image files. --- MAINTAINERS | 2 + configure | 5 + doc/general_contents.texi | 7 + libavcodec/Makefile | 1 +

[FFmpeg-devel] [PATCH] libaom: Dont use aom_codec_av1_dx_algo.

2021-10-20 Thread Matt Oliver
This fixes linking errors where variables cannot be correctly linked in from an external shared library such as with msvc (requires dllimport which is not used by libaom). Instead just call the function that returns the same variable. --- libavcodec/libaomdec.c | 2 +- 1 file changed, 1 insertion(

[FFmpeg-devel] [PATCH] avcodec/libjxl: add JPEG XL decoding via libjxl

2021-10-20 Thread Leo Izen
Use the external libjxl library to add decoding for JPEG XL images, and add the appropriate image2 muxers and demuxers to read/write JPEG XL image files. --- MAINTAINERS | 2 + configure | 5 + doc/general_contents.texi | 7 + libavcodec/Makefile | 1 +

Re: [FFmpeg-devel] [PATCH v2] libavformat/rtpdec_mpeg: handle bare ADTS packets with explicit decoder config

2021-10-20 Thread lance . lmwang
On Tue, Oct 19, 2021 at 05:02:44PM -0400, Jeff Mahoney wrote: The title should be "avformat/rtpdec_mpeg4: ..." > When SDP specifies a decoder config, there may not be any AU headers > provided by the sender. This can result in rtp_parse_mp4_au failing > and aac_parse_packet reporting "Error par

Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: exit application when decoding returns AVERROR_EXIT

2021-10-20 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Nicolas George > Sent: Wednesday, October 20, 2021 4:57 PM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: exit > application when decoding returns AVER

Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: exit application when decoding returns AVERROR_EXIT

2021-10-20 Thread Nicolas George
Soft Works (12021-10-18): > Introduce a way for decoders to request application exit via error return > > Signed-off-by: softworkz > --- > fftools/ffmpeg.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c > index 9d4f9d7a2b..dbbe670a0a

[FFmpeg-devel] [PATCH 5/5] avformat/imf: Build system

2021-10-20 Thread pal
From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux --- Notes: Modify the FFMPEG build system to add support for an IMF demuxer. MAINTAINERS | 1 + configure| 3 ++- doc/demuxers.texi| 6 ++ libavformat/Makefile | 2 ++ libavform

[FFmpeg-devel] [PATCH 4/5] avformat/imf: Tests

2021-10-20 Thread pal
From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux --- Notes: Tests for the public API of the IMF demuxer. libavformat/tests/imf.c | 490 1 file changed, 490 insertions(+) create mode 100644 libavformat/tests/imf.c diff --git a/li

[FFmpeg-devel] [PATCH 3/5] avformat/imf: Demuxer implementation

2021-10-20 Thread pal
From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux --- Notes: Implements the IMF demuxer. libavformat/imfdec.c | 660 +++ 1 file changed, 660 insertions(+) create mode 100644 libavformat/imfdec.c diff --git a/libavformat/imfdec.c b

[FFmpeg-devel] [PATCH 2/5] avformat/imf: CPL processor

2021-10-20 Thread pal
From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux --- Notes: Implements IMF Composition Playlist (CPL) parsing. libavformat/imf_cpl.c | 666 ++ 1 file changed, 666 insertions(+) create mode 100644 libavformat/imf_cpl.c diff --git

[FFmpeg-devel] [PATCH 1/5] avformat/imf: Headers

2021-10-20 Thread pal
From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux --- Notes: The IMF demuxer accepts as input an IMF CPL. The assets referenced by the CPL can be contained in multiple deliveries, each defined by an ASSETMAP file: ffmpeg -assetmaps ,,... -i If -asset

[FFmpeg-devel] [PATCH 2/2 v2] avformat/mov: Do not hard fail if bit rate calculation overflows unless in explode mode

2021-10-20 Thread Derek Buitenhuis
bit_rate is not a critical field, and we shouln't hard fail if we can't caluclate it due to a large timebase - it needlessly breaks valid files. Signed-off-by: Derek Buitenhuis --- libavformat/mov.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavformat/mov.c

[FFmpeg-devel] [PATCH 1/2] avformat/mov: Use av_rescale when calculating bit rate

2021-10-20 Thread Derek Buitenhuis
It is less susceptible to overflows. Signed-off-by: Derek Buitenhuis --- libavformat/mov.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 57c67e3aac..431f430368 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @

[FFmpeg-devel] [PATCH 0/2] mov: bit rate calculation fixes

2021-10-20 Thread Derek Buitenhuis
As per discussion here: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20211012135040.764167-1-derek.buitenh...@gmail.com/ Derek Buitenhuis (2): avformat/mov: Use av_rescale when calculating bit rate avformat/mov: Do not hard fail if bit rate calculation overflows unless in explode m

Re: [FFmpeg-devel] [PATCH] avfilter/vf_eq: add support for alpha channel

2021-10-20 Thread Michael Niedermayer
On Mon, Oct 18, 2021 at 02:29:48PM +0300, konstan...@boffins.se wrote: > From: KM > > --- > libavfilter/vf_eq.c | 15 --- > 1 file changed, 8 insertions(+), 7 deletions(-) > > diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c > index 4a0d85e8e5..80ab21efb3 100644 > --- a/libavf

Re: [FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information

2021-10-20 Thread Tomas Härdin
mån 2021-10-18 klockan 17:06 +0200 skrev Marc-Antoine Arnaud: > > +static int mxf_audio_remapping(int* channel_ordering, uint8_t* data, > int size, int sample_size, int channels) > +{ > +    int sample_offset = channels * sample_size; > +    int number_of_samples = size / sample_offset; > +    uin