Re: [FFmpeg-devel] [PATCH] avformat: add Square SVS demuxer

2020-09-13 Thread Paul B Mahol
On Fri, Sep 11, 2020 at 12:23:59PM +0200, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > libavformat/Makefile | 1 + > libavformat/allformats.c | 1 + > libavformat/svs.c| 96 > 3 files changed, 98 insertions(+) > create mode 1006

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mobiclip: add missing flush

2020-09-13 Thread Paul B Mahol
On Thu, Sep 10, 2020 at 10:39:03PM +0200, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > libavcodec/mobiclip.c | 9 + > 1 file changed, 9 insertions(+) > will apply this set. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org htt

Re: [FFmpeg-devel] [PATCH] avformat/flic: add support for seeking to start

2020-09-13 Thread Paul B Mahol
On Thu, Sep 10, 2020 at 01:59:21PM +0200, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > libavformat/flic.c | 38 +++--- > 1 file changed, 35 insertions(+), 3 deletions(-) > will apply ___ ffmpeg-devel mailin

Re: [FFmpeg-devel] [PATCH] avcodec/cdgraphics: fix decoded output when seeking to start of file

2020-09-13 Thread Paul B Mahol
On Thu, Sep 10, 2020 at 12:42:57AM +0200, Paul B Mahol wrote: > Also in cdg demuxer do not skip packets data, and remove > private context which is not really needed. > > Signed-off-by: Paul B Mahol > --- > libavcodec/cdgraphics.c | 10 ++ > libavformat/cdg.c | 23 -

[FFmpeg-devel] [PATCH] avformat: add CRI AAX demuxer

2020-09-13 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- libavcodec/adxdec.c | 16 ++ libavformat/Makefile | 1 + libavformat/aaxdec.c | 361 +++ libavformat/allformats.c | 1 + 4 files changed, 379 insertions(+) create mode 100644 libavformat/aaxdec.c diff --git a/

Re: [FFmpeg-devel] [PATCH 2/2] lavfi/sendcmd: correct the option flags dump

2020-09-13 Thread Paul B Mahol
On Sun, Sep 13, 2020 at 12:40:45PM +0800, Jun Zhao wrote: > From: Jun Zhao > > correct the option flags dump for sendcmd/asendcmd. > > Signed-off-by: Jun Zhao > --- > libavfilter/f_sendcmd.c | 26 -- > 1 file changed, 16 insertions(+), 10 deletions(-) > > diff --git a/

[FFmpeg-devel] [PATCH 3/4] ffmpeg: move A/V non-streamcopy initialization to a later point

