Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-24 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Tomas > Härdin > Sent: Friday, 24 September 2021 17:34 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] Scaling PAL8 images with alpha > > fre 2021-09-24 klockan 10:30 +

Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-24 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Michael > Niedermayer > Sent: Friday, 24 September 2021 17:40 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] Scaling PAL8 images with alpha > > On Fri, Sep 24, 2021 at 10:3

Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-24 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Friday, 24 September 2021 19:03 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] Scaling PAL8 images with alpha > > > > >

Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-25 Thread Soft Works
Sep 25, 2021 at 10:23:56AM +0200, Hendrik Leppkes wrote: > > On Sat, Sep 25, 2021 at 5:00 AM Soft Works > wrote: > > > > > > > > > > > > > -----Original Message- > > > > From: ffmpeg-devel On Behalf > Of > > > > S

Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-25 Thread Soft Works
s and patches > > de...@ffmpeg.org> > > > Subject: Re: [FFmpeg-devel] Scaling PAL8 images with alpha > > > > > > On Sat, Sep 25, 2021 at 10:23:56AM +0200, Hendrik Leppkes wrote: > > > > On Sat, Sep 25, 2021 at 5:00 AM Soft Works > > > > w

Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-25 Thread Soft Works
Sep 25, 2021 at 10:34:32PM +0200, Michael Niedermayer wrote: > > On Sat, Sep 25, 2021 at 03:46:25PM +, Soft Works wrote: > > > > > > > > > > -Original Message- > > > > From: ffmpeg-devel On Behalf > Of > > > > Michael

[FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-25 Thread Soft Works
Usage example: ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" -filter_complex "split[split1][split2];[split1]palettegen=max_colors=254:use_alpha=1[pal1];[split2][pal1]paletteuse=use_alpha=1" -frames:v 1 out.png Signed-off-by: softworkz --- doc/filters.texi| 8

[FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-25 Thread Soft Works
Usage example: ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" -filter_complex "elbg=pal8=1:use_alpha=1" -frames:v 1 out.png Signed-off-by: softworkz --- doc/filters.texi | 4 libavfilter/vf_elbg.c | 25 - 2 files changed, 20 insertions(+), 9

Re: [FFmpeg-devel] Scaling PAL8 images with alpha

2021-09-25 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Sunday, 26 September 2021 01:00 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] Scaling PAL8 images with alpha > > > > >

Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Sunday, 26 September 2021 19:01 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: > Extend the palette conversion

[FFmpeg-devel] [PATCH v2 1/2] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Soft Works
Usage example: ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" -filter_complex "split[split1][split2];[split1]palettegen=max_colors=254:use_alpha=1[pal1];[split2][pal1]paletteuse=use_alpha=1" -frames:v 1 out.png Signed-off-by: softworkz --- doc/filters.texi| 8

[FFmpeg-devel] [PATCH v2 2/2] avfilter/palettegen: Cosmetic changes

2021-09-26 Thread Soft Works
Signed-off-by: softworkz --- libavfilter/vf_palettegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_palettegen.c b/libavfilter/vf_palettegen.c index 98dff46fe0..7a74a3752f 100644 --- a/libavfilter/vf_palettegen.c +++ b/libavfilter/vf_palettegen.c @@ -26

Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: Extend the palette conversion filters to support palettes with alpha

2021-09-26 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Michael Niedermayer > Sent: Sunday, 26 September 2021 19:01 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/palettegen, paletteuse: > Extend the palette conversion

Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-26 Thread Soft Works
lude alpha values in the quantization procedure > > On Sun, Sep 26, 2021 at 04:57:25AM +, Soft Works wrote: > > Usage example: > > > > ffmpeg -y -loglevel verbose -i "..\fate-suite\apng\o_sample.png" - > filter_complex "elbg=pal8=1:use_alpha=1"

[FFmpeg-devel] [PATCH] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-27 Thread Soft Works
With the introduction of subtitle filtering, subsequent video frames which are sharing the same data won't be as rare as this happened to occur yet. Ensuring per-frame uniqueness when data is modified is not only important to avoid issues in the future, but a common API requirement anyway. Signed-

Re: [FFmpeg-devel] [PATCH] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-27 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Monday, 27 September 2021 14:07 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH] avfilter/frames: Ensure frames are > writable when processing in-place > > With t

