[FFmpeg-devel] [PATCH v2] libswresample/swresamplec: Err num(negative-size) was used as a function parameter

2021-12-07 Thread Yu Yang
If cannot allocate memory, ERROR(ENOMEM) '-12' as a parameter will be constantly being returned. When run resample() firstly, negative size param would cause buffer-overflow and SEGV in swri_rematrix(). When run swri_rematrix() firstly, resample() would not cause error but Err num as a wrong pa

[FFmpeg-devel] [PATCH v4] fftools/opts: Avoid crash when opts could not be allocated

2021-12-07 Thread Yu Yang
If 'opts' could not be allocated, exiting the program to avoid crash when release it. Before setup_find_stream_info_opts(), checking 'orig_nb_streams' is > 0. Reported-by: TOTE Robot Signed-off-by: Yu Yang --- fftools/cmdutils.c | 4 +--- fftools/cmdutils.h | 4 ++-- fftools/ffmpeg_opt.c

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-07 Thread Marton Balint
On Wed, 8 Dec 2021, Tomas Härdin wrote: fre 2021-12-03 klockan 09:38 + skrev Nicolas Gaullier: > Please add a reference to the relevant SMPTE document in the > comment, or perhaps at the list of references at the start of the > file > > /Tomas I have added the reference to ST2019-4 for

[FFmpeg-devel] [PATCH 279/279] mov: Implement spatial audio support

2021-12-07 Thread James Almer
From: Vittorio Giovara As defined by Google's Spatial Audio RFC. Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavformat/mov.c | 96 +++ 1 file changed, 96 insertions(+) diff --git a/libavformat/mov.

[FFmpeg-devel] [PATCH 278/279] opus: export mapping family 2 (Ambisonic) as Ambisonic layout

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavcodec/opus.c | 22 +++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/libavcodec/opus.c b/libavcodec/opus.c index 73cac74f96..4d89068025 100644 --- a/libavcodec/opus.c +++ b/libavcodec/opus.c @@ -398,8 +3

[FFmpeg-devel] [PATCH 277/279] channel_layout: add support for Ambisonic

2021-12-07 Thread James Almer
From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavutil/channel_layout.c | 147 ++- libavutil/channel_layout.h | 49 +++ libavutil/tests/channel_layout.c | 10 +++ tests/ref/

[FFmpeg-devel] [PATCH 276/279] ffprobe: convert to new channel layout-API

2021-12-07 Thread James Almer
Signed-off-by: James Almer --- fftools/ffprobe.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 0711e02922..52d3d26962 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -2295,12 +2295,10 @@ static void s

[FFmpeg-devel] [PATCH 275/279] ffmpeg: convert to new channel layout-API

2021-12-07 Thread James Almer
Signed-off-by: James Almer --- fftools/cmdutils.c| 42 +++- fftools/cmdutils.h| 8 - fftools/ffmpeg.c | 47 -- fftools/ffmpeg.h | 7 ++-- fftools/ffmpeg_filter.c | 43 +---

[FFmpeg-devel] [PATCH 272/279] lavf: Add non diegetic stream disposition flag

2021-12-07 Thread James Almer
From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavformat/avformat.h | 7 +++ libavformat/dump.c | 2 ++ 2 files changed, 9 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 75699f3a32

[FFmpeg-devel] [PATCH 271/279] lavc: drop temporary compat wrappers for channel layout API change

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavcodec/aacdec_template.c | 7 --- libavcodec/avcodec.c | 29 - libavcodec/dca_lbr.c | 7 --- libavcodec/dcadec.c | 8 libavcodec/decode.c | 20 ---

[FFmpeg-devel] [PATCH 185/279] alac: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/alac.c | 16 ++-- libavcodec/alac_data.c | 20 ++-- libavcodec/alac_data.h | 6 ++ libavcodec/alacenc.c | 37 +

[FFmpeg-devel] [PATCH 273/279] swresample: convert to new channel layout API

2021-12-07 Thread James Almer
Signed-off-by: James Almer --- libswresample/options.c | 33 +++- libswresample/rematrix.c| 227 ++-- libswresample/rematrix_template.c | 7 +- libswresample/swresample.c | 158 --- libswresample/swresample.h |

[FFmpeg-devel] [PATCH 184/279] adx: convert to new channel layout API

2021-12-07 Thread James Almer
From: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/adx.c| 16 +++- libavcodec/adxdec.c | 6 +++--- libavcodec/adxenc.c | 11 ++- 3 files changed, 20 insertions(+), 13 deletions(-) diff --git a/libavcodec/adx.c b/libavcodec/ad

[FFmpeg-devel] [PATCH 183/279] adpcm: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/adpcm.c| 151 ++ libavcodec/adpcmenc.c | 122 +- 2 files changed, 141 insertions(+), 132 delet

[FFmpeg-devel] [PATCH 182/279] ac3: convert to new channel layout API

