Re: [FFmpeg-devel] [PATCH] dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread mode.

2020-09-19 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of > xuju...@sjtu.edu.cn > Sent: 2020年9月19日 23:24 > To: ffmpeg-devel@ffmpeg.org > Cc: xuju...@sjtu.edu.cn > Subject: [FFmpeg-devel] [PATCH] dnn_backend_native_layer_conv2d.c: fix bug > of loop boundary in single thread mode. > > From:

[FFmpeg-devel] [PATCH] avcodec/cfhd: check that lowpass_height is >= 3 when used in vertical filter

2020-09-19 Thread Paul B Mahol
Also return early when encountering fatal error. Signed-off-by: Paul B Mahol --- libavcodec/cfhd.c | 50 ++- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c index ea35f03869..7b4ba4c3dd 100644 --- a

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: fix broken logic in ffio_ensure_seekback()

2020-09-19 Thread Paul B Mahol
On Sat, Sep 19, 2020 at 11:46:50PM +0200, Marton Balint wrote: > > > On Sat, 19 Sep 2020, Paul B Mahol wrote: > > > On Thu, Sep 17, 2020 at 12:31:06PM +0200, Paul B Mahol wrote: > > > This removes big CPU overhead for demuxing chained ogg streams. > > > > > > Signed-off-by: Paul B Mahol > > >

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: fix broken logic in ffio_ensure_seekback()

2020-09-19 Thread Marton Balint
On Sat, 19 Sep 2020, Paul B Mahol wrote: On Thu, Sep 17, 2020 at 12:31:06PM +0200, Paul B Mahol wrote: This removes big CPU overhead for demuxing chained ogg streams. Signed-off-by: Paul B Mahol --- libavformat/aviobuf.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) w

Re: [FFmpeg-devel] [PATCH v4] avcodec/cfhd: More strictly check tag order and multiplicity

2020-09-19 Thread Michael Niedermayer
On Sat, Sep 19, 2020 at 07:47:49PM +0200, Paul B Mahol wrote: > On Sat, Sep 19, 2020 at 7:45 PM Michael Niedermayer > wrote: > > > On Mon, Aug 31, 2020 at 07:42:20PM +0200, Paul B Mahol wrote: > > > On 8/31/20, Michael Niedermayer wrote: > > > > On Mon, Aug 31, 2020 at 11:14:07AM +0200, Paul B M

Re: [FFmpeg-devel] [PATCH 4/5] avcodec/ansi: Check nb_args for overflow

2020-09-19 Thread Paul B Mahol
On Sat, Sep 19, 2020 at 09:31:08PM +0200, Michael Niedermayer wrote: > Fixes: Integer overflow (no testcase) > > Signed-off-by: Michael Niedermayer > --- > libavcodec/ansi.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > ok ___ ffmpeg-de

[FFmpeg-devel] [PATCH 1/5] avcodec/sonic: Check for overread

2020-09-19 Thread Michael Niedermayer
Fixes: Timeout (too long -> 1.3 sec) Fixes: 24358/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SONIC_fuzzer-5107284099989504 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/sonic.c | 3 ++

[FFmpeg-devel] [PATCH 3/5] avcodec/vp9dsp_template: Fix integer overflows in idct16_1d()

2020-09-19 Thread Michael Niedermayer
Fixes: signed integer overflow: -190760 * 11585 cannot be represented in type 'int' Fixes: 25471/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5743354917421056 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Micha

[FFmpeg-devel] [PATCH 2/5] avcodec/hevcdec: Check slice_cb_qp_offset / slice_cr_qp_offset

2020-09-19 Thread Michael Niedermayer
Fixes: signed integer overflow: 29 + 2147483640 cannot be represented in type 'int' Fixes: 25413/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5697909331591168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Mich

[FFmpeg-devel] [PATCH 5/5] avcodec/ansi: Check initial dimensions

2020-09-19 Thread Michael Niedermayer
Fixes: Timeout (minutes to less than 1sec) Fixes: 25682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ANSI_fuzzer-6320712032452608 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/ansi.c |

