Re: [FFmpeg-devel] [PATCHv2 1/3] avutil/eval: separate AVExpr state to a new AVExprState struct

2020-01-01 Thread Michael Niedermayer
On Mon, Dec 30, 2019 at 11:23:40PM +0100, Marton Balint wrote: > Also add helper functions to allocate and free such a struct, and make it > usable by providing a new av_eval_expr2 function for which you can specify a > custom AVExprState. > > Signed-off-by: Marton Balint > --- > doc/APIchanges

[FFmpeg-devel] [PATCH v2 12/17] avformat/flvenc: Use array instead of linked list for index

2020-01-01 Thread Andreas Rheinhardt
Using a linked list had very much overhead (the pointer to the next entry increased the size of the index entry struct from 16 to 24 bytes, not to mention the overhead of having separate allocations), so it is better to (re)allocate a continuous array for the index. av_fast_realloc_array() is used

[FFmpeg-devel] [PATCH v2 11/17] avutil/mem: Add av_fast_realloc_array()

2020-01-01 Thread Andreas Rheinhardt
This is an array-equivalent of av_fast_realloc(). Its advantages compared to using av_fast_realloc() for allocating arrays are as follows: a) It performs its own overflow checks for the multiplication that is implicit in array allocations. (And it only needs to perform these checks (as well as the

[FFmpeg-devel] [PATCH v2 15/17] avformat/matroskaenc: Use av_fast_realloc_array for index entries

2020-01-01 Thread Andreas Rheinhardt
Currently, the Matroska muxer reallocates its array of index entries each time another entry is added. This is bad performance-wise, especially on Windows where reallocations are slow. This is solved by switching to av_fast_realloc_array() which ensures that actual reallocations will happen only se

[FFmpeg-devel] [PATCH v2 16/17] avformat/matroskadec: Use av_fast_realloc_array()

2020-01-01 Thread Andreas Rheinhardt
instead of av_fast_realloc() for allocating an array. It has the advantage of doing it's own overflow checks and does not overallocate unnecessarily: It allocates exactly one element if one element is desired. This is advantageous for CueTrackPositions: While it is allowed (and supported) to have m

Re: [FFmpeg-devel] [PATCH v2 11/17] avutil/mem: Add av_fast_realloc_array()

2020-01-01 Thread Nicolas George
Andreas Rheinhardt (12020-01-01): > What has > not been done is switching to size_t. This function can still be turned > into a wrapper for a size_t function if the need for such a function > arises. I do not agree with that. size_t is the correct type for that use, and therefore should be the cho

Re: [FFmpeg-devel] [PATCH v2 12/17] avformat/flvenc: Use array instead of linked list for index

2020-01-01 Thread Carl Eugen Hoyos
Am Mi., 1. Jan. 2020 um 14:28 Uhr schrieb Andreas Rheinhardt : > > Using a linked list had very much overhead (the pointer to the next > entry increased the size of the index entry struct from 16 to 24 bytes, > not to mention the overhead of having separate allocations), so it is > better to (re)al

Re: [FFmpeg-devel] [PATCH 5/7] avformat/matroskadec: Use AV_DICT_DONT_STRDUP_VAL to save av_strdup

2020-01-01 Thread Michael Niedermayer
On Sun, Nov 10, 2019 at 05:07:31AM +0100, Andreas Rheinhardt wrote: > This will likely also fix CID 1452562, a false positive resulting from > Coverity thinking that av_dict_set() automatically frees its key and > value parameters (even without the AV_DICT_DONT_STRDUP_* flags). > > Signed-off-by:

Re: [FFmpeg-devel] [PATCH] configure: bump year

2020-01-01 Thread Michael Niedermayer
On Wed, Jan 01, 2020 at 03:25:17PM +0800, myp...@gmail.com wrote: > On Wed, Jan 1, 2020 at 2:46 PM Gyan Doshi wrote: > > > > --- > > configure | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/configure b/configure > > index 43dc409fe6..965b4c71b8 100755 > > --- a/con

Re: [FFmpeg-devel] [PATCH 05/20] avformat/matroskaenc: Check return value of ff_isom_write_hvcc()

2020-01-01 Thread Michael Niedermayer
On Wed, Jan 01, 2020 at 12:42:51PM +0800, myp...@gmail.com wrote: > On Wed, Jan 1, 2020 at 8:59 AM Andreas Rheinhardt > wrote: > > > > The Matroska muxer currently does not check the return value of > > ff_isom_write_hvcc(), the function used to write mp4-style > > HEVC-extradata as Matroska also

Re: [FFmpeg-devel] [PATCH 04/20] avformat/matroskaenc: Adapt documentation of put_ebml_num

2020-01-01 Thread Michael Niedermayer
On Wed, Jan 01, 2020 at 01:58:21AM +0100, Andreas Rheinhardt wrote: > to its actual behaviour: That it uses the least amount of bytes unless > overridden. > > The current documentation leaves it undefined how many bytes will be used > when no number to use has been given explicitly. But several es

Re: [FFmpeg-devel] [PATCH] configure: bump year

2020-01-01 Thread Gyan
On 01-01-2020 09:00 pm, Michael Niedermayer wrote: On Wed, Jan 01, 2020 at 03:25:17PM +0800, myp...@gmail.com wrote: On Wed, Jan 1, 2020 at 2:46 PM Gyan Doshi wrote: --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 43dc409fe6..9

Re: [FFmpeg-devel] [PATCH] Adding a flag to give user the option to have ffmpeg fail instead of warn when mismatches are found in rtmp url stream or application names.

2020-01-01 Thread Michael Niedermayer
On Wed, Sep 25, 2019 at 11:57:08AM -0700, William Martin wrote: > From: Will Martin > > Motivation: When running multiple rtmp ingest on the same machine on the same > port, users may want to explicitly forbid mismatched rtmp streams from > successfully completing handshakes. This patch allows

Re: [FFmpeg-devel] [PATCH 2/4] avformat/mpeg: Remove secondary packet for reading VobSub

2020-01-01 Thread Michael Niedermayer
On Tue, Oct 08, 2019 at 07:41:14AM +0200, Andreas Rheinhardt wrote: > When vobsub_read_packet() reads a packet, it uses a dedicated AVPacket > to get the subtitle timing and position from an FFDemuxSubtitlesQueue > (which has been filled with this data during reading the idx file in > vobsub_read_h

Re: [FFmpeg-devel] [PATCH] compat/avisynth: Fix unicode compilation.

2020-01-01 Thread Michael Niedermayer
On Mon, Dec 30, 2019 at 10:16:44PM -0500, Stephen Hutchinson wrote: > On 12/30/2019 11:11 AM, Matt Oliver wrote: > >--- > > compat/avisynth/avisynth_c.h | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > >diff --git a/compat/avisynth/avisynth_c.h b/compat/avisynth/avisynth_c.h > >inde

Re: [FFmpeg-devel] [PATCHv2 1/3] avutil/eval: separate AVExpr state to a new AVExprState struct

2020-01-01 Thread Marton Balint
On Wed, 1 Jan 2020, Michael Niedermayer wrote: On Mon, Dec 30, 2019 at 11:23:40PM +0100, Marton Balint wrote: Also add helper functions to allocate and free such a struct, and make it usable by providing a new av_eval_expr2 function for which you can specify a custom AVExprState. Signed-off-

Re: [FFmpeg-devel] [PATCH V1 02/12] lavc/libkvazaar: fix memory leak after av_dict_parse_string fail

2020-01-01 Thread Marton Balint
On Wed, 1 Jan 2020, James Almer wrote: On 1/1/2020 2:20 AM, Jun Zhao wrote: From: Jun Zhao In case of failure, all the successfully set entries are stored in *pm. We need to manually free the created dictionary to avoid memory leak. Signed-off-by: Jun Zhao --- libavcodec/libkvazaar.c |

[FFmpeg-devel] [PATCH] avformat/image2: Upon request, make available extra metadata, fields related to input path to be used by filters.

2020-01-01 Thread Alexandre Heitor Schmidt
The patch follows attached, to avoid formatting issues. The commit message is as follows: avformat/image2: Upon request, make available extra metadata  fields related to input path to be used by filters. libavformat/img2.h: New field export_path_metadata to VideoDemuxData to only allow the use o

Re: [FFmpeg-devel] [PATCHv2 8/8] avformat/img2enc: add support for specifying protocol options

2020-01-01 Thread Marton Balint
On Tue, 31 Dec 2019, Michael Niedermayer wrote: On Tue, Dec 31, 2019 at 12:37:02PM +0100, Nicolas George wrote: Marton Balint (12019-12-28): v2: simplified example Signed-off-by: Marton Balint --- doc/muxers.texi | 11 +++ libavformat/img2enc.c | 13 - 2 files ch

Re: [FFmpeg-devel] [PATCH v3 1/5] avutil: add AV_FRAME_DATA_USER_DATA_UNREGISTERED side data type

2020-01-01 Thread Moritz Barsnick
On Thu, Dec 19, 2019 at 13:09:03 +0800, lance.lmw...@gmail.com wrote: > +2019-12-17 - xx - lavu 56.37.101 - frame.h [...] > #define LIBAVUTIL_VERSION_MAJOR 56 > -#define LIBAVUTIL_VERSION_MINOR 36 > +#define LIBAVUTIL_VERSION_MINOR 37 > #define LIBAVUTIL_VERSION_MICRO 101 When bumping

Re: [FFmpeg-devel] [PATCH 01/13] avutil/opt: add full support for AV_OPT_TYPE_DICT

2020-01-01 Thread Marton Balint
On Fri, 27 Dec 2019, Marton Balint wrote: On Thu, 26 Dec 2019, Michael Niedermayer wrote: On Wed, Dec 25, 2019 at 10:43:02PM +0100, Marton Balint wrote: Now it is possible to set them from a string, to serialize them and to use a default value. Signed-off-by: Marton Balint --- libavu

Re: [FFmpeg-devel] [PATCH v1] avfilter: add overlay vaapi filter

2020-01-01 Thread Moritz Barsnick
On Fri, Dec 20, 2019 at 10:55:39 +0800, Xinpeng Sun wrote: > +Set blocking detection thresholds. Allowed range is 0.0 to 1.0, it > +need input video has alpha channel. Incorrect grammar. I suggest ", it requires an input video with alpha channel". > +ret = ff_formats_ref(ff_make_format_list(m

Re: [FFmpeg-devel] [PATCH v2 3/3] avfilter/vf_convolution: Add X86 SIMD optimizations for filter_column()

2020-01-01 Thread Moritz Barsnick
On Sun, Dec 22, 2019 at 16:37:03 +0800, xuju...@sjtu.edu.cn wrote: > +if (s->mode[i] == MATRIX_COLUMN) { > +if (EXTERNAL_SSE4(cpu_flags)) > +s->filter[i] = ff_filter_column_sse4; > +} Incorrect indentation. Moritz ___

[FFmpeg-devel] [PATCH 1/2] avdevice/xcbgrab: move some initialization code from pixfmt_from_pixmap_format to create_stream

2020-01-01 Thread Marton Balint
Signed-off-by: Marton Balint --- libavdevice/xcbgrab.c | 24 +--- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index 113cce71a5..06b486a536 100644 --- a/libavdevice/xcbgrab.c +++ b/libavdevice/xcbgrab.c @@ -487,7

[FFmpeg-devel] [PATCH 2/2] avdevice/xcbgrab: check if frame size fits in INT_MAX

2020-01-01 Thread Marton Balint
Also fixes a possible overflow and sets stream bitrate. Signed-off-by: Marton Balint --- libavdevice/xcbgrab.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/libavdevice/xcbgrab.c b/libavdevice/xcbgrab.c index 06b486a536..6f6b2dbf15 100644 --- a/libavde

[FFmpeg-devel] [PATCH 2/2] avcodec/rawdec: Use linesize in b64a

2020-01-01 Thread Michael Niedermayer
Fixes: out of array access Fixes: 19750/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RAWVIDEO_fuzzer-5074834119983104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/rawdec.c | 11 +++

[FFmpeg-devel] [PATCH 1/2] avcodec/smacker: Check space before decoding type

2020-01-01 Thread Michael Niedermayer
Fixes: Timeout (232sec -> 280ms) Fixes: 19682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5654129649385472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/smacker.c | 4 ++

Re: [FFmpeg-devel] [PATCH v3 1/5] avutil: add AV_FRAME_DATA_USER_DATA_UNREGISTERED side data type

2020-01-01 Thread lance . lmwang
On Wed, Jan 01, 2020 at 09:45:19PM +0100, Moritz Barsnick wrote: > On Thu, Dec 19, 2019 at 13:09:03 +0800, lance.lmw...@gmail.com wrote: > > +2019-12-17 - xx - lavu 56.37.101 - frame.h > [...] > > #define LIBAVUTIL_VERSION_MAJOR 56 > > -#define LIBAVUTIL_VERSION_MINOR 36 > > +#define LIB

Re: [FFmpeg-devel] [PATCH V1 02/12] lavc/libkvazaar: fix memory leak after av_dict_parse_string fail

2020-01-01 Thread myp...@gmail.com
On Thu, Jan 2, 2020 at 12:46 AM Marton Balint wrote: > > > > On Wed, 1 Jan 2020, James Almer wrote: > > > On 1/1/2020 2:20 AM, Jun Zhao wrote: > >> From: Jun Zhao > >> > >> In case of failure, all the successfully set entries are stored in > >> *pm. We need to manually free the created dictionary

Re: [FFmpeg-devel] [PATCH V2] lavf/libsrt: add version guard for srt encryption control

2020-01-01 Thread myp...@gmail.com
On Sun, Dec 29, 2019 at 9:57 AM Jun Zhao wrote: > > From: Jun Zhao > > add version guard for srt encryption control. and use > SRTO_STRICTENC(53) for compatibility. > > Signed-off-by: Jun Zhao > --- > libavformat/libsrt.c | 11 +-- > 1 files changed, 9 insertions(+), 2 deletions(-) >

[FFmpeg-devel] [PATCH v5 2/4] avcodec/hevc_sei: add support for user data unregistered SEI message

2020-01-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/hevc_sei.c | 31 +++ libavcodec/hevc_sei.h | 6 ++ libavcodec/hevcdec.c| 14 ++ tests/ref/fate/hevc-monochrome-crop | 3 +++ 4 files changed, 54 in

[FFmpeg-devel] [PATCH v5 1/4] add AV_FRAME_DATA_USER_DATA_UNREGISTERED side data type

2020-01-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- rebase the patchset for the latest code doc/APIchanges | 3 +++ libavutil/frame.c | 1 + libavutil/frame.h | 8 libavutil/version.h | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIch

[FFmpeg-devel] [PATCH v5 3/4] avfilter/vf_showinfo: display user data unregistered message

2020-01-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavfilter/vf_showinfo.c | 33 + 1 file changed, 33 insertions(+) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 31f6b32..bb3b37e 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/v

[FFmpeg-devel] [PATCH v5 4/4] avcodec/h264: create user data unregistered side data H.264

2020-01-01 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/h264_sei.c | 20 +++-- libavcodec/h264_sei.h | 2 + libavcodec/h264_slice.c | 14 tests/ref/fate/mov-zombie | 195 ++ 4 files changed, 161 insertions(+), 70 deletions(-) dif

[FFmpeg-devel] [PATCH] Removes linebreaks forbidden by the WEBVTT spec on encode

2020-01-01 Thread bloomtom
libavformat/webvttenc.c: The WEBVTT spec only allows one sequential linebreak (\r, \n) character within packet data. Two or more linebreaks in a row signifies the end of a data packet. Previous behavior allows data to be orphaned outside packets parsed by the spec in the best case, but some parsers

Re: [FFmpeg-devel] [PATCH v1] avfilter: add overlay vaapi filter

2020-01-01 Thread Sun, Xinpeng
> -Original Message- > From: Paul B Mahol > Sent: Tuesday, December 31, 2019 5:06 PM > To: FFmpeg development discussions and patches > Cc: Sun, Xinpeng ; Zhou, Zachary > > Subject: Re: [FFmpeg-devel] [PATCH v1] avfilter: add overlay vaapi filter > > On 12/20/19, Xinpeng Sun wrote: >

Re: [FFmpeg-devel] [PATCH v1] avfilter: add overlay vaapi filter

2020-01-01 Thread Sun, Xinpeng
> -Original Message- > From: ffmpeg-devel On Behalf Of Moritz > Barsnick > Sent: Thursday, January 2, 2020 6:30 AM > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH v1] avfilter: add overlay vaapi filter > > On Fri, Dec 20, 2019 at 10:55:39 +0800, Xin