Re: [FFmpeg-devel] [PATCH] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-27 Thread Soft Works
table when processing in-place > > Soft Works (12021-09-27): > > With the introduction of subtitle filtering, subsequent video > frames > > which are sharing the same data won't be as rare as this happened > > to occur yet. > > Ensuring per-frame uniqueness when d

Re: [FFmpeg-devel] [PATCH] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-27 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Monday, 27 September 2021 14:12 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH] avfilter/frames: Ensure frames > are writable

Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-28 Thread Soft Works
lude alpha values in the quantization procedure > > On Mon, Sep 27, 2021 at 5:30 PM Michael Niedermayer > > wrote: > > > On Sun, Sep 26, 2021 at 05:56:36PM +, Soft Works wrote: > > > > > > > > > > -Original Message- > > > >

Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-28 Thread Soft Works
lude alpha values in the quantization procedure > > On Tue, Sep 28, 2021 at 5:43 PM Soft Works > wrote: > > > > > > > > -Original Message- > > > From: ffmpeg-devel On Behalf Of > > > Paul B Mahol > > > Sent: Monday, 27 September 2

Re: [FFmpeg-devel] [PATCH] avfilter/elbg: Extend filter to include alpha values in the quantization procedure

2021-09-28 Thread Soft Works
lude alpha values in the quantization procedure > > On Tue, Sep 28, 2021 at 7:16 PM Soft Works > wrote: > > > > > > > > -Original Message- > > > From: ffmpeg-devel On Behalf Of > > > Paul B Mahol > > > Sent: Tuesday, 28 September 2

Re: [FFmpeg-devel] [PATCH v2] DXVA2: Add ARGB format

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Thursday, 26 August 2021 21:43 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2] DXVA2: Add ARGB format > > &

[FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
Signed-off-by: softworkz --- v2: Reduced to cases without AVFILTERPAD_FLAG_NEEDS_WRITABLE libavfilter/vf_cover_rect.c | 7 +-- libavfilter/vf_floodfill.c | 5 + libavfilter/vf_vflip.c | 7 ++- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_cover_

[FFmpeg-devel] [PATCH v3 1/1] libavformat/asfdec: A collection of related fixes for asfdec

2021-09-28 Thread Soft Works
Fix 1: Commit c8140fe7324f264faacf7395b27e12531d1f13f7 had introduced a check for value_len > UINT16_MAX. As a consequence, attached images of sizes larger than UINT16_MAX could no longer be read. Fix 2: The value_len is an uint32 not an int32 per spec. That value must not be truncated, neither

[FFmpeg-devel] [PATCH v4 1/1] libavformat/asfdec: A collection of related fixes for asfdec

2021-09-28 Thread Soft Works
Fix 1: Commit c8140fe7324f264faacf7395b27e12531d1f13f7 had introduced a check for value_len > UINT16_MAX. As a consequence, attached images of sizes larger than UINT16_MAX could no longer be read. Fix 2: The value_len is an uint32 not an int32 per spec. That value must not be truncated, neither by

Re: [FFmpeg-devel] [PATCH v4 1/1] libavformat/asfdec: A collection of related fixes for asfdec

2021-09-28 Thread Soft Works
ion of related fixes for asfdec > > On Tue, Sep 28, 2021 at 08:10:02PM +, Soft Works wrote: > > Fix 1: Commit c8140fe7324f264faacf7395b27e12531d1f13f7 had > > introduced a check for value_len > UINT16_MAX. > > As a consequence, attached images of sizes larger than &g

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> On 9/28/2021 4:54 PM, Soft Works wrote: > > Signed-off-by: softworkz > > --- > > v2: Reduced to cases without AVFILTERPAD_FLAG_NEEDS_WRITABLE > > Can't this flag used in these filters? Not in vf_vflip, because in case of flip_bayer, it's using a custom allocati

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> On 9/28/2021 6:00 PM, Soft Works wrote: > > > > > >> -Original Message- > >> From: ffmpeg-devel On Behalf Of > >> James Almer > >> Sent: Tuesday, 28 September 2021 22:08 > >> To: ffmpeg-devel@ffmpeg.org > >> Subject: Re: [

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > James Almer > Sent: Tuesday, 28 September 2021 22:08 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are writable when processing in-place > >

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> On 9/28/2021 6:22 PM, Soft Works wrote: > > > > > >> -Original Message- > >> From: ffmpeg-devel On Behalf Of > >> James Almer > >> Sent: Tuesday, 28 September 2021 23:19 > >> To: ffmpeg-devel@ffmpeg.org > >> Subject: Re: [

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Wednesday, 29 September 2021 00:01 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> On 9/28/2021 4:54 PM, Soft Works wrote: > > Signed-off-by: softworkz > > --- > > v2: Reduced to cases without AVFILTERPAD_FLAG_NEEDS_WRITABLE > > > > libavfilter/vf_cover_rect.c | 7 +-- > > libavfilter/vf_floodfill.c | 5 + > > libavfi

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> On 9/28/2021 7:00 PM, Soft Works wrote: > > > > > >> -Original Message- > >> From: ffmpeg-devel On Behalf Of > >> James Almer > >> Sent: Tuesday, 28 September 2021 23:50 > >> To: ffmpeg-devel@ffmpeg.org > >> Sub

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Wednesday, 29 September 2021 01:42 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are writable when processing in-

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Wednesday, 29 September 2021 02:04 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are writable when processing in-

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Wednesday, 29 September 2021 02:25 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are writable when processing in-

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Wednesday, 29 September 2021 02:48 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are

Re: [FFmpeg-devel] [PATCH] avfilter/vf_morpho: Fix compilation with MSVC

2021-09-28 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Wednesday, 29 September 2021 07:10 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH] avfilter/vf_morpho: Fix compilation > with MSVC > > MSVC (or rather the winde

Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure frames are writable when processing in-place

2021-09-29 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Andreas Rheinhardt > Sent: Wednesday, 29 September 2021 10:28 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avfilter/frames: Ensure > frames are writable when processing in-

[FFmpeg-devel] [PATCH v5 1/7] libavformat/asf: Fix handling of byte array length values

2021-09-29 Thread Soft Works
The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code). The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in order to continue

[FFmpeg-devel] [PATCH v5 2/7] libavformat/asfdec: Fix get_value return type

2021-09-29 Thread Soft Works
get_value had a return type of int, which means that reading QWORDS (case 4) was broken due to truncation of the result from avio_rl64(). Signed-off-by: softworkz --- v5: Split into pieces as requested libavformat/asfdec_f.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff

[FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix type of value_len

2021-09-29 Thread Soft Works
The value_len is an uint32 not an int32 per spec. That value must not be truncated, neither by casting to int, nor by any conditional checks, because at the end of get_tag, this value is needed to move forward in parsing. When the len value gets modified, the parsing may break. Signed-off-by: soft

[FFmpeg-devel] [PATCH v5 4/7] libavformat/asfdec: Fixing get_tag

2021-09-29 Thread Soft Works
These three are closely related and can't be separated easily: In get_tag, the code was adding 22 bytes (in order to allow it to hold 64bit numbers as string) to the value len for creating creating a buffer. This was unnecessarily imposing a size-constraint on the value_len parameter. The code in

[FFmpeg-devel] [PATCH v5 5/7] libavformat/asfdec: Implement parsing of GUID values

2021-09-29 Thread Soft Works
Signed-off-by: softworkz --- v5: Split into pieces as requested libavformat/asfdec_f.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index d35eec7082..7ac4e460a7 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/a

[FFmpeg-devel] [PATCH v5 6/7] libavformat/asfdec: Use predefined constants

2021-09-29 Thread Soft Works
Signed-off-by: softworkz --- v5: Split into pieces as requested libavformat/asfdec_f.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 7ac4e460a7..c4bcf0904d 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/as

[FFmpeg-devel] [PATCH v5 7/7] libavformat/asfdec: Add braces to define

2021-09-29 Thread Soft Works
Signed-off-by: softworkz --- v5: Split into pieces as requested libavformat/asfdec_f.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index c4bcf0904d..870d4bc7e6 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c

[FFmpeg-devel] [PATCH 1/1] avutil/frame: Document the possibility of negative line sizes

2021-09-29 Thread Soft Works
Signed-off-by: softworkz --- libavutil/frame.h | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/libavutil/frame.h b/libavutil/frame.h index ff2540a20f..f07e690410 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -304,7 +304,8 @@ typedef struct AVFrame {

Re: [FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix type of value_len

2021-09-29 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > James Almer > Sent: Thursday, 30 September 2021 05:53 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix > type of value_len > > On 9/29/2021 11:58 PM

Re: [FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix type of value_len

2021-09-29 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > James Almer > Sent: Thursday, 30 September 2021 05:53 > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix > type of value_len > > On 9/29/2021 11:58 PM

Re: [FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix type of value_len

2021-09-29 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Thursday, 30 September 2021 04:59 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH v5 3/7] libavformat/asfdec: Fix type > of value_len > > The value_len is an uint32

Re: [FFmpeg-devel] [PATCH v5 2/7] libavformat/asfdec: Fix get_value return type

2021-09-30 Thread Soft Works
t; get_value return type > > On Thu, Sep 30, 2021 at 01:45:46PM +0200, Michael Niedermayer wrote: > > On Thu, Sep 30, 2021 at 02:58:30AM +, Soft Works wrote: > > > get_value had a return type of int, which means that reading > > > QWORDS (case 4) was broke

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

2021-09-30 Thread Soft Works
v10 Update: - FEATURE-COMPLETE! No more features or filters will be added to this patchset - Added subscale filter Provides high-quality scaling and rearranging functionality for graphical subtitles. This has been the last missing bit for making this a useful and versatile toolset for

[FFmpeg-devel] [PATCH v10 01/14] fftools/play, probe: Adjust for subtitle changes

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

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

2021-09-30 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 v10 03/14] avfilter/avfilter: Handle subtitle frames

2021-09-30 Thread Soft Works
Signed-off-by: softworkz --- libavfilter/avfilter.c | 8 +--- libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 14 ++ libavfilter/formats.h | 3 +++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilt

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

2021-09-30 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 v10 05/14] avfilter/overlay_graphicsubs: Add overlay_graphicsubs and graphicsub2video filters

2021-09-30 Thread Soft Works
- overlay_graphicsubs (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 v10 06/14] fftools/ffmpeg: Replace sub2video with subtitle frame filtering

2021-09-30 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 v10 07/14] avfilter/overlay_textsubs: Add overlay_textsubs and textsubs2video filters

2021-09-30 Thread Soft Works
- overlay_textsubs {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 | 69 libavfilter/Makefile

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

2021-09-30 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 | 229 + libavfilt

[FFmpeg-devel] [PATCH v10 09/14] avfilter/stripstyles: Add stripstyles filter

2021-09-30 Thread Soft Works
- stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 211 +++ 3 files changed, 213 insertions(+) create mode

[FFmpeg-devel] [PATCH v10 10/14] avfilter/split_cc: Add split_cc filter for closed caption handling

2021-09-30 Thread Soft Works
- split_cc {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]split_cc[vid1],textmod=mode=remove_chars:find='@',[vid1]overlay_textsubs" out

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

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

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

2021-09-30 Thread Soft Works
Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 160 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 867 ++ 5 files changed, 1030 insertions(+) create mode 1

[FFmpeg-devel] [PATCH v10 13/14] avformat/utils: Add av_stream_get_codec_properties()

2021-09-30 Thread Soft Works
Signed-off-by: softworkz --- doc/APIchanges | 3 +++ libavformat/avformat.h | 9 + libavformat/utils.c| 5 + libavformat/version.h | 2 +- 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 7b267a79ac..20848fe93f 100644 --

[FFmpeg-devel] [PATCH v10 14/14] ffprobe: Fix incorrect display of closed_captions property

2021-09-30 Thread Soft Works
Repro Example: ffprobe -show_entries stream=closed_captions:disposition=:side_data= "http://streams.videolan.org/streams/ts/CC/NewsStream-608-ac3.ts"; While the codec string includes "Closed Captions", the stream data is showing: closed_captions=0 The test ref was incorrect as the test media fi

Re: [FFmpeg-devel] [PATCH v10 00/14] Subtitle Filtering

2021-09-30 Thread Soft Works
I am very SORRY! This v10 patchset version has gotten all wrong. Please ignore! softworkz > -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Thursday, 30 September 2021 21:30 > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH v

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

2021-09-30 Thread Soft Works
v11 Update: - FEATURE-COMPLETE! No more features or filters will be added to this patchset - Added subscale filter Provides high-quality scaling and rearranging functionality for graphical subtitles. This has been the last missing bit for making this a useful and versatile toolset for

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

2021-09-30 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 v11 02/14] global: Move ass helper functions to avutil as avpriv_ and extend ass dialog parsing

2021-09-30 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 v11 03/14] fftools/play, probe: Adjust for subtitle changes

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

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

2021-09-30 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 v11 05/14] avfilter/avfilter: Handle subtitle frames

2021-09-30 Thread Soft Works
Signed-off-by: softworkz --- libavfilter/avfilter.c | 8 +--- libavfilter/avfiltergraph.c | 5 + libavfilter/formats.c | 14 ++ libavfilter/formats.h | 3 +++ 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilt

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

2021-09-30 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 v11 07/14] avfilter/overlay_graphicsubs: Add overlay_graphicsubs and graphicsub2video filters