[FFmpeg-devel] [PATCH 4/5] avcodec/ansi: Check nb_args for overflow

2020-09-19 Thread Michael Niedermayer
Fixes: Integer overflow (no testcase) Signed-off-by: Michael Niedermayer --- libavcodec/ansi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/ansi.c b/libavcodec/ansi.c index 516d07db69..272185230d 100644 --- a/libavcodec/ansi.c +++ b/libavcodec/ansi.c @@ -431,7

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: fix broken logic in ffio_ensure_seekback()

2020-09-19 Thread Paul B Mahol
On Thu, Sep 17, 2020 at 12:31:06PM +0200, Paul B Mahol wrote: > This removes big CPU overhead for demuxing chained ogg streams. > > Signed-off-by: Paul B Mahol > --- > libavformat/aviobuf.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > will apply soon. __

[FFmpeg-devel] [PATCH] configure: Add atsc_a53 dependencies for H.264 and HEVC parser

2020-09-19 Thread Andreas Rheinhardt
They need it because they make use of SEI parsing code. Signed-off-by: Andreas Rheinhardt --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 5d68695192..70740a7bc7 100755 --- a/configure +++ b/configure @@ -3143,8 +3143,8 @@ wmv3_cry

Re: [FFmpeg-devel] [PATCH v4] avcodec/cfhd: More strictly check tag order and multiplicity

2020-09-19 Thread Paul B Mahol
On Sat, Sep 19, 2020 at 7:45 PM Michael Niedermayer wrote: > On Mon, Aug 31, 2020 at 07:42:20PM +0200, Paul B Mahol wrote: > > On 8/31/20, Michael Niedermayer wrote: > > > On Mon, Aug 31, 2020 at 11:14:07AM +0200, Paul B Mahol wrote: > > >> On 8/31/20, Michael Niedermayer wrote: > > >> > This i

Re: [FFmpeg-devel] [PATCH v4] avcodec/cfhd: More strictly check tag order and multiplicity

2020-09-19 Thread Michael Niedermayer
On Mon, Aug 31, 2020 at 07:42:20PM +0200, Paul B Mahol wrote: > On 8/31/20, Michael Niedermayer wrote: > > On Mon, Aug 31, 2020 at 11:14:07AM +0200, Paul B Mahol wrote: > >> On 8/31/20, Michael Niedermayer wrote: > >> > This is based on the encoder and a small number of CFHD sample files > >> > I

[FFmpeg-devel] [PATCH 20/21] avformat/dashdec: Fix memleak on allocation error, avoid allocation

2020-09-19 Thread Andreas Rheinhardt
get_content_url() allocates two buffers for temporary strings and when one of them couldn't be allocated, it simply returns, although one of the two allocations could have succeeded and would leak in this scenario. This can be fixed by avoiding one of the temporary buffers. Signed-off-by: Andreas

[FFmpeg-devel] [PATCH 21/21] avformat/dashdec: Avoid duplicating string

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- There is still stuff left to fix in this demuxer after this patchset: 1. resolve_content_path() is in bad shape; i.e. it can try to read str[-1]. 2. One can get a crash in get_current_fragment() (or rather in ff_dash_fill_tmpl_params()) when one has a represen

[FFmpeg-devel] [PATCH 19/21] avformat/dashdec: Cosmetics

2020-09-19 Thread Andreas Rheinhardt
1. Perform the necessary reindentations after the last few commits. 2. Adapt switches to the ordinary indentation style. 3. Now that the effective lifetimes of the variables containing the freshly allocated strings used when parsing the representation are disjoint, the variables can be replaced by

[FFmpeg-devel] [PATCH 18/21] avformat/dashdec: Remove redundant casts to const

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 90 +-- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 3b6ae29b1b..71c6b5cc1a 100644 --- a/libavformat/dashdec.c +++ b/libavfo

[FFmpeg-devel] [PATCH 15/21] avformat/dashdec: Fix memleaks on error to add representation to dynarray