2020-09-13 Thread Jan Ekström
- For video, this means a single initialization point in do_video_out. - For audio we unfortunately need to do it in two places just before the buffer sink is utilized (if av_buffersink_get_samples would still work according to its specification after a call to avfilter_graph_request_oldest w

[FFmpeg-devel] [PATCH 0/4 v2] ffmpeg: late A/V encoder init, AVFrame metadata usage

2020-09-13 Thread Jan Ekström
This patch set started with a very simple wish to not have to set color related values manually each time when utilizing ffmpeg.c. As of the second iteration, this patch set passes FATE on both of my machines. Only the MXF muxer tests actually needed changing, as the MXF muxer can now write the co

[FFmpeg-devel] [PATCH 2/4] ffmpeg: move AVFrame time base adjustment into a function

2020-09-13 Thread Jan Ekström
This will have to be called later for video down the line. --- fftools/ffmpeg.c | 77 1 file changed, 52 insertions(+), 25 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index cb7644de6a..7e6c0a962b 100644 --- a/fftools/ffmpeg.c +++

[FFmpeg-devel] [PATCH 1/4] ffmpeg: deduplicate init_output_stream usage logic

2020-09-13 Thread Jan Ekström
Adds a wrapper function, which handles any errors depending on how fatal a failure would be. --- fftools/ffmpeg.c | 51 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 84306818a2..cb7644de6a

[FFmpeg-devel] [PATCH 4/4] ffmpeg: pass decoded or filtered AVFrame to output stream initialization

2020-09-13 Thread Jan Ekström
Additionally, reap the first rewards by being able to set the color related encoding values based on the passed AVFrame. The only tests that seem to have changed their results with this change seem to be the MXF tests. There, the muxer writes the limited/full range flag to the output container if

[FFmpeg-devel] [PATCH] avfilter/avf_concat: nb_samples got from delta pts must be > 0

2020-09-13 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- libavfilter/avf_concat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index 5608ed9ac6..0b10b738a4 100644 --- a/libavfilter/avf_concat.c +++ b/libavfilter/avf_concat.c @@ -254,7 +254,7 @@ st

Re: [FFmpeg-devel] [PATCH] avfilter/avf_concat: nb_samples got from delta pts must be > 0

2020-09-13 Thread Nicolas George
Paul B Mahol (12020-09-13): > Signed-off-by: Paul B Mahol > --- > libavfilter/avf_concat.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c > index 5608ed9ac6..0b10b738a4 100644 > --- a/libavfilter/avf_concat.c > +++ b/l

Re: [FFmpeg-devel] [PATCH] opusdec: do not fail when LBRR frames are present

2020-09-13 Thread Derek Buitenhuis
On 11/09/2020 18:37, Anton Khirnov wrote: > Decode and discard them. > > Fixes ticket 4641. > --- > libavcodec/opus_silk.c | 28 > libavcodec/opustab.c | 3 +++ > libavcodec/opustab.h | 3 +++ > 3 files changed, 26 insertions(+), 8 deletions(-) I can confirm th

[FFmpeg-devel] [PATCH] avfilter/af_amix: do not leave unset PTS for frames after first stream is over

2020-09-13 Thread Paul B Mahol
First stream is used only to get number of samples to put into each output frame. Signed-off-by: Paul B Mahol --- libavfilter/af_amix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c index cae9d4585a..c4d8916a57 100644 --- a/l

[FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Paul B Mahol
There is nothing much currently that can be done to recover from this situation so just return AVERROR_BUG error code. Signed-off-by: Paul B Mahol --- libavfilter/avf_concat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/avf_concat.c b/libavfilter/avf_concat.c index 5608ed9a

Re: [FFmpeg-devel] [PATCH] avcodec/notchlc: Check available space for luma block code

2020-09-13 Thread Michael Niedermayer
On Sun, Sep 13, 2020 at 12:39:34AM +0200, Paul B Mahol wrote: > On Sat, Sep 12, 2020 at 06:43:30PM +0200, Michael Niedermayer wrote: > > Fixes: Timeout (too long -> 2sec) > > Fixes: > > 25439/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_NOTCHLC_fuzzer-5688211127664640 > > > > Found-by: conti

Re: [FFmpeg-devel] [PATCH] avcodec/notchlc: Check available space for luma block code

2020-09-13 Thread Paul B Mahol
On Sun, Sep 13, 2020 at 03:53:18PM +0200, Michael Niedermayer wrote: > On Sun, Sep 13, 2020 at 12:39:34AM +0200, Paul B Mahol wrote: > > On Sat, Sep 12, 2020 at 06:43:30PM +0200, Michael Niedermayer wrote: > > > Fixes: Timeout (too long -> 2sec) > > > Fixes: > > > 25439/clusterfuzz-testcase-minimi

Re: [FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Nicolas George
Paul B Mahol (12020-09-13): > There is nothing much currently that can be done to recover from > this situation so just return AVERROR_BUG error code. > > Signed-off-by: Paul B Mahol > --- > libavfilter/avf_concat.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavfilter/avf_conc

Re: [FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Paul B Mahol
On Sun, Sep 13, 2020 at 04:14:30PM +0200, Nicolas George wrote: > Paul B Mahol (12020-09-13): > > There is nothing much currently that can be done to recover from > > this situation so just return AVERROR_BUG error code. > > > > Signed-off-by: Paul B Mahol > > --- > > libavfilter/avf_concat.c |

Re: [FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Nicolas George
Paul B Mahol (12020-09-13): > It is bug in this filter. > > Filter should avoid integer overflows. > Also expecting only monotonous timestamps from input is not valid. Requiring monotonous and continuous timestamps on filters input is not only valid but widely accepted and almost mandatory. No op

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mobiclip: add missing flush

2020-09-13 Thread James Almer
On 9/10/2020 5:39 PM, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > libavcodec/mobiclip.c | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c > index d147eddbae..c296ce3c78 100644 > --- a/libavcodec/mobiclip.c > +++ b/libavc

Re: [FFmpeg-devel] [PATCH 2/2] libswcale/input: fix incorrect rgbf32 yuv conversions

2020-09-13 Thread Michael Niedermayer
On Sat, Sep 12, 2020 at 02:07:14AM -0700, mindm...@gmail.com wrote: > From: Mark Reid > > --- > libswscale/input.c | 12 +--- > tests/ref/fate/filter-pixfmts-scale | 8 > 2 files changed, 9 insertions(+), 11 deletions(-) Can you provide some tests that show th

Re: [FFmpeg-devel] [PATCH 2/4] ffmpeg: move AVFrame time base adjustment into a function

2020-09-13 Thread Michael Niedermayer
On Sun, Sep 13, 2020 at 01:26:20PM +0300, Jan Ekström wrote: > This will have to be called later for video down the line. > --- > fftools/ffmpeg.c | 77 > 1 file changed, 52 insertions(+), 25 deletions(-) This affects the output, example: ./ffmpeg

[FFmpeg-devel] request to post IPU samples

2020-09-13 Thread Amon Gibson Albuquerque Nunes
Hi. i would like to post a google drive link containing some sample files regarding a PS2 movie format. this movie format goes by the name of IPU. it's something of a "standard movie format" alongside PSS which is a modified variant of MPEG-2 elementary stream designed for use on PS2 games. eve

Re: [FFmpeg-devel] [PATCH 01/16] avcodec/snowdec: Use ff_snow_common_init() directly

2020-09-13 Thread Michael Niedermayer
On Sun, Sep 13, 2020 at 04:57:38AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/snowdec.c | 13 + > 1 file changed, 1 insertion(+), 12 deletions(-) probably ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC78704

Re: [FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Marton Balint
On Sun, 13 Sep 2020, Paul B Mahol wrote: There is nothing much currently that can be done to recover from this situation so just return AVERROR_BUG error code. Signed-off-by: Paul B Mahol --- libavfilter/avf_concat.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/avf_concat

Re: [FFmpeg-devel] [PATCH 1/8] avutil/timecode: fix av_timecode_get_smpte_from_framenum with 50/60 fps

2020-09-13 Thread Marton Balint
On Sat, 12 Sep 2020, Marton Balint wrote: On Sat, 5 Sep 2020, Marton Balint wrote: SMPTE 12M timecode can only count frames up to 39, because the tens-of-frames value is stored in 2 bit. In order to resolve this 50/60 fps SMPTE timecode is using the field bit (which is the same bit as

Re: [FFmpeg-devel] [PATCH 1/4] avdevice/decklink_commoh.h: remove unsupported decklink version ifdef

2020-09-13 Thread Marton Balint
On Fri, 11 Sep 2020, Moritz Barsnick wrote: On Tue, Sep 08, 2020 at 19:52:29 +0200, Marton Balint wrote: Subject: Re: [FFmpeg-devel] [PATCH 1/4] avdevice/decklink_commoh.h: remove Nit: typo^ Thanks, applied the series with that change

Re: [FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Nicolas George
Marton Balint (12020-09-13): > > +if (seg_delta < -cat->in[in_no].pts) > > +return AVERROR_BUG; > Isn't this supposed to be simply (seg_delta < cat->in[in_no].pts) ? You are right, thanks for noticing. Was this tested? Regards, -- Nicolas George signature.asc Description: PGP si

Re: [FFmpeg-devel] [PATCH] avformat: add CRI AAX demuxer

2020-09-13 Thread Andreas Rheinhardt
Paul B Mahol: > Signed-off-by: Paul B Mahol > --- > libavcodec/adxdec.c | 16 ++ > libavformat/Makefile | 1 + > libavformat/aaxdec.c | 361 +++ > libavformat/allformats.c | 1 + > 4 files changed, 379 insertions(+) > create mode 100644 libav

Re: [FFmpeg-devel] [PATCH 10/16] avcodec/svq3: Avoid allocations for SVQ3Frames

2020-09-13 Thread Andreas Rheinhardt
Andreas Rheinhardt: > These frames can be made part of the SVQ3Context; notice that the pointers > to the frames have been retained in order to allow to just swap them as > the code already does. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/svq3.c | 14 -- > 1 file chang

[FFmpeg-devel] [PATCH] avfilter/avf_concat: check for possible integer overflow

2020-09-13 Thread Paul B Mahol
Also check that segment delta pts is always bigger than input pts. There is nothing much currently that can be done to recover from this situation so just return AVERROR_INVALIDDATA error code. Signed-off-by: Paul B Mahol --- libavfilter/avf_concat.c | 4 1 file changed, 4 insertions(+) d

[FFmpeg-devel] [PATCH] avformat: add CRI AAX demuxer

2020-09-13 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- libavcodec/adxdec.c | 16 ++ libavformat/Makefile | 1 + libavformat/aaxdec.c | 377 +++ libavformat/allformats.c | 1 + 4 files changed, 395 insertions(+) create mode 100644 libavformat/aaxdec.c diff --git a/

Re: [FFmpeg-devel] [PATCH 2/4] ffmpeg: move AVFrame time base adjustment into a function

2020-09-13 Thread Jan Ekström
On Sun, Sep 13, 2020 at 7:14 PM Michael Niedermayer wrote: > > On Sun, Sep 13, 2020 at 01:26:20PM +0300, Jan Ekström wrote: > > This will have to be called later for video down the line. > > --- > > fftools/ffmpeg.c | 77 > > 1 file changed, 52 ins

[FFmpeg-devel] [PATCH] avformat/mxfdec: fix pixel format extraction for cinema j2k

2020-09-13 Thread Rémi Achard
--- libavformat/mxf.h| 1 + libavformat/mxfdec.c | 20 +++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/libavformat/mxf.h b/libavformat/mxf.h index fc587f19f0..3fb3c6d74d 100644 --- a/libavformat/mxf.h +++ b/libavformat/mxf.h @@ -49,6 +49,7 @@ enum MXFMetada

Re: [FFmpeg-devel] [PATCH 2/4] ffmpeg: move AVFrame time base adjustment into a function

2020-09-13 Thread Michael Niedermayer
On Sun, Sep 13, 2020 at 09:07:09PM +0300, Jan Ekström wrote: > On Sun, Sep 13, 2020 at 7:14 PM Michael Niedermayer > wrote: > > > > On Sun, Sep 13, 2020 at 01:26:20PM +0300, Jan Ekström wrote: > > > This will have to be called later for video down the line. > > > --- > > > fftools/ffmpeg.c | 77 +

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mobiclip: add missing flush

2020-09-13 Thread Paul B Mahol
On Sun, Sep 13, 2020 at 12:13:23PM -0300, James Almer wrote: > On 9/10/2020 5:39 PM, Paul B Mahol wrote: > > Signed-off-by: Paul B Mahol > > --- > > libavcodec/mobiclip.c | 9 + > > 1 file changed, 9 insertions(+) > > > > diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c > > ind

[FFmpeg-devel] [PATCH 2/4 v2] ffmpeg: move AVFrame time base adjustment into a function

2020-09-13 Thread Jan Ekström
This will have to be called later for video down the line. --- fftools/ffmpeg.c | 69 ++-- 1 file changed, 44 insertions(+), 25 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index cb7644de6a..54802a8ec3 100644 --- a/fftools/ffmpeg.c +++

[FFmpeg-devel] [PATCH 3/4 v2] ffmpeg: move A/V non-streamcopy initialization to a later point

2020-09-13 Thread Jan Ekström
- For video, this means a single initialization point in do_video_out. - For audio we unfortunately need to do it in two places just before the buffer sink is utilized (if av_buffersink_get_samples would still work according to its specification after a call to avfilter_graph_request_oldest w

[FFmpeg-devel] [PATCH 2/2] avcodec/mv30: Check remaining mask in decode_inter()

2020-09-13 Thread Michael Niedermayer
Fixes: timeout (too long -> 4sec) Fixes: 25129/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5642089713631232 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mv30.c | 7 ++-

[FFmpeg-devel] [PATCH 1/2] avcodec/wmalosslessdec: Check remaining space before padding and channel residue

2020-09-13 Thread Michael Niedermayer
Fixes: Timeout (1101sec -> 0.4sec) Fixes: 24491/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5725337036783616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/wmalossles

[FFmpeg-devel] [PATCH] avformat/mxfdec: fix pixel format extraction for cinema j2k

2020-09-13 Thread Rémi Achard
--- libavformat/mxf.h| 1 + libavformat/mxfdec.c | 32 +++- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/libavformat/mxf.h b/libavformat/mxf.h index fc587f19f0..3fb3c6d74d 100644 --- a/libavformat/mxf.h +++ b/libavformat/mxf.h @@ -49,6 +49,7 @@ e

Re: [FFmpeg-devel] [PATCH 2/2] libswcale/input: fix incorrect rgbf32 yuv conversions

2020-09-13 Thread Mark Reid
On Sun, Sep 13, 2020 at 8:55 AM Michael Niedermayer wrote: > On Sat, Sep 12, 2020 at 02:07:14AM -0700, mindm...@gmail.com wrote: > > From: Mark Reid > > > > --- > > libswscale/input.c | 12 +--- > > tests/ref/fate/filter-pixfmts-scale | 8 > > 2 files changed,

Re: [FFmpeg-devel] [PATCH 2/2] lavfi/sendcmd: correct the option flags dump

2020-09-13 Thread myp...@gmail.com
On Sun, Sep 13, 2020 at 6:30 PM Paul B Mahol wrote: > > On Sun, Sep 13, 2020 at 12:40:45PM +0800, Jun Zhao wrote: > > From: Jun Zhao > > > > correct the option flags dump for sendcmd/asendcmd. > > > > Signed-off-by: Jun Zhao > > --- > > libavfilter/f_sendcmd.c | 26 -- >

Re: [FFmpeg-devel] [PATCH] lavc/vaapi_encode_h265: fix max_transform_hierarchy_depth_inter/intra

2020-09-13 Thread Xiang, Haihao
On Fri, 2020-09-04 at 10:37 +0800, Linjie Fu wrote: > On Thu, Sep 3, 2020 at 1:32 PM Xiang, Haihao wrote: > > > > On Mon, 2020-04-13 at 13:06 +, Fu, Linjie wrote: > > > > From: ffmpeg-devel On Behalf Of > > > > Mark Thompson > > > > Sent: Monday, April 13, 2020 20:20 > > > > To: ffmpeg-devel

[FFmpeg-devel] [PATCH] avfilter/vf_premultiply: add missing AV_PIX_FMT_YUVA444P12

2020-09-13 Thread mindmark
From: Mark Reid query_formats says its supported, but is missing from switch statement leading to segfault --- libavfilter/vf_premultiply.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index 7e5b2aa97f..e051cadac0 100644 ---

[FFmpeg-devel] libx265 Closed Caption Support Development

2020-09-13 Thread Gray Capo
Hello, We would like to offer a bounty or a donation to assist in getting Closed Captioining support for libx265 ffmpeg working. See original ticket:  #8677 (HEVC libx265 removes Closed caption) – FFmpeg | | | | | | | | | | | #8677 (HEVC libx265 removes Closed caption) – FFmpeg

[FFmpeg-devel] [PATCH 17/40] avcodec/alacenc: Remove redundant code to free extradata

2020-09-13 Thread Andreas Rheinhardt
It is already freed generically for encoders. Signed-off-by: Andreas Rheinhardt --- libavcodec/alacenc.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/alacenc.c b/libavcodec/alacenc.c index 804cc7b17b..fc5fa270e6 100644 --- a/libavcodec/alacenc.c +++ b/libavcodec/alacenc.c @@ -

[FFmpeg-devel] [PATCH 34/40] avcodec/ac3enc_template: Don't free uninitialized pointers on error

2020-09-13 Thread Andreas Rheinhardt
The ac3 encoders (fixed- and floating-point AC-3 as well as the EAC-3 encoder) all allocate an array whose elements are pointers to other buffers. The array is not zeroed initially so that if an allocation of one of the subbuffers fails, the other pointers are uninitialized. This causes problems wh

[FFmpeg-devel] [PATCH 32/40] avcodec/dsicinvideo: Remove redundant code for freeing

2020-09-13 Thread Andreas Rheinhardt
The dsicinvideo decoder already has the FF_CODEC_CAP_INIT_CLEANUP flag set, so it is unnecessary to directly clean up some already allocated buffers in case another one could not be allocated in the init function, as all buffers will be freed anyway later in the decoder's close function. Signed-of

[FFmpeg-devel] [PATCH 36/40] avcodec/escape130: Cleanup generically on init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/escape130.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/escape130.c b/libavcodec/escape130.c index 1dd7eedd74..a6fda901de 100644 --- a/libavcodec/escape130.c +++ b/libavcodec/escape130.c @@ -128,9 +128,6 @@ sta

[FFmpeg-devel] [PATCH 35/40] avcodec/ac3enc_float, eac3enc: Fix leaks on init error

2020-09-13 Thread Andreas Rheinhardt
The AC-3 encoders (both floating- as well as fixed-point) as well as the EAC-3 encoder share code: All use ff_ac3_encode_init() as well as ff_ac3_encode_close(). Until ee726e777b851cdd4e28cdab36b38f0c39e35ea9 ff_ac3_encode_init() called ff_ac3_encode_close() to clean up on error. Said commit remove

[FFmpeg-devel] [PATCH 39/40] avcodec/ffv1: Simplify cleanup after allocation failure

2020-09-13 Thread Andreas Rheinhardt
Now that ff_ffv1_close() for both the FFV1 encoder and decoder, the code contained therein can be used to free the partially allocated slice contexts if allocating the slice contexts failed. One just has to set the correct number of slice contexts on error. This allows to remove the code for freein

Re: [FFmpeg-devel] [PATCH 2/2] libswcale/input: fix incorrect rgbf32 yuv conversions

2020-09-13 Thread Mark Reid
On Sun., Sep. 13, 2020, 4:04 p.m. Mark Reid, wrote: > > > On Sun, Sep 13, 2020 at 8:55 AM Michael Niedermayer > wrote: > >> On Sat, Sep 12, 2020 at 02:07:14AM -0700, mindm...@gmail.com wrote: >> > From: Mark Reid >> > >> > --- >> > libswscale/input.c | 12 +--- >> > te

[FFmpeg-devel] [PATCH 40/40] avcodec/ffwavesynth: Cleanup generically after init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/ffwavesynth.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/libavcodec/ffwavesynth.c b/libavcodec/ffwavesynth.c index d92bb38c45..c99bac90ea 100644 --- a/libavcodec/ffwavesynth.c +++ b/libavcodec/ffwavesynth.c

[FFmpeg-devel] [PATCH 37/40] avcodec/ffv1: Fix segfaults on allocation error

2020-09-13 Thread Andreas Rheinhardt
When allocating FFV1 slice contexts fails, ff_ffv1_init_slice_contexts() frees everything that it has allocated, yet it does not reset the counter for the number of allocated slice contexts. This inconsistent state leads to segfaults lateron in ff_ffv1_close(), because said function presumes that t

[FFmpeg-devel] [PATCH 38/40] avcodec/ffv1enc: Fix memleaks on init failure

2020-09-13 Thread Andreas Rheinhardt
The FFV1 encoder has so far not cleaned up after itself in this case; but it can be done easily by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/ffv1enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.

[FFmpeg-devel] [PATCH 22/40] avcodec/atrac3: Cleanup generically after init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index 067aa23f1f..ef2f8428dc 100644 --- a/libavcodec/atrac3.c +++ b/libavcodec/atrac3.c @@ -977,7 +977,6 @@ static av_cold in

[FFmpeg-devel] [PATCH 25/40] avcodec/av1dec: Remove redundant second free

2020-09-13 Thread Andreas Rheinhardt
The AV1 decoder has the FF_CODEC_CAP_INIT_CLEANUP flag set and yet the decoder's close function is called manually on some error paths. This is unnecessary and has been removed in this commit. Signed-off-by: Andreas Rheinhardt --- libavcodec/av1dec.c | 4 +--- 1 file changed, 1 insertion(+), 3 d

[FFmpeg-devel] [PATCH 20/40] avcodec/atrac1: Cleanup generically after init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac1.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 9ecd49273d..4cfb1061c5 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -353,7 +353,6 @@ static av_cold int

[FFmpeg-devel] [PATCH 19/40] avcodec/atrac1: Check allocation of AVFloatDSPContext

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac1.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index a8c8c91bcc..9ecd49273d 100644 --- a/libavcodec/atrac1.c +++ b/libavcodec/atrac1.c @@ -362,6 +362,10 @@ static av_cold int atrac1_decode

[FFmpeg-devel] [PATCH 28/40] avcodec/c93: Cleanup generically after init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/c93.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/c93.c b/libavcodec/c93.c index e1808150b8..7e3bfdbc72 100644 --- a/libavcodec/c93.c +++ b/libavcodec/c93.c @@ -63,10 +63,8 @@ static av_cold int decode_init(

[FFmpeg-devel] [PATCH 30/40] avcodec/cngenc: Replace av_free() by av_freep() in close function

2020-09-13 Thread Andreas Rheinhardt
This avoids leaving pointers to already freed memory in memory. Signed-off-by: Andreas Rheinhardt --- libavcodec/cngenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c index e185c4a40a..8f23b7555a 100644 --- a/libavcodec/cngenc.

[FFmpeg-devel] [PATCH 29/40] avcodec/cfhdenc: Fix leaks on allocation errors

2020-09-13 Thread Andreas Rheinhardt
The CineForm HD encoder attempts to allocate several buffers in its init function; yet if only some of these allocations succeed, the successfully allocated buffers leak. This is fixed by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/cfhdenc.c | 1 +

[FFmpeg-devel] [PATCH 31/40] avcodec/cngenc: Cleanup generically after init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/cngenc.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/cngenc.c b/libavcodec/cngenc.c index 8f23b7555a..b622d7bbda 100644 --- a/libavcodec/cngenc.c +++ b/libavcodec/cngenc.c @@ -58,10 +58,8 @@ static av_cold in

[FFmpeg-devel] [PATCH 26/40] avcodec/avrndec: Check allocation for success

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/avrndec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c index f4ec490de5..a4b6fadfc8 100644 --- a/libavcodec/avrndec.c +++ b/libavcodec/avrndec.c @@ -54,6 +54,8 @@ static av_cold int init(AVCodecC

[FFmpeg-devel] [PATCH 33/40] avcodec/dxa: Cleanup generically after init failure

2020-09-13 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/dxa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dxa.c b/libavcodec/dxa.c index f6edc03e1a..3f62eac252 100644 --- a/libavcodec/dxa.c +++ b/libavcodec/dxa.c @@ -343,7 +343,6 @@ static av_cold int decode_init(AVCod

[FFmpeg-devel] [PATCH 23/40] avcodec/atrac3: Avoid indirection when calling float dsp function

2020-09-13 Thread Andreas Rheinhardt
Do this by only keeping the only function pointer from the AVFloatDSPContext that is needed lateron. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac3.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/libavcodec/atrac3.c b/libavcodec/atrac3.c index ef2

[FFmpeg-devel] [PATCH 27/40] avcodec/avrndec: Fix memleak on error

2020-09-13 Thread Andreas Rheinhardt
If ff_codec_open2_recursive() fails, the already allocated AVCodecContext leaks. Fix this by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/avrndec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/avrndec.c b/libavcode

[FFmpeg-devel] [PATCH 18/40] avcodec/alacenc: Don't free unnecessarily

2020-09-13 Thread Andreas Rheinhardt
The init function of the ALAC encoder calls its own close function if a call to ff_lpc_init() fails; yet nothing has been allocated before that point (except extradata which is freed generically) and ff_lpc_init() can be expected to clean up after itself on error (the documentation does not say any

[FFmpeg-devel] [PATCH 24/40] avcodec/av1dec: Fix segfault upon allocation error

2020-09-13 Thread Andreas Rheinhardt
The decoder's close function simply presumed that some AVFrames have been successfully allocated although this can of course fail. Signed-off-by: Andreas Rheinhardt --- Once could btw return immediately as soon as one encounters an AVFrame that is NULL, because these frames are the first things t

[FFmpeg-devel] [PATCH 21/40] avcodec/atrac1: Avoid indirection when calling float dsp function

2020-09-13 Thread Andreas Rheinhardt
Do this by only keeping the only function pointer from the AVFloatDSPContext that is needed lateron. Signed-off-by: Andreas Rheinhardt --- libavcodec/atrac1.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/libavcodec/atrac1.c b/libavcodec/atrac1.c index 4cf

[FFmpeg-devel] [PATCH 2/4] dnn: change dnn interface to replace DNNData* with AVFrame*

2020-09-13 Thread Guo, Yejun
Currently, every filter needs to provide code to transfer data from AVFrame* to model input (DNNData*), and also from model output (DNNData*) to AVFrame*. Actually, such transfer can be implemented within DNN module, and so filter can focus on its own business logic. DNN module also exports the fu

[FFmpeg-devel] [PATCH 3/4] dnn: put DNNModel.set_input and DNNModule.execute_model together

2020-09-13 Thread Guo, Yejun
suppose we have a detect and classify filter in the future, the detect filter generates some bounding boxes (BBox) as AVFrame sidedata, and the classify filter executes DNN model for each BBox. For each BBox, we need to crop the AVFrame, copy data to DNN model input and do the model execution. So w

[FFmpeg-devel] [PATCH 1/4] dnn: add userdata for load model parameter

2020-09-13 Thread Guo, Yejun
the userdata will be used for the interaction between AVFrame and DNNData Signed-off-by: Guo, Yejun --- libavfilter/dnn/dnn_backend_native.c | 3 ++- libavfilter/dnn/dnn_backend_native.h | 2 +- libavfilter/dnn/dnn_backend_openvino.c | 3 ++- libavfilter/dnn/dnn_backend_openvino.h | 2 +- li

[FFmpeg-devel] [PATCH 4/4] dnn: add a new interface DNNModel.get_output

2020-09-13 Thread Guo, Yejun
for some cases (for example, super resolution), the DNN model changes the frame size which impacts the filter behavior, so the filter needs to know the out frame size at very beginning. Currently, the filter reuses DNNModule.execute_model to query the out frame size, it is not clear from interface