2021-09-30 Thread Soft Works
- overlay_graphicsubs (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 v11 08/14] fftools/ffmpeg: Replace sub2video with subtitle frame filtering

2021-09-30 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 v11 09/14] avfilter/overlay_textsubs: Add overlay_textsubs and textsubs2video filters

2021-09-30 Thread Soft Works
- overlay_textsubs {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 | 69 libavfilter/Makefile

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

2021-09-30 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 | 229 + libavfilt

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

2021-09-30 Thread Soft Works
- stripstyles {S -> S) Remove all inline styles from subtitle events Signed-off-by: softworkz --- libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_stripstyles.c | 211 +++ 3 files changed, 213 insertions(+) create mode

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

2021-09-30 Thread Soft Works
- split_cc {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]split_cc[vid1],textmod=mode=remove_chars:find='@',[vid1]overlay_textsubs" out

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

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

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

2021-09-30 Thread Soft Works
Signed-off-by: softworkz --- configure | 1 + doc/filters.texi | 160 +++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/sf_subscale.c | 867 ++ 5 files changed, 1030 insertions(+) create mode 1

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

2021-10-01 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Paul B Mahol > Sent: Friday, 1 October 2021 10:57 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v11 10/14] avfilter/textmod: Add > textmod, censor and show_speaker filters