2020-09-19 Thread Andreas Rheinhardt
Up until now, the DASH demuxer used av_dynarray_add() to add audio/video/subtitles representations to arrays. Yet av_dynarray_add() frees the array upon failure, leading to leaks of its elements; furthermore, the element to be added leaks, too. This has been fixed by using av_dynarray_add_nofree()

[FFmpeg-devel] [PATCH 16/21] avformat/dashdec: Remove redundant checks

2020-09-19 Thread Andreas Rheinhardt
This commit removes two always-true checks as well as a dead default case of a switch. The check when parsing manifests is always true, because we now jump to the cleaning code in case the format of the representation is unknown. The default case of the switch is dead, because the type of the repre

[FFmpeg-devel] [PATCH 17/21] avformat/dashdec: Return early for unsupported representations

2020-09-19 Thread Andreas Rheinhardt
This allows to reduce the level of indentation for parsing the supported representations (audio, video and subtitles). It also allows to avoid some allocations and frees for unsupported representations. Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 30 +++-

[FFmpeg-devel] [PATCH 08/21] avformat/dashdec, hls: Update correct pointer to AVDictionary

2020-09-19 Thread Andreas Rheinhardt
open_url() in the DASH as well in the hls demuxer share a common bug: They modify an AVDictionary (i.e. set a new entry) given to them as AVDictionary *, yet if this new entry leads to reallocation and relocation of the AVDictionary, the caller's pointer will become dangling, leading to use-after-f

[FFmpeg-devel] [PATCH 10/21] avformat/dashdec: Fix memleaks upon read_header failure

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Making sure that it's safe to call this demuxer's read_close function upon read_header failure was of course the initial rationale behind this patchset. libavformat/dashdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/dashdec.c b/libav

[FFmpeg-devel] [PATCH 14/21] avformat/dashdec: Fix leak of representation languages

2020-09-19 Thread Andreas Rheinhardt
These languages are normally freed after having been added as metadata to their respective AVStreams. Yet if one never reaches said point, they leak. This can happen as a result of an error when reading the header or as a result of refreshing the manifests. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 09/21] avformat/dashdec: Check allocation of AVProgram

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- What do we need this program for anyway? What sense does it make to create a single program containing all streams? libavformat/dashdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 55212661be..4f87

[FFmpeg-devel] [PATCH 13/21] avformat/dashdec: Fix leak of string on error when parsing representation

2020-09-19 Thread Andreas Rheinhardt
The DASH demuxer currently extracts several strings at once from an xml document before processing them one by one; these strings are allocated, stored in local variables and need to be freed by the demuxer itself. So if an error happens when processing one of them, all strings need to be freed bef

[FFmpeg-devel] [PATCH 11/21] avformat/dashdec: Remove unused index of representation

2020-09-19 Thread Andreas Rheinhardt
It is always zero. Also remove other unused elements. Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 41 + 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 311a19e425..82cb33