2021-12-07 Thread James Almer
From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/aac_ac3_parser.c | 6 +++ libavcodec/ac3dec.c | 57 +-- libavcodec/ac3dec.h | 2 + libavcodec/ac3dec_fixed.c | 1 + libavc

[FFmpeg-devel] [PATCH 181/279] aac: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/aac.h | 11 -- libavcodec/aac_ac3_parser.c | 9 +++-- libavcodec/aaccoder.c | 10 +++--- libavcodec/aaccoder_twoloop.h | 4 +-- libavcodec/aa

[FFmpeg-devel] [PATCH 180/279] 8svx: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/8svx.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/libavcodec/8svx.c b/libavcodec/8svx.c index 6ef8cd73fe..6ef7921274 100644

[FFmpeg-devel] [PATCH 179/279] lavc: switch to the new channel layout API

2021-12-07 Thread James Almer
From: Vittorio Giovara Since the request_channel_layout is used only by a handful of codecs, move the option to codec private contexts. Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/avcodec.c | 80 ++ libavcodec/avcodec.h |

[FFmpeg-devel] [PATCH 178/279] lavf: drop the channel layout compat layer for old-style (de)muxers

2021-12-07 Thread James Almer
From: Anton Khirnov All the (de)muxers have been converted to the new API. Signed-off-by: James Almer --- libavformat/demux.c | 12 libavformat/mux.c | 9 - 2 files changed, 21 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index 3bfd753f64..a9670a

[FFmpeg-devel] [PATCH 016/279] adp: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavformat/adp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavformat/adp.c b/libavformat/adp.c index 6d5f9d274e..c9a5a04507 100644 --- a/libavformat/adp.c +++ b/libavformat/adp.c @@ -55,8 +55,7 @@ static int adp_r

[FFmpeg-devel] [PATCH 015/279] act: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavformat/act.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/act.c b/libavformat/act.c index a369157647..49639acfcc 100644 --- a/libavformat/act.c +++ b/libavformat/act.c @@ -88,7 +88,8 @@ static int read_

[FFmpeg-devel] [PATCH 014/279] acm: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavformat/acm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/acm.c b/libavformat/acm.c index 0ee9114f70..a6da000130 100644 --- a/libavformat/acm.c +++ b/libavformat/acm.c @@ -48,12 +48,13 @@ static in

[FFmpeg-devel] [PATCH 013/279] ace: convert to new channel layout API

2021-12-07 Thread James Almer
Signed-off-by: James Almer --- libavformat/acedec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavformat/acedec.c b/libavformat/acedec.c index a52a0f0e54..74128e0a6a 100644 --- a/libavformat/acedec.c +++ b/libavformat/acedec.c @@ -74,7 +74,8 @@ static int ace_read_

[FFmpeg-devel] [PATCH 012/279] aax: convert to new channel layout API

2021-12-07 Thread James Almer
Signed-off-by: James Almer --- libavformat/aaxdec.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/aaxdec.c b/libavformat/aaxdec.c index b08ee036ed..8eb2540407 100644 --- a/libavformat/aaxdec.c +++ b/libavformat/aaxdec.c @@ -279,9 +279,10 @@ static int aax_

[FFmpeg-devel] [PATCH 011/279] aa: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavformat/aadec.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavformat/aadec.c b/libavformat/aadec.c index 72f4b6f7cc..fbb9e0114e 100644 --- a/libavformat/aadec.c +++ b/libavformat/aadec.c @@ -190,7 +190,8 @@

[FFmpeg-devel] [PATCH 008/279] lavf: convert the generic layer to the new channel layout

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavformat/demux.c | 16 libavformat/mux.c | 18 +- libavformat/utils.c | 4 ++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/libavformat/demux.c b/libavformat/demux.c index cb02c84f33..3

[FFmpeg-devel] [PATCH 010/279] 4xm: convert to new channel layout API

2021-12-07 Thread James Almer
From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavformat/4xm.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavformat/4xm.c b/libavformat/4xm.c index f918b1fc57..243c22965e 100644 --- a/libavformat/4xm.c +++ b/libavformat

[FFmpeg-devel] [PATCH 009/279] 3dostr: convert to new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: James Almer --- libavformat/3dostr.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavformat/3dostr.c b/libavformat/3dostr.c index 0c136c9ea0..9b6a4d1d86 100644 --- a/libavformat/3dostr.c +++ b/libavformat/3dostr.c @@ -102

[FFmpeg-devel] [PATCH 005/279] avframe: switch to the new channel layout API

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavutil/frame.c | 112 +- libavutil/frame.h | 12 - 2 files changed, 103 insertions(+), 21 deletions(-) diff --git a/libavutil/frame.c b/libavutil/frame.c inde

[FFmpeg-devel] [PATCH 007/279] lavf: add a temporary compat layer for the channel layout API change