Re: [FFmpeg-devel] [PATCH v5 2/7] libavformat/asfdec: Fix get_value return type

2021-10-01 Thread Soft Works
return type > > On Thu, Sep 30, 2021 at 12:11:13PM +, Soft Works wrote: > > > > > > > -Original Message- > > > From: ffmpeg-devel On Behalf Of > > > Michael Niedermayer > > > Sent: Thursday, 30 September 2021 14:04 > > >

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

2021-10-01 Thread Soft Works
censor and show_speaker filters > > On Fri, Oct 1, 2021 at 9:43 PM Soft Works > wrote: > > > > > > > > -Original Message- > > > From: ffmpeg-devel On Behalf Of > > > Paul B Mahol > > > Sent: Friday, 1 October 2021 10:57 > >

[FFmpeg-devel] [RFC] Naming of Subtitle Types

2021-10-01 Thread Soft Works
Hi, I wanted to gather some opinions about the naming of subtitle types. In my patched I have consistently used the terms "Graphic Subtitles" and "Text Subtitles" everywhere. I think "Text Subtitles" is out of question, but for the other one, there are two viable options: "Bitmap Subt

Re: [FFmpeg-devel] [RFC] Naming of Subtitle Types

2021-10-01 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Friday, 1 October 2021 23:09 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: [FFmpeg-devel] [RFC] Naming of Subtitle Types > > Hi, > > I wanted

Re: [FFmpeg-devel] [PATCH v5 2/7] libavformat/asfdec: Fix get_value return type

2021-10-02 Thread Soft Works
alue return type > > On Fri, Oct 01, 2021 at 08:44:04PM +, Soft Works wrote: > > > > > > > -Original Message- > > > From: ffmpeg-devel On Behalf Of > > > Michael Niedermayer > > > Sent: Friday, 1 October 2021 19:56 > > >

Re: [FFmpeg-devel] [PATCH v2 2/2] ffprobe: Fix incorrect display of closed_captions property

2021-10-03 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Monday, 20 September 2021 16:58 > To: FFmpeg development discussions and patches de...@ffmpeg.org>; James Almer > Subject: Re: [FFmpeg-devel] [PATCH v2 2/2] ffprobe: Fix incorrect > di