[FFmpeg-devel] [PATCH 06/21] avformat/dashdec: Free subtitle representations on exit

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 8b421a4493..3b83075e7a 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -2274,6 +2274,7 @@ static int dash_close(AVF

[FFmpeg-devel] [PATCH 12/21] avformat/dashdec: Fix leak of representation on error

2020-09-19 Thread Andreas Rheinhardt
If parsing a representation fails, it is not added to the list of representations and is therefore not freed in dash_close(); it therefore leaked in most error paths in parse_manifest_representation() (some error paths had (incomplete) code for freeing). This commit fixes freeing the representation

[FFmpeg-devel] [PATCH 07/21] avformat/dashdec: Fix leak of AVDictionary on error

2020-09-19 Thread Andreas Rheinhardt
Just postpone the allocation of the dict until it is really needed (after the checks that can fail). Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 3b83075e7a

[FFmpeg-devel] [PATCH 05/21] avformat/dashdec: Free strings as soon as they aren't needed anymore

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 15 --- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 3f51e079cf..8b421a4493 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -616,9 +616

[FFmpeg-devel] [PATCH 02/21] avformat/dashdec: Remove dead code

2020-09-19 Thread Andreas Rheinhardt
The code in question seems to have been copied from about 70 lines above; yet the code here is only executed if some of the variables (namely representation_segmenttemplate_node and fragment_template_node) are NULL, so it makes no sense to check them for a child element. Also remove a redundant re

[FFmpeg-devel] [PATCH 04/21] avformat/dashdec: Don't overwrite and leak old initialization fragments

2020-09-19 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- One could also error out instead. libavformat/dashdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index d84da16dbd..3f51e079cf 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -614,6 +6

[FFmpeg-devel] [PATCH 03/21] avformat/dashdec: Don't leave representation in inconsistent state on error

2020-09-19 Thread Andreas Rheinhardt
This currently doesn't cause any trouble, because the only caller did not clean up the representation upon error at all; but fixing this is a prerequisite for doing so. Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[FFmpeg-devel] [PATCH 01/21] avformat/dashdec: Avoid double free on error

2020-09-19 Thread Andreas Rheinhardt
When using one of the AV_DICT_DONT_STRDUP_KEY/VAL flags, av_dict_set() already frees the key/value on error, so that freeing it again would lead to a double free. Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/li

[FFmpeg-devel] [PATCH] dnn_backend_native_layer_conv2d.c: fix bug of loop boundary in single thread mode.

2020-09-19 Thread xujunzz
From: Xu Jun Before patch, fate test for dnn may fail in some Windows environment while succeed in my Linux. The bug was caused by a wrong loop boundary. Win10 and Linux seems to have different explaination for that.After patch, fate test succeed in my windows mingw 64-bit. Signed-off-by: Xu Jun

[FFmpeg-devel] Looking for Developers with advanced FFmpeg

2020-09-19 Thread Patrick Cedrowski
Hello - I'm looking to *hire a skilled developer* to aid in some advanced FFmpeg commands pertaining to encoding and broadcasting. Please shoot me an email and I'd be happy to go into details. My company, *Inlet Media*, is a US based company. Thank you and look forward to hearing from someone.

Re: [FFmpeg-devel] [PATCH 4/9] avformat/rmdec: Actually return value < 0 on read_header failure

2020-09-19 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The RealMedia demuxer's read_header function initially initializes ret, > the variable designated for the return variable to -1. Afterwards, chunks > of the file are parsed in a loop until an error happens or until the actual > frame data is encountered. If the first function

[FFmpeg-devel] [PATCH v2] avutil/pixfmt: improve definition of AVColorRange

2020-09-19 Thread Jan Ekström
As it was brought up that the current documentation leaves things as specific to YCbCr only, ICtCp and RGB are now mentioned. Additionally, the specifications on which these definitions of narrow and full range are defined are mentioned. This way, the documentation of AVColorRange should now match

Re: [FFmpeg-devel] [PATCH] avutil/pixfmt: improve definition of AVColorRange

2020-09-19 Thread Jan Ekström
On Sat, Sep 19, 2020 at 12:47 AM James Almer wrote: > > On 9/18/2020 6:05 PM, Jan Ekström wrote: > > As it was brought up that the current documentation leaves things > > as specific to YCbCr only, ICtCp and RGB are now mentioned. > > Additionally, the specifications on which these definitions of

Re: [FFmpeg-devel] [PATCH 2/6] avformat/wc3movie: Cleanup on wc3_read_header() failure

2020-09-19 Thread Andreas Rheinhardt
Michael Niedermayer: > On Sun, Jul 19, 2020 at 07:55:24PM +0200, Andreas Rheinhardt wrote: >> James Almer: >>> On 7/19/2020 2:42 PM, Michael Niedermayer wrote: Fixes: memleak Fixes: 23660/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6007508031504384 Found-by: conti

Re: [FFmpeg-devel] [PATCH 2/6] avformat/wc3movie: Cleanup on wc3_read_header() failure

2020-09-19 Thread Michael Niedermayer
On Sun, Jul 19, 2020 at 07:55:24PM +0200, Andreas Rheinhardt wrote: > James Almer: > > On 7/19/2020 2:42 PM, Michael Niedermayer wrote: > >> Fixes: memleak > >> Fixes: > >> 23660/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6007508031504384 > >> > >> Found-by: continuous fuzzing process >