2021-12-07 Thread James Almer
From: Anton Khirnov Mediates between old-style (de)muxers and new-style callers. Will be removed once all the (de)muxers are converted to the new API. Signed-off-by: James Almer --- libavformat/demux.c | 12 libavformat/mux.c | 10 ++ 2 files changed, 22 insertions(+) d

[FFmpeg-devel] [PATCH 006/279] avcodecpar: switch to the new channel layout API

2021-12-07 Thread James Almer
From: Vittorio Giovara Signed-off-by: Vittorio Giovara Signed-off-by: Anton Khirnov Signed-off-by: James Almer --- libavcodec/codec_par.c | 37 + libavcodec/codec_par.h | 12 libavcodec/utils.c | 12 ++-- 3 files changed, 55 inserti

[FFmpeg-devel] [PATCH 004/279] lavc: deprecate channel count/layout changing side data

2021-12-07 Thread James Almer
From: Anton Khirnov They are incompatible with the new channel layout scheme and no decoder uses them. Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavcodec/decode.c | 4 libavcodec/packet.h | 5 + libavformat/dump.c | 9 - libavformat/nutenc.c | 2 ++

[FFmpeg-devel] [PATCH 003/279] lavu: support AVChannelLayout AVOptions

2021-12-07 Thread James Almer
From: Anton Khirnov Signed-off-by: Vittorio Giovara Signed-off-by: James Almer --- libavutil/opt.c | 126 +- libavutil/opt.h | 12 libavutil/tests/opt.c | 8 +-- tests/ref/fate/opt| 16 +++--- 4 files changed, 149 insertions(+),

[FFmpeg-devel] [PATCH 002/279] fate: add a channel_layout API test

2021-12-07 Thread James Almer
Signed-off-by: James Almer --- libavutil/Makefile | 1 + libavutil/tests/channel_layout.c | 221 +++ tests/fate/libavutil.mak | 4 + tests/ref/fate/channel_layout| 88 4 files changed, 314 insertions(+) create mode 100644 li

[FFmpeg-devel] [PATCH 001/279] Add a new channel layout API

2021-12-07 Thread 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. Expanded and completed by Vit

[FFmpeg-devel] [PATCH 000/279] New channel layout API

2021-12-07 Thread James Almer
This is an updated and rebased version of the API that was sent to this mailing list about two years ago. It expands it with some new helpers, implements some changes that allows further extensibility for new features down the line, and finishes porting all missing modules and those introduced sinc

Re: [FFmpeg-devel] [PATCH 5/7] avformat/mxfdec: Check for duplicate mxf_read_index_entry_array()

2021-12-07 Thread Tomas Härdin
sön 2021-12-05 klockan 22:19 +0100 skrev Michael Niedermayer: > Fixes: memleak > Fixes: 41596/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer- > 6439060204290048 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael

Re: [FFmpeg-devel] [PATCH 3/4] avformat/mxfdec: Check component_depth in mxf_get_color_range()

2021-12-07 Thread Tomas Härdin
lör 2021-12-04 klockan 22:32 +0100 skrev Michael Niedermayer: > Fixes: shift exponent 4294967163 is too large for 32-bit type 'int' > Fixes: 41449/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer- > 6183636217495552 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fu

[FFmpeg-devel] [PATCH 4/4] avcodec/movtextdec: Sanitize style entries

2021-12-07 Thread Andreas Rheinhardt
There are three types of style entries which are redundant: a) Entries with length zero. They are already discarded. b) Entries that are equivalent to the default style: They can be safely discarded. c) Entries that are equivalent to the immediately preceding style if the start of the current style

[FFmpeg-devel] [PATCH 3/4] avcodec/movtextdec: Perform RGB->BGR color conversion early

2021-12-07 Thread Andreas Rheinhardt
Reduces the amount of conversions. Signed-off-by: Andreas Rheinhardt --- libavcodec/movtextdec.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/libavcodec/movtextdec.c b/libavcodec/movtextdec.c index d3b15d07f8..c50626c0b5 100644 --- a/libavcodec/movtextdec.

[FFmpeg-devel] [PATCH 2/4] avcodec/movtextdec: Deduplicate parsing of StyleRecords

2021-12-07 Thread Andreas Rheinhardt
Both TextSampleEntry and TextSample can contain StyleRecords; yet both the code as well as the structures for them were duplicated. This commit changes this. Signed-off-by: Andreas Rheinhardt --- libavcodec/movtextdec.c | 95 +++-- 1 file changed, 44 insertion

[FFmpeg-devel] [PATCH 1/4] avcodec/movtextdec: Rename several structure elements