[FFmpeg-devel] [PATCH v2 1/2] avcodec/codec_par: Add codec properties field to AVCodecParameters

2021-10-05 Thread Soft Works
Signed-off-by: softworkz --- v2: include codec properties in AVCodecParameters instead of adding an API to retrieve it doc/APIchanges | 3 +++ libavcodec/codec_par.c | 2 ++ libavcodec/codec_par.h | 4 libavcodec/version.h | 2 +- 4 files changed, 10 insertions(+), 1 deletion(-)

[FFmpeg-devel] [PATCH v2 2/2] ffprobe: Fix incorrect display of closed_captions property

2021-10-05 Thread Soft Works
Repro Example: ffprobe -show_entries stream=closed_captions:disposition=:side_data= "http://streams.videolan.org/streams/ts/CC/NewsStream-608-ac3.ts"; While the codec string includes "Closed Captions", the stream data is showing: closed_captions=0 The test ref was incorrect as the test media fi

[FFmpeg-devel] [PATCH v6 01/11] libavformat/asf: Fix handling of byte array length values

2021-10-05 Thread Soft Works
The spec allows attachment sizes of up to UINT32_MAX while we can handle only sizes up to INT32_MAX (in downstream code). The debug.assert in get_tag didn't really address this, and truncating the value_len in calling methods cannot be used because the length value is required in order to continue

[FFmpeg-devel] [PATCH v6 02/11] libavformat/asfdec: Fix get_value return type and add checks for unsupported values

2021-10-05 Thread Soft Works
get_value had a return type of int, which means that reading QWORDS (case 4) was broken due to truncation of the result from avio_rl64(). Signed-off-by: softworkz --- libavformat/asfdec_f.c | 38 +- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git

[FFmpeg-devel] [PATCH v6 03/11] libavformat/asfdec: Fix type of value_len

2021-10-05 Thread Soft Works
The value_len is an uint32 not an int32 per spec. That value must not be truncated, neither by casting to int, nor by any conditional checks, because at the end of get_tag, this value is needed to move forward in parsing. When the len value gets modified, the parsing may break. Signed-off-by: soft

[FFmpeg-devel] [PATCH v6 04/11] libavformat/asfdec: Fixing get_tag

2021-10-05 Thread Soft Works
These three are closely related and can't be separated easily: In get_tag, the code was adding 22 bytes (in order to allow it to hold 64bit numbers as string) to the value len for creating creating a buffer. This was unnecessarily imposing a size-constraint on the value_len parameter. The code in

[FFmpeg-devel] [PATCH v6 05/11] libavformat/asfdec: Implement parsing of GUID values

2021-10-05 Thread Soft Works
Signed-off-by: softworkz --- libavformat/asfdec_f.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 58c424b565..4c898ab3f2 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -280,9 +280,12 @@ stati

[FFmpeg-devel] [PATCH v6 06/11] libavformat/asfdec: Remove unused parameters

2021-10-05 Thread Soft Works
Signed-off-by: softworkz --- libavformat/asfdec_f.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 4c898ab3f2..e87c78cd6c 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@

[FFmpeg-devel] [PATCH v6 07/11] libavformat/asfdec: Fix macro definition and use

2021-10-05 Thread Soft Works
Signed-off-by: softworkz --- libavformat/asfdec_f.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index e87c78cd6c..a7b5ffe465 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -896,

[FFmpeg-devel] [PATCH v6 08/11] libavformat/asfdec: Remove variable redefinition in inner scope

2021-10-05 Thread Soft Works
Signed-off-by: softworkz --- libavformat/asfdec_f.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index a7b5ffe465..8283f245ab 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -1181,7 +1181,7 @@ static int

[FFmpeg-devel] [PATCH v6 09/11] libavformat/asfdec: Ensure variables are initialized

2021-10-05 Thread Soft Works
Signed-off-by: softworkz --- libavformat/asfdec_f.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/asfdec_f.c b/libavformat/asfdec_f.c index 8283f245ab..024d77903b 100644 --- a/libavformat/asfdec_f.c +++ b/libavformat/asfdec_f.c @@ -968,6 +968,7 @@ static int asf_get_packet(AVFor

  1   2   3   4   5   6   7   8   9   10   >