2021-12-07 Thread Andreas Rheinhardt
Giving elements of a structure called StyleBox names like "style_start" or "style_end" is redundant, especially given that the relevant variables are also called style. Signed-off-by: Andreas Rheinhardt --- libavcodec/movtextdec.c | 54 - 1 file changed, 2

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-07 Thread Tomas Härdin
fre 2021-12-03 klockan 09:38 + skrev Nicolas Gaullier: > > Please add a reference to the relevant SMPTE document in the > > comment, or perhaps at the list of references at the start of the > > file > > > > /Tomas > > I have added the reference to ST2019-4 for "VC3 mapping", so that > should

Re: [FFmpeg-devel] [PATCH v20 02/20] avutil/frame: Prepare AVFrame for subtitle handling

2021-12-07 Thread Michael Niedermayer
On Mon, Dec 06, 2021 at 02:42:58PM +0100, Nicolas George wrote: > Hendrik Leppkes (12021-12-06): > > You just keep re-iterating that avfilter internals need it. And I'll > > just keep saying that avfilter internals shall not define public API > > design. I have not heard anything that justifies yet

Re: [FFmpeg-devel] [PATCH 3/4] lavc: Implement Dolby Vision RPU parsing

2021-12-07 Thread James Almer
On 12/7/2021 4:59 PM, Niklas Haas wrote: From: Niklas Haas Based on a mixture of guesswork, partial documentation in patents, and reverse engineering of real-world samples. Confirmed working for all the samples I've thrown at it. Contains some annoying machinery to persist these values in b

Re: [FFmpeg-devel] [PATCH v9 3/5] avformat/mov: Refactor mov_read_dvcc_dvvc to use ff_isom_parse_dvcc_dvvc

2021-12-07 Thread quietvoid
On Tue, Dec 7, 2021 at 9:37 AM wrote: > > On Sun, Dec 05, 2021 at 06:35:33PM +0100, quietvoid wrote: > > To avoid duplicating code. The implementation in dovi_isom is identical. > > > > Signed-off-by: quietvoid > > --- > > libavformat/mov.c | 50 +-- >

[FFmpeg-devel] [PATCH 4/4] lavc/hevcdec: Parse DOVI RPU NALs

2021-12-07 Thread Niklas Haas
From: Niklas Haas And expose the parsed values as frame side data. Signed-off-by: Niklas Haas --- libavcodec/hevcdec.c | 32 ++-- libavcodec/hevcdec.h | 2 ++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.

[FFmpeg-devel] [PATCH 3/4] lavc: Implement Dolby Vision RPU parsing

2021-12-07 Thread Niklas Haas
From: Niklas Haas Based on a mixture of guesswork, partial documentation in patents, and reverse engineering of real-world samples. Confirmed working for all the samples I've thrown at it. Contains some annoying machinery to persist these values in between frames, which is needed in theory even

[FFmpeg-devel] [PATCH 2/4] lavfi/showinfo: Support AV_FRAME_DATA_DOVI_METADATA

2021-12-07 Thread Niklas Haas
From: Niklas Haas Signed-off-by: Niklas Haas --- libavfilter/vf_showinfo.c | 108 ++ 1 file changed, 108 insertions(+) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 62c7833247..79294f6891 100644 --- a/libavfilter/vf_showinfo.c +++

[FFmpeg-devel] [PATCH 1/4] lavu/frame: Add Dolby Vision metadata side data type

2021-12-07 Thread Niklas Haas
From: Niklas Haas Signed-off-by: Niklas Haas --- doc/APIchanges| 3 ++ libavutil/dovi_meta.c | 23 libavutil/dovi_meta.h | 121 ++ libavutil/frame.c | 1 + libavutil/frame.h | 9 +++- libavutil/version.h | 2 +- 6 files

Re: [FFmpeg-devel] python filter

2021-12-07 Thread Ronald S. Bultje
Hi, On Tue, Dec 7, 2021 at 12:53 PM Alex <3.1...@ukr.net> wrote: > Yes. > I wat to do filtering inside python script. > No, that is currently not possible. Ronald ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinf

Re: [FFmpeg-devel] [PATCH v7 1/2] avformat/imf: Demuxer

2021-12-07 Thread Pierre-Anthony Lemieux
On Mon, Dec 6, 2021 at 12:55 PM Andreas Rheinhardt wrote: > > p...@sandflow.com: > > 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 > > contain

Re: [FFmpeg-devel] [PATCH v7 1/2] avformat/imf: Demuxer

2021-12-07 Thread Pierre-Anthony Lemieux
On Mon, Dec 6, 2021 at 9:45 AM Lynne wrote: > > 6 Dec 2021, 04:18 by p...@sandflow.com: > > > From: Pierre-Anthony Lemieux > > + > > +/** > > Please don't NIH-parse UUIDs. They're more complicated > than this. Use libuuid, it's stable, bug-free and universally > available. I submitted a patch for

[FFmpeg-devel] [PATCH v8 2/2] avformat/imf: Tests

2021-12-07 Thread pal
From: Pierre-Anthony Lemieux Signed-off-by: Pierre-Anthony Lemieux --- Notes: Tests for the IMF demuxer. libavformat/Makefile| 1 + libavformat/tests/imf.c | 525 2 files changed, 526 insertions(+) create mode 100644 libavformat/tests/imf.c

[FFmpeg-devel] [PATCH v8 1/2] avformat/imf: Demuxer

2021-12-07 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 v2] webp: implement FF_CODEC_CAP_SKIP_FRAME_FILL_PARAM

2021-12-07 Thread Alex Xu (Hello71)
Roughly doubles webp performance for common applications (ffmpeg, ffprobe, mpv) due to speeding up avformat_find_stream_info. Lossy needs no patches since vp8.c already implements skip_frame. Lossless needs hook to understand skip_frame. Also the "image data not found" message is fixed, which was

Re: [FFmpeg-devel] python filter

2021-12-07 Thread Alex
Yes. I wat to do filtering inside python script. 7 December 2021, 05:16:50, by "Steven Liu" : Alex <3.1...@ukr.net> 于2021年12月7日周二 上午9:12写道: > > Is it possible to implement python backend as ffmpeg video filter, like > https://openvinotoolkit.github.io/dlstreamer_gst/ ? Do you mean add a Python p

Re: [FFmpeg-devel] [PATCH v9 4/5] avformat/movenc: Refactor mov_write_dvcc_dvvc_tag to use ff_isom_put_dvcc_dvvc

2021-12-07 Thread lance . lmwang
On Sun, Dec 05, 2021 at 06:35:34PM +0100, quietvoid wrote: > Improves code legibility by not using bit shifts. > Also avoids duplicating the dvcC/dvvC ISOM box writing code. > > Signed-off-by: quietvoid > --- > libavformat/movenc.c | 24 +++- > 1 file changed, 7 insertions(+)

Re: [FFmpeg-devel] [PATCH v9 3/5] avformat/mov: Refactor mov_read_dvcc_dvvc to use ff_isom_parse_dvcc_dvvc

2021-12-07 Thread lance . lmwang
On Sun, Dec 05, 2021 at 06:35:33PM +0100, quietvoid wrote: > To avoid duplicating code. The implementation in dovi_isom is identical. > > Signed-off-by: quietvoid > --- > libavformat/mov.c | 50 +-- > 1 file changed, 9 insertions(+), 41 deletions(-) >

Re: [FFmpeg-devel] [PATCH v9 1/5] avformat/dovi_isom: Implement Dolby Vision configuration parsing/writing

2021-12-07 Thread lance . lmwang
On Sun, Dec 05, 2021 at 06:35:31PM +0100, quietvoid wrote: > Both parse/write implementations are based on mov/movenc. > > This only adds support for the "Dolby Vision configuration box". > Other configuration boxes, such as > "Dolby Vision enhancement layer configuration box" are not supported. >

Re: [FFmpeg-devel] [PATCH V2 1/3] libavcodec/vaapi_decode: fix the problem that init_pool_size < nb_surface

2021-12-07 Thread Anton Khirnov
Quoting Wenbin Chen (2021-11-30 09:44:04) > For vaapi if the init_pool_size is not zero, the pool size is fixed. > This means max surfaces is init_pool_size, but when mapping vaapi > frame to qsv frame, the init_pool_size < nb_surface. The cause is that > vaapi_decode_make_config() config the init_

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/bitpacked_enc: suppport for frame thread encode

2021-12-07 Thread lance . lmwang
On Wed, Dec 01, 2021 at 09:39:14PM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > multi-thread is active, but I'm not sure why the performance isn't getting > better. plan to push the patchset in the next two day unless there are objection. About

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

2021-12-07 Thread Thilo Borgmann
Hi, will look at this soon (tm), ping me if I don‘t. Thanks, Thilo > Am 02.12.2021 um 00:08 schrieb Romain Beauxis : > > Hi there! > > Anyone interested in the patch below? It fixes an issue with some > macos avfoundation input devices that return formats currently not > supported by the imp

Re: [FFmpeg-devel] [PATCH] libswresample/swresamplec: Err num(negative-size) was used as a function parameter

2021-12-07 Thread Yy
> 2021年12月7日 下午8:42,Michael Niedermayer 写道: > > On Tue, Dec 07, 2021 at 08:12:53PM +0800, Yy wrote: >> >> >>> 2021年12月7日 下午7:25,Michael Niedermayer 写道: >>> >>> On Mon, Dec 06, 2021 at 08:21:42PM +0800, Yu Yang wrote: If cannot allocate memory, ERROR(ENOMEM) '-12' as a parameter will be

Re: [FFmpeg-devel] [PATCH] libswresample/swresamplec: Err num(negative-size) was used as a function parameter

2021-12-07 Thread Michael Niedermayer
On Tue, Dec 07, 2021 at 08:12:53PM +0800, Yy wrote: > > > > 2021年12月7日 下午7:25,Michael Niedermayer 写道: > > > > On Mon, Dec 06, 2021 at 08:21:42PM +0800, Yu Yang wrote: > >> If cannot allocate memory, ERROR(ENOMEM) '-12' as a parameter will be > >> constantly being returned. > >> When run resamp

Re: [FFmpeg-devel] [PATCH v3 2/2] avcodec/vpp_qsv: Copy side data from input to output frame

2021-12-07 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: Tuesday, December 7, 2021 12:51 PM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v3 2/2] avcodec/vpp_qsv: Copy side data > from input to output frame > > Quoting Soft

Re: [FFmpeg-devel] [PATCH] avformat/concatf: ignore trailing whitespaces

2021-12-07 Thread Gyan Doshi
On 2021-12-07 05:39 pm, James Almer wrote: On 12/7/2021 9:00 AM, Gyan Doshi wrote: The concatf protocol returns an opaque error on open if concatf list file contains trailing newlines. ---   libavformat/concat.c | 4   1 file changed, 4 insertions(+) diff --git a/libavformat/concat.c b/

Re: [FFmpeg-devel] [PATCH] libswresample/swresamplec: Err num(negative-size) was used as a function parameter

2021-12-07 Thread Yy
> 2021年12月7日 下午7:25,Michael Niedermayer 写道: > > On Mon, Dec 06, 2021 at 08:21:42PM +0800, Yu Yang wrote: >> If cannot allocate memory, ERROR(ENOMEM) '-12' as a parameter will be >> constantly being returned. >> When run resample() firstly, negative size param would cause buffer-overflow >> an

Re: [FFmpeg-devel] [PATCH] avformat/concatf: ignore trailing whitespaces

2021-12-07 Thread James Almer
On 12/7/2021 9:00 AM, Gyan Doshi wrote: The concatf protocol returns an opaque error on open if concatf list file contains trailing newlines. --- libavformat/concat.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/concat.c b/libavformat/concat.c index 2560811ff9..faeba2

[FFmpeg-devel] [PATCH] avformat/concatf: ignore trailing whitespaces

2021-12-07 Thread Gyan Doshi
The concatf protocol returns an opaque error on open if concatf list file contains trailing newlines. --- libavformat/concat.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/concat.c b/libavformat/concat.c index 2560811ff9..faeba2293a 100644 --- a/libavformat/concat.c +++ b/li

Re: [FFmpeg-devel] [PATCH v3] fftools/opts: Avoid crash when opts could not be allocated

2021-12-07 Thread Yy
> 2021年12月7日 下午5:00,Andreas Rheinhardt 写道: > > Yu Yang: >> If 'opts' could not be allocated, exiting the program to avoid crash when >> release it. >> Before setup_find_stream_info_opts(), checking 'orig_nb_streams' is > 0. >> If 'orig_nb_streams' == 0, it doesn't need 'opts' to getting strea

Re: [FFmpeg-devel] [PATCH v3 2/2] avcodec/vpp_qsv: Copy side data from input to output frame

2021-12-07 Thread Anton Khirnov
Quoting Soft Works (2021-12-07 09:55:37) > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of Anton > > Khirnov > > Sent: Tuesday, December 7, 2021 9:04 AM > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH v3 2/2] avcodec/vpp_qsv: Copy side data > > from in

Re: [FFmpeg-devel] [PATCH 01/10] avformat/utils: Make ff_data_to_hex() zero-terminate the string

2021-12-07 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Most callers want it that way anyway. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/hls.c | 2 -- > libavformat/hlsenc.c| 1 - > libavformat/httpauth.c | 5 - > libavformat/internal.h | 11 +++ > libavformat/movenc.c| 1 - > libav

Re: [FFmpeg-devel] [PATCH] avutil/frame: Add av_frame_transfer_side_data() function

2021-12-07 Thread Andreas Rheinhardt
Anton Khirnov: > From: Soft Works > > Signed-off-by: softworkz > Signed-off-by: Anton Khirnov > --- > doc/APIchanges | 4 +++ > libavutil/frame.c | 63 ++--- > libavutil/frame.h | 20 ++ > libavutil/version.h | 4 +-- > 4 files cha

Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy side data from input to output frame

2021-12-07 Thread Anton Khirnov
Quoting Soft Works (2021-12-07 10:03:28) > > > > -Original Message- > > From: ffmpeg-devel On Behalf Of Anton > > Khirnov > > Sent: Tuesday, December 7, 2021 9:08 AM > > To: FFmpeg development discussions and patches > > Subject: Re: [FFmpeg-devel] [PATCH v2 1/1] avcodec/vpp_qsv: Copy s

Re: [FFmpeg-devel] [PATCH] libswresample/swresamplec: Err num(negative-size) was used as a function parameter

2021-12-07 Thread Michael Niedermayer
On Mon, Dec 06, 2021 at 08:21:42PM +0800, Yu Yang wrote: > If cannot allocate memory, ERROR(ENOMEM) '-12' as a parameter will be > constantly being returned. > When run resample() firstly, negative size param would cause buffer-overflow > and SEGV in swri_rematrix(). > When run swri_rematrix() f

Re: [FFmpeg-devel] [PATCH] avutil/frame: Add av_frame_transfer_side_data() function

2021-12-07 Thread Anton Khirnov
Quoting Hendrik Leppkes (2021-12-07 10:04:47) > On Tue, Dec 7, 2021 at 9:00 AM Anton Khirnov wrote: > > > > Quoting Lynne (2021-12-06 20:12:31) > > > 6 Dec 2021, 19:37 by an...@khirnov.net: > > > > > > > > > I think av_frame_copy_side_data() makes more sense. Transfer > > > implies that it strips

Re: [FFmpeg-devel] [PATCH v2 4/6] avformat/rtsp: check content_ptr before memory allocate

2021-12-07 Thread lance . lmwang
On Tue, Dec 07, 2021 at 11:30:11AM +0200, Martin Storsjö wrote: > On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavformat/rtsp.c | 7 ++- > > 1 file changed, 2 insertions(+), 5 deletions(-) > > > > diff --git a/libav

Re: [FFmpeg-devel] [PATCH 3/3] lavf/sdp: add more thorough error handling

2021-12-07 Thread Martin Storsjö
On Tue, 7 Dec 2021, Anton Khirnov wrote: Quoting Martin Storsjö (2021-12-07 10:14:59) On Sat, 4 Dec 2021, Anton Khirnov wrote: > Return error codes when constructing a stream config fails, rather than > just disregarding the failure and continuing. > Propagate the error codes from av_sdp_creat

Re: [FFmpeg-devel] [PATCH v2 3/6] avformat/rtsp: use MAX_URL_SIZE for one line parse

2021-12-07 Thread lance . lmwang
On Tue, Dec 07, 2021 at 11:27:32AM +0200, Martin Storsjö wrote: > On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > The buf is used for one line of sdp parsing, so it's ok to use MAX_URL_SIZE > > > > Signed-off-by: Limin Wang > > --- > > libavformat/rtsp.c | 2 +-

Re: [FFmpeg-devel] [PATCH 3/3] lavf/sdp: add more thorough error handling

2021-12-07 Thread Anton Khirnov
Quoting Martin Storsjö (2021-12-07 10:14:59) > On Sat, 4 Dec 2021, Anton Khirnov wrote: > > > Return error codes when constructing a stream config fails, rather than > > just disregarding the failure and continuing. > > Propagate the error codes from av_sdp_create(). > > --- > > libavformat/intern

Re: [FFmpeg-devel] [PATCH 3/3] lavf/sdp: add more thorough error handling

2021-12-07 Thread Anton Khirnov
Quoting lance.lmw...@gmail.com (2021-12-05 12:12:54) > On Sat, Dec 04, 2021 at 06:33:00PM +0100, Anton Khirnov wrote: > > Return error codes when constructing a stream config fails, rather than > > just disregarding the failure and continuing. > > Propagate the error codes from av_sdp_create(). > >

[FFmpeg-devel] [PATCH 2/2] avformat/utils: Add const where appropriate

2021-12-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/internal.h | 2 +- libavformat/utils.c| 15 --- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/libavformat/internal.h b/libavformat/internal.h index 20e93d9267..cdc398c49e 100644 --- a/libavformat/internal.h +++ b/

[FFmpeg-devel] [PATCH 1/2] avformat/utils: Fix wrong indentation

2021-12-07 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/utils.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 7840e8717c..827e7c8d5a 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -

[FFmpeg-devel] [PATCH 4/4] avfilter/flip_vulkan: fix incorrect sematic

2021-12-07 Thread Wu Jianhua
The input and output are arrays of images, so it's better to use the plural to align them to the variable name of VkDescriptorImageInfo. Signed-off-by: Wu Jianhua --- libavfilter/vf_flip_vulkan.c | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git

[FFmpeg-devel] [PATCH 3/4] avfilter/gblur_vulkan: fix incorrect sematic

2021-12-07 Thread Wu Jianhua
The input and output are arrays of images, so it's better to use the plural to align them to the variable name of VkDescriptorImageInfo. Signed-off-by: Wu Jianhua --- libavfilter/vf_gblur_vulkan.c | 60 +-- 1 file changed, 30 insertions(+), 30 deletions(-) diff -

[FFmpeg-devel] [PATCH 2/4] avfilter/vf_transpose: fix un-checked potential memory allocation failure

2021-12-07 Thread Wu Jianhua
Signed-off-by: Wu Jianhua --- libavfilter/vf_transpose.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_transpose.c b/libavfilter/vf_transpose.c index f9f0d70cd5..b964daeee3 100644 --- a/libavfilter/vf_transpose.c +++ b/libavfilter/vf_transpose

[FFmpeg-devel] [PATCH 1/4] avfilter: add a transpose_vulkan filter

2021-12-07 Thread Wu Jianhua
The following command is on how to apply transpose_vulkan filter: ffmpeg -init_hw_device vulkan -i input.264 -vf \ hwupload=extra_hw_frames=16,transpose_vulkan,hwdownload,format=yuv420p output.264 Signed-off-by: Wu Jianhua --- configure | 1 + libavfilter/Makefile

Re: [FFmpeg-devel] [PATCH v2 6/6] avformat/rtsp: fix the error code from ffurl_read_complete()

2021-12-07 Thread Martin Storsjö
On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 4ae810d..c591664 100644 --- a/libavformat/rtsp.c +++ b/lib

Re: [FFmpeg-devel] [PATCH v2 5/6] avformat/rtsp: add error code handling for ff_rtsp_skip_packet()

2021-12-07 Thread Martin Storsjö
On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c| 15 ++- libavformat/rtsp.h| 4 +++- libavformat/rtspenc.c | 7 +-- 3 files changed, 18 insertions(+), 8 deletions(-) This should be fine. // Martin __

Re: [FFmpeg-devel] [PATCH v2 4/6] avformat/rtsp: check content_ptr before memory allocate

2021-12-07 Thread Martin Storsjö
On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 3e4a68a..b3d1e91 100644 --- a/libavformat/rtsp.c +++ b/li

Re: [FFmpeg-devel] [PATCH v2 3/6] avformat/rtsp: use MAX_URL_SIZE for one line parse

2021-12-07 Thread Martin Storsjö
On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang The buf is used for one line of sdp parsing, so it's ok to use MAX_URL_SIZE Signed-off-by: Limin Wang --- libavformat/rtsp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/

Re: [FFmpeg-devel] [PATCH v2 2/6] avformat/rtsp: free the alloc memory if failed

2021-12-07 Thread Martin Storsjö
On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 47120fd..5cffe0b 100644 --- a/libavformat/rtsp.c +++ b/libavf

Re: [FFmpeg-devel] [PATCH v2 1/6] avformat/rtsp: remove redundant assignment

2021-12-07 Thread Martin Storsjö
On Mon, 6 Dec 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/rtsp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index deaed34..47120fd 100644 --- a/libavformat/rtsp.c +++ b/libav

Re: [FFmpeg-devel] [PATCH 3/3] lavf/sdp: add more thorough error handling

2021-12-07 Thread Martin Storsjö
On Sat, 4 Dec 2021, Anton Khirnov wrote: Return error codes when constructing a stream config fails, rather than just disregarding the failure and continuing. Propagate the error codes from av_sdp_create(). --- libavformat/internal.h | 7 +- libavformat/sdp.c | 189

[FFmpeg-devel] [PATCH V6 5/5] libavutil/hwcontext_vulkan: specify the modifier to create VKImage

2021-12-07 Thread Wenbin Chen
When vulkan image exports to drm, the tilling need to be VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT. Now add code to create vulkan image using this format. Now the following command line works: ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format \ vaapi -i input_1080p.2

[FFmpeg-devel] [PATCH V6 4/5] libavutil/hwcontext_vulkan: Add support to hwmap to software frame when using contiguous_planes flag.

2021-12-07 Thread Wenbin Chen
Add support to map vulkan frames to software frames when using contiguous_planes flag. Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vulkan.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index eef

[FFmpeg-devel] [PATCH V6 3/5] libavutil/hwcontext_vulkan: Allocate vkFrame in one memory

2021-12-07 Thread Wenbin Chen
The vaapi can import external frame, but the planes of the external frames should be in the same drm object. A new option "contiguous_planes" is added to device. This flag tells device to allocate places in one memory. When device is derived from vaapi this flag will be enabled. A new flag frame_fl

[FFmpeg-devel] [PATCH V6 2/5] libavutil/hwcontext_vaapi: Add a new nv12 format map to support vulkan frame

2021-12-07 Thread Wenbin Chen
Vulkan will map nv12 to R8 and GR88, so add this map to vaapi to support vulkan frame. Signed-off-by: Wenbin Chen --- libavutil/hwcontext_vaapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/hwcontext_vaapi.c b/libavutil/hwcontext_vaapi.c index 75acc851d6..994b744e4d 100644 ---

[FFmpeg-devel] [PATCH V6 1/5] hwcontext_vaapi: Use PRIME_2 memory type for modifiers.

2021-12-07 Thread Wenbin Chen
From: Bas Nieuwenhuizen This way we can pass explicit modifiers in. Sometimes the modifier matters for the number of memory planes that libva accepts, in particular when dealing with driver-compressed textures. Furthermore the driver might not actually be able to determine the implicit modifier i

  1   2   >