Re: [FFmpeg-devel] [PATCH] lavf/srt: fix build fail when used the libsrt 1.4.1

2020-09-15 Thread myp...@gmail.com
On Tue, Sep 15, 2020 at 2:23 PM Gyan Doshi wrote: > > This should be backported to 4.3 and other releases whose builds fail. > > Gyan Will backporting, thx ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-

[FFmpeg-devel] [PATCH 01/30] avcodec/flashsvenc: Avoid allocation of buffer, fix memleak

2020-09-15 Thread Andreas Rheinhardt
Up until now, the flashsv encoder tried to allocate two buffers in its init function; if only one of these allocations succeeds, the other buffer leaks. Fix this by making one of these buffers part of the context (its size is a compile-time constant). Signed-off-by: Andreas Rheinhardt --- libavc

[FFmpeg-devel] [PATCH 07/30] avcodec/gif: Fix leaks upon allocation error

2020-09-15 Thread Andreas Rheinhardt
If one of several allocations the gif encoder performs in its init function fails, the successfull allocations leak. Fix this by adding the FF_CODEC_CAP_INIT_CLEANUP. Signed-off-by: Andreas Rheinhardt --- libavcodec/gif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/gif.c b/lib

[FFmpeg-devel] [PATCH 11/30] avcodec/hnm4video: Don't reimplement FFSWAP()

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/hnm4video.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/libavcodec/hnm4video.c b/libavcodec/hnm4video.c index 173691a1eb..43baa9c572 100644 --- a/libavcodec/hnm4video.c +++ b/libavcodec/hnm4video.c @@ -387,15 +38

[FFmpeg-devel] [PATCH 12/30] avcodec/hq_hqadata: Make local arrays static

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/hq_hqadata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/hq_hqadata.c b/libavcodec/hq_hqadata.c index ae9231aa02..56470eadc1 100644 --- a/libavcodec/hq_hqadata.c +++ b/libavcodec/hq_hqadata.c @@ -1142,7 +114

[FFmpeg-devel] [PATCH 06/30] avcodec/g722enc: Cleanup generically on init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/g722enc.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c index 25b61df19e..9357f170fe 100644 --- a/libavcodec/g722enc.c +++ b/libavcodec/g722enc.c @@ -59,7 +59,6 @@ static

[FFmpeg-devel] [PATCH 10/30] avcodec/hnm4video: Don't return nonsense error messages

2020-09-15 Thread Andreas Rheinhardt
The HNM 4 video decoder's init function claimed that an allocation failed if the image dimensions are wrong. This is fixed in this commit: The dimensions are checked before the allocations are attempted. The check whether width * height is zero is redundant as av_image_check_size() already checks f

[FFmpeg-devel] [PATCH 08/30] avcodec/hcom: Cleanup generically upon init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/hcom.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavcodec/hcom.c b/libavcodec/hcom.c index 8300676f98..06fa25fcd2 100644 --- a/libavcodec/hcom.c +++ b/libavcodec/hcom.c @@ -67,15 +67,11 @@ static av_cold int hco

[FFmpeg-devel] [PATCH 15/30] avcodec/ivi: Fix segfault on allocation error

2020-09-15 Thread Andreas Rheinhardt
If allocating the tiles array for indeo 4/5 fails, the context is in an inconsistent state, because the counter for the number of tiles is > 0. This will lead to a segfault when freeing the tiles' substructures. Fix this by setting the number of tiles to zero if the allocation was unsuccessfull. S

[FFmpeg-devel] [PATCH 17/30] avcodec/j2kenc: Fix leaks on init failure

2020-09-15 Thread Andreas Rheinhardt
The JPEG2000 encoder did not clean up after itself on error. This commit fixes this by modifying the cleanup function to be able to handle only partially allocated structures and by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/j2kenc.c | 15 +++

[FFmpeg-devel] [PATCH 09/30] avcodec/hmm4video: Cleanup generically on init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/hnm4video.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavcodec/hnm4video.c b/libavcodec/hnm4video.c index 177ce1d47a..ac080e398b 100644 --- a/libavcodec/hnm4video.c +++ b/libavcodec/hnm4video.c @@ -486,9 +486,6 @@ sta

[FFmpeg-devel] [PATCH 16/30] avcodec/indeo5: Fix memleaks upon allocation error

2020-09-15 Thread Andreas Rheinhardt
ff_ivi_init_planes() might error out after having allocated some arrays. Set the FF_CODEC_CAP_INIT_CLEANUP flag in order to free these arrays in this case. Signed-off-by: Andreas Rheinhardt --- libavcodec/indeo5.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/indeo5.c b/libavc

[FFmpeg-devel] [PATCH 14/30] avcodec/indeo3: Cleanup generically after init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/indeo3.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 71d478c9fc..75113a7541 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -203,10 +203,8 @@ static av_cold

[FFmpeg-devel] [PATCH 13/30] avcodec/imc: Avoid indirection when calling float dsp function

2020-09-15 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/imc.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 82a908160

[FFmpeg-devel] [PATCH 21/30] avcodec/mobiclip: Fix memleak upon init failure

2020-09-15 Thread Andreas Rheinhardt
If an error happens during init after an allocation has succeeded, the already allocated data leaked up until now. Fix this by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/mo

[FFmpeg-devel] [PATCH 23/30] avcodec/motionpixels: Cleanup generically after init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/motionpixels.c | 11 +++ 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c index 6cb444a703..b48200b017 100644 --- a/libavcodec/motionpixels.c +++ b/libavcodec/motionpixels.c

[FFmpeg-devel] [PATCH 20/30] avcodec/mlpenc: Fix memleak upon init failure

2020-09-15 Thread Andreas Rheinhardt
If an error happens during init after an allocation has succeeded, the already allocated data leaked up until now. Fix this by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/mlpenc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/ml

[FFmpeg-devel] [PATCH 22/30] avcodec/mobiclip: Fix heap-buffer-overflow

2020-09-15 Thread Andreas Rheinhardt
The MobiClip decoder uses adjacent pixels for prediction; yet when accessing the left pixel, it was forgotten to clip the x coordinate. This results in an heap-buffer-overflow. It can e.g. be reproduced with the sample from https://samples.ffmpeg.org/V-codecs/MOHD/crap.avi when forcing the video de

[FFmpeg-devel] [PATCH 19/30] avcodec/magicyuvenc: Fix memleak upon init failure

2020-09-15 Thread Andreas Rheinhardt
If an error happens during init after an allocation has succeeded, the already allocated data leaked up until now. Fix this by setting the FF_CODEC_CAP_INIT_CLEANUP flag. Signed-off-by: Andreas Rheinhardt --- libavcodec/magicyuvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec

[FFmpeg-devel] [PATCH 18/30] avcodec/ljpegenc: Don't free buffer known to be NULL

2020-09-15 Thread Andreas Rheinhardt
The lossless JPEG encoder allocates one buffer in its init function and freeing said buffer is the only thing done in its close function. Despite this the init function called the close function if allocating said buffer fails, although there is nothing to free in this case. This commit stops doing

[FFmpeg-devel] [PATCH 29/30] avcodec/mpegaudiodec_template: Simplify creating mp3on4 child decoders

2020-09-15 Thread Andreas Rheinhardt
Allocating the child codec contexts in one piece simplifies both allocating as well as freeing. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudiodec_template.c | 33 +- 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/libavcodec/mpegaudiodec_te

[FFmpeg-devel] [PATCH 24/30] avcodec/mpc7data: Make overlong array smaller

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc7data.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpc7data.h b/libavcodec/mpc7data.h index 5609e8fbf3..90ab75fe65 100644 --- a/libavcodec/mpc7data.h +++ b/libavcodec/mpc7data.h @@ -51,7 +51,7 @@ static const

[FFmpeg-devel] [PATCH 26/30] avcodec/mpc7, mpc7data: Avoid gaps in array

2020-09-15 Thread Andreas Rheinhardt
The Musepack decoder uses static VLC tables to parse the bitstream. There are 14 different quant tables VLCs and each of them has a varying number of codes. The maximum number is 63, the average number is 25.3. Up until now, the array containing the raw data was of type uint16_t [7][2][64 * 2] (the

[FFmpeg-devel] [PATCH 25/30] avcodec/mpc7: Don't pretend initializing static VLC tables can fail

2020-09-15 Thread Andreas Rheinhardt
It can't if one hasn't made a mistake at calculating the sizes; and this is checked by asserts/aborts. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpc7.c | 45 - 1 file changed, 12 insertions(+), 33 deletions(-) diff --git a/libavcodec/mpc7.c b/l

[FFmpeg-devel] [PATCH 27/30] avcodec/mpegaudiodec_template: Check return value of subdecoder

2020-09-15 Thread Andreas Rheinhardt
After all, allocating an AVFloatDSPContext might have failed. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudiodec_template.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/mpegaudiodec_template.c b/libavcodec/mpegaudiodec_template.c index de10f7

[FFmpeg-devel] [PATCH 28/30] avcodec/mpegaudiodec_float: Avoid indirection with float dsp function

2020-09-15 Thread Andreas Rheinhardt
Do this by only keeping the only function pointer from the AVFloatDSPContext that is needed lateron. This also allows to remove the decoders' close function. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudiodec_float.c| 4 libavcodec/mpegaudiodec_template.c | 30 +++---

[FFmpeg-devel] [PATCH 30/30] avcodec/mpegaudiodec*: Cleanup generically on init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegaudiodec_fixed.c| 1 + libavcodec/mpegaudiodec_float.c| 1 + libavcodec/mpegaudiodec_template.c | 9 ++--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/libavcodec/mpegaudiodec_fixed.c b/libavcodec/mpegaudiodec_fixe

[FFmpeg-devel] [PATCH 04/30] avcodec/flashsv2enc: Cleanup generically after init failure

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsv2enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c index e2a603f312..851abdc822 100644 --- a/libavcodec/flashsv2enc.c +++ b/libavcodec/flashsv2enc.c @@ -235,7 +235,6

[FFmpeg-devel] [PATCH 02/30] avcodec/flashsvenc: Remove unused z_stream

2020-09-15 Thread Andreas Rheinhardt
This encoder uses the compress2 utility function provided by zlib instead of using a z_stream. Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsvenc.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/libavcodec/flashsvenc.c b/libavcodec/flashsvenc.c index 4ac643c036..95ae988448 10

[FFmpeg-devel] [PATCH 03/30] avcodec/flashsv2enc: Check allocations for success before usage

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsv2enc.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c index 65db112696..e2a603f312 100644 --- a/libavcodec/flashsv2enc.c +++ b/libavcodec/flashsv2enc.c

[FFmpeg-devel] [PATCH 05/30] avcodec/flashsv2enc: Return better error codes

2020-09-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/flashsv2enc.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/libavcodec/flashsv2enc.c b/libavcodec/flashsv2enc.c index 851abdc822..6603d0ded1 100644 --- a/libavcodec/flashsv2enc.c +++ b/libavcodec/flashsv2enc.c @@ -

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

2020-09-15 Thread Michael Niedermayer
On Sun, Sep 13, 2020 at 01:26:22PM +0300, Jan Ekström wrote: > 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, t

[FFmpeg-devel] [PATCH v2 1/2] dnn_backend_native_layer_conv2d.c: fix memory allocation bug in multithread function.

2020-09-15 Thread xujunzz
From: Xu Jun Before patch, memory was allocated in each thread functions, which may cause more than one time of memory allocation and cause crash. After patch, memory is allocated in the main thread once, an index was parsed into thread functions. Bug fixed. Signed-off-by: Xu Jun --- .../dnn/

[FFmpeg-devel] [PATCH v2 2/2] dnn_backend_native_layer_conv2d.c: refine code.

2020-09-15 Thread xujunzz
From: Xu Jun Move thread area allocate out of thread function into main thread. Signed-off-by: Xu Jun --- v2: fix build warnings .../dnn/dnn_backend_native_layer_conv2d.c | 44 +-- 1 file changed, 20 insertions(+), 24 deletions(-) diff --git a/libavfilter/dnn/dnn_backend_

Re: [FFmpeg-devel] [PATCH 08/30] avcodec/hcom: Cleanup generically upon init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:38AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/hcom.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-) probably ok > > diff --git a/libavcodec/hcom.c b/libavcodec/hcom.c > index 8300676f98..06fa25fcd2 1

Re: [FFmpeg-devel] [PATCH 19/30] avcodec/magicyuvenc: Fix memleak upon init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:49AM +0200, Andreas Rheinhardt wrote: > If an error happens during init after an allocation has succeeded, > the already allocated data leaked up until now. Fix this by setting the > FF_CODEC_CAP_INIT_CLEANUP flag. > > Signed-off-by: Andreas Rheinhardt > --- > libav

Re: [FFmpeg-devel] [PATCH 22/30] avcodec/mobiclip: Fix heap-buffer-overflow

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:52AM +0200, Andreas Rheinhardt wrote: > The MobiClip decoder uses adjacent pixels for prediction; yet when > accessing the left pixel, it was forgotten to clip the x coordinate. > This results in an heap-buffer-overflow. It can e.g. be reproduced with > the sample from

Re: [FFmpeg-devel] [PATCH 21/30] avcodec/mobiclip: Fix memleak upon init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:51AM +0200, Andreas Rheinhardt wrote: > If an error happens during init after an allocation has succeeded, > the already allocated data leaked up until now. Fix this by setting the > FF_CODEC_CAP_INIT_CLEANUP flag. > > Signed-off-by: Andreas Rheinhardt > --- > libav

Re: [FFmpeg-devel] [PATCH 07/30] avcodec/gif: Fix leaks upon allocation error

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:37AM +0200, Andreas Rheinhardt wrote: > If one of several allocations the gif encoder performs in its init > function fails, the successfull allocations leak. Fix this by adding the > FF_CODEC_CAP_INIT_CLEANUP. > > Signed-off-by: Andreas Rheinhardt > --- > libavcode

Re: [FFmpeg-devel] [PATCH 23/30] avcodec/motionpixels: Cleanup generically after init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:53AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/motionpixels.c | 11 +++ > 1 file changed, 3 insertions(+), 8 deletions(-) > looks ok. > diff --git a/libavcodec/motionpixels.c b/libavcodec/motionpixels.c > inde

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

2020-09-15 Thread Jan Ekström
On Tue, Sep 15, 2020 at 10:54 AM Michael Niedermayer wrote: > > On Sun, Sep 13, 2020 at 01:26:22PM +0300, Jan Ekström wrote: > > 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 cha

[FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Paul B Mahol
This removes big CPU overhead for demuxing chained ogg streams. Signed-off-by: Paul B Mahol --- libavformat/aviobuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index a77517d712..6d01150f66 100644 --- a/libavformat/aviob

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Nicolas George
Paul B Mahol (12020-09-15): > This removes big CPU overhead for demuxing chained ogg streams. > > Signed-off-by: Paul B Mahol > --- > libavformat/aviobuf.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c > index a77517d

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 01:39:45PM +0200, Nicolas George wrote: > Paul B Mahol (12020-09-15): > > This removes big CPU overhead for demuxing chained ogg streams. > > > > Signed-off-by: Paul B Mahol > > --- > > libavformat/aviobuf.c | 5 ++--- > > 1 file changed, 2 insertions(+), 3 deletions(-) >

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Nicolas George
Paul B Mahol (12020-09-15): > It leaks nothing in case of failure. > In case of failure old memory is kept and > seeking back will fail and thus give errors when syncing. My bad, it was a common pattern, but avoided here. -- Nicolas George signature.asc Description: PGP signature ___

[FFmpeg-devel] [PATCH 1/2] avcodec/libdav1d: use ff_decode_frame_props() to fill frame properties

2020-09-15 Thread James Almer
The main benefit comes from propagating container level metadata like hdr, which is more commonly used than the relevant Metadata OBUs. Signed-off-by: James Almer --- libavcodec/libdav1d.c | 94 +-- 1 file changed, 46 insertions(+), 48 deletions(-) diff -

Re: [FFmpeg-devel] [PATCH 1/2 v3] avcodec/packet: move AVPacketList definition and function helpers over from libavformat

2020-09-15 Thread James Almer
On 9/11/2020 5:06 PM, James Almer wrote: > On 9/7/2020 11:31 AM, James Almer wrote: >> And replace the flags parameter with a function callback that can be used to >> copy the contents of the packet (e.g, av_packet_ref and >> av_packet_copy_props). >> >> Signed-off-by: James Almer >> --- >> This

[FFmpeg-devel] [PATCH 2/2] avcodec/libdav1d: parse sequence headers in extradata if available

2020-09-15 Thread James Almer
This allows the decoder context to be initialized with all stream parameters before a packet is parsed. Signed-off-by: James Almer --- libavcodec/libdav1d.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 1b9289824f..13673ae2dc

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

2020-09-15 Thread Jan Ekström
On Tue, Sep 15, 2020 at 1:06 PM Jan Ekström wrote: > > On Tue, Sep 15, 2020 at 10:54 AM Michael Niedermayer > wrote: > > > > On Sun, Sep 13, 2020 at 01:26:22PM +0300, Jan Ekström wrote: > > > Additionally, reap the first rewards by being able to set the > > > color related encoding values based o

[FFmpeg-devel] [PATCH] Unrolls main loop of yuv2yuvX_sse3 and general code tidying for ~20% speedup

2020-09-15 Thread Alan Kelly
--- libswscale/x86/swscale.c | 138 --- 1 file changed, 72 insertions(+), 66 deletions(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index 3160fedf04..e47fee2bbd 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -201,

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

2020-09-15 Thread Jan Ekström
On Tue, Sep 15, 2020 at 5:28 PM Jan Ekström wrote: > > > Further looking into this, it seems to come from filtering (?) (diff attached) > > decoded AVFrame: 128x128, pix_fmt: rgba, range: pc > while... > AVFrame to be encoded: 128x128, pix_fmt: bgra, range: tv > > Jan For the record, the culprit

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

2020-09-15 Thread James Almer
On 9/15/2020 1:21 PM, Jan Ekström wrote: > On Tue, Sep 15, 2020 at 5:28 PM Jan Ekström wrote: >> >> >> Further looking into this, it seems to come from filtering (?) (diff >> attached) >> >> decoded AVFrame: 128x128, pix_fmt: rgba, range: pc >> while... >> AVFrame to be encoded: 128x128, pix_fmt:

Re: [FFmpeg-devel] [PATCH 17/30] avcodec/j2kenc: Fix leaks on init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:47AM +0200, Andreas Rheinhardt wrote: > The JPEG2000 encoder did not clean up after itself on error. > This commit fixes this by modifying the cleanup function to be able to > handle only partially allocated structures and by setting the > FF_CODEC_CAP_INIT_CLEANUP fla

Re: [FFmpeg-devel] [PATCH 20/30] avcodec/mlpenc: Fix memleak upon init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:50AM +0200, Andreas Rheinhardt wrote: > If an error happens during init after an allocation has succeeded, > the already allocated data leaked up until now. Fix this by setting the > FF_CODEC_CAP_INIT_CLEANUP flag. > > Signed-off-by: Andreas Rheinhardt > --- > libav

Re: [FFmpeg-devel] [PATCH 05/30] avcodec/flashsv2enc: Return better error codes

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:35AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/flashsv2enc.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > looks ok ___ ffmpeg-devel mailing list ffmpe

Re: [FFmpeg-devel] [PATCH 15/30] avcodec/ivi: Fix segfault on allocation error

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:45AM +0200, Andreas Rheinhardt wrote: > If allocating the tiles array for indeo 4/5 fails, the context is in an > inconsistent state, because the counter for the number of tiles is > 0. > This will lead to a segfault when freeing the tiles' substructures. > Fix this by

Re: [FFmpeg-devel] [PATCH 16/30] avcodec/indeo5: Fix memleaks upon allocation error

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:46AM +0200, Andreas Rheinhardt wrote: > ff_ivi_init_planes() might error out after having allocated some arrays. > Set the FF_CODEC_CAP_INIT_CLEANUP flag in order to free these arrays in > this case. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/indeo5.c

Re: [FFmpeg-devel] [PATCH 04/30] avcodec/flashsv2enc: Cleanup generically after init failure

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:34AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/flashsv2enc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) ok ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org ht

Re: [FFmpeg-devel] [PATCH 26/30] avcodec/mpc7, mpc7data: Avoid gaps in array

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:56AM +0200, Andreas Rheinhardt wrote: > The Musepack decoder uses static VLC tables to parse the bitstream. > There are 14 different quant tables VLCs and each of them has a varying > number of codes. The maximum number is 63, the average number is 25.3. > Up until now

Re: [FFmpeg-devel] [PATCH 25/30] avcodec/mpc7: Don't pretend initializing static VLC tables can fail

2020-09-15 Thread Paul B Mahol
On Tue, Sep 15, 2020 at 09:39:55AM +0200, Andreas Rheinhardt wrote: > It can't if one hasn't made a mistake at calculating the sizes; > and this is checked by asserts/aborts. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mpc7.c | 45 - > 1 f

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

2020-09-15 Thread Jan Ekström
On Tue, Sep 15, 2020 at 7:39 PM James Almer wrote: > > On 9/15/2020 1:21 PM, Jan Ekström wrote: > > On Tue, Sep 15, 2020 at 5:28 PM Jan Ekström wrote: > >> > >> > >> Further looking into this, it seems to come from filtering (?) (diff > >> attached) > >> > >> decoded AVFrame: 128x128, pix_fmt: r

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

2020-09-15 Thread Jan Ekström
On Tue, Sep 15, 2020 at 9:12 PM Jan Ekström wrote: > > On Tue, Sep 15, 2020 at 7:39 PM James Almer wrote: > > > > On 9/15/2020 1:21 PM, Jan Ekström wrote: > > > On Tue, Sep 15, 2020 at 5:28 PM Jan Ekström wrote: > > >> > > >> > > >> Further looking into this, it seems to come from filtering (?)

Re: [FFmpeg-devel] [PATCH] avdevice/decklink_dec: fix build with older SDK

2020-09-15 Thread Marton Balint
On Tue, 15 Sep 2020, Gyan Doshi wrote: On 15-09-2020 12:54 am, Marton Balint wrote: Apparently bmdFormatUnspecified needs SDK 11.0. It is just a fancy way of checking for zero, so let's do that instead. Fixes build issue since f1b908d20a8. Signed-off-by: Marton Balint --- libavdevice/d

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Marton Balint
On Tue, 15 Sep 2020, Paul B Mahol wrote: This removes big CPU overhead for demuxing chained ogg streams. Signed-off-by: Paul B Mahol --- libavformat/aviobuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index a77517d71

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Andreas Rheinhardt
Marton Balint: > > > On Tue, 15 Sep 2020, Paul B Mahol wrote: > >> This removes big CPU overhead for demuxing chained ogg streams. >> >> Signed-off-by: Paul B Mahol >> --- >> libavformat/aviobuf.c | 5 ++--- >> 1 file changed, 2 insertions(+), 3 deletions(-) >> >> diff --git a/libavformat/aviobu

Re: [FFmpeg-devel] [PATCH 26/30] avcodec/mpc7, mpc7data: Avoid gaps in array

2020-09-15 Thread Andreas Rheinhardt
Paul B Mahol: > On Tue, Sep 15, 2020 at 09:39:56AM +0200, Andreas Rheinhardt wrote: >> The Musepack decoder uses static VLC tables to parse the bitstream. >> There are 14 different quant tables VLCs and each of them has a varying >> number of codes. The maximum number is 63, the average number is 2

Re: [FFmpeg-devel] [PATCH] avformat/aviobuf: realloc memory in ffio_ensure_seekback()

2020-09-15 Thread Marton Balint
On Tue, 15 Sep 2020, Andreas Rheinhardt wrote: Marton Balint: On Tue, 15 Sep 2020, Paul B Mahol wrote: This removes big CPU overhead for demuxing chained ogg streams. Signed-off-by: Paul B Mahol --- libavformat/aviobuf.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --

[FFmpeg-devel] [PATCH] fate: Add aa-demux test

2020-09-15 Thread Michael Niedermayer
This should help fuzzer coverage The sample file can be generated by dd if=samples/audible/2004FirstPresidentialDebateBushvs.Kerry93004_acelp85_maihde.aa of=bush.aa count=110 Signed-off-by: Michael Niedermayer --- tests/fate/demux.mak| 3 + tests/ref/fate/aa-demux | 283

[FFmpeg-devel] [PATCH] avfilter/vf_scale: set RGB to always be full range

2020-09-15 Thread Jan Ekström
This value - while it looks like the actual range of the content - is nothing but the internal value of swscale. Thus, if we have RGB content, force the value to 1. Swscale will ignore it, but at least the value of the output AVFrame will now properly be "full range" instead of "limited range", as

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

2020-09-15 Thread Michael Niedermayer
On Mon, Sep 14, 2020 at 12:33:14AM +0300, Jan Ekström wrote: > - 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 t

Re: [FFmpeg-devel] [PATCH] Unrolls main loop of yuv2yuvX_sse3 and general code tidying for ~20% speedup

2020-09-15 Thread Michael Niedermayer
On Tue, Sep 15, 2020 at 06:11:58PM +0200, Alan Kelly wrote: > --- > libswscale/x86/swscale.c | 138 --- > 1 file changed, 72 insertions(+), 66 deletions(-) > > diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c > index 3160fedf04..e47fee2bbd 10064

Re: [FFmpeg-devel] [PATCH] avformat/argo_asf: initialise file header inline

2020-09-15 Thread Zane van Iperen
On Mon, 14 Sep 2020 23:31:00 + "Zane van Iperen" wrote: > > Garbage was left-over in the ArgoASFFileHeader::name field if the url > was too short. This zero-initialises it. > > Signed-off-by: Zane van Iperen Will apply soon. ___ ffmpeg-devel m

Re: [FFmpeg-devel] [PATCH 02/16] avcodec/pcm-dvd: Avoid allocation of buffer

2020-09-15 Thread Andreas Rheinhardt
Andreas Rheinhardt: > In this case, it also allows to remove the decoder's close function. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/pcm-dvd.c | 16 ++-- > 1 file changed, 2 insertions(+), 14 deletions(-) > > diff --git a/libavcodec/pcm-dvd.c b/libavcodec/pcm-dvd.c >

[FFmpeg-devel] AVFrame.color_trc wrong since f2ad6238e4c0e99e2fc131ee14c586e87b045680

2020-09-15 Thread Pavel Koshevoy
set_side_data used to do out->color_trc = s->sei.alternative_transfer.preferred_transfer_characteristics; In commit f2ad6238e4c0e99e2fc131ee14c586e87b045680 this was removed. Now ffprobe of an HLG stream reports wrong transfer characteristics for each frame: ``` $ ffprobe -show_frames 20190914-14

Re: [FFmpeg-devel] AVFrame.color_trc wrong since f2ad6238e4c0e99e2fc131ee14c586e87b045680

2020-09-15 Thread James Almer
On 9/15/2020 10:57 PM, Pavel Koshevoy wrote: > set_side_data used to do out->color_trc = > s->sei.alternative_transfer.preferred_transfer_characteristics; > > In commit f2ad6238e4c0e99e2fc131ee14c586e87b045680 this was removed. > Now ffprobe of an HLG stream reports wrong transfer characteristics

Re: [FFmpeg-devel] AVFrame.color_trc wrong since f2ad6238e4c0e99e2fc131ee14c586e87b045680

2020-09-15 Thread Pavel Koshevoy
On Tue, Sep 15, 2020, 21:25 James Almer wrote: > On 9/15/2020 10:57 PM, Pavel Koshevoy wrote: > > set_side_data used to do out->color_trc = > > s->sei.alternative_transfer.preferred_transfer_characteristics; > > > > In commit f2ad6238e4c0e99e2fc131ee14c586e87b045680 this was removed. > > Now ffpr

[FFmpeg-devel] [PATCH] avfilter/vf_delogo: remove duplicated code

2020-09-15 Thread quinkblack
From: Zhao Zhili 1. Remove the modification of x, y, w and h parameters since they are reset by filter_frame. 2. config_input leads to error out when logo area is outside of the frame, while filter_frame fix the parameters automatically. Make config_input don't return error to keep the l

[FFmpeg-devel] [PATCH] avfilter/vf_delogo: use av_log_once

2020-09-15 Thread quinkblack
From: Zhao Zhili --- libavfilter/vf_delogo.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 39f06512fa..023fc51ec8 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -200,6 +200,7 @@ typedef struct

[FFmpeg-devel] [PATCH 0/6] qsv: Fix compiler errors when using libmfx 2.0 (oneVPL)

2020-09-15 Thread Haihao Xiang
The oneAPI Video Processing Library (oneVPL) is a single interface for encode, decode and video processing, the obsolete features in Intel Media Software Development Kit are removed from oneVPL. The oneVPL specification: https://spec.oneapi.com/versions/latest/elements/oneVPL/source/index.html The

[FFmpeg-devel] [PATCH 1/6] qsv: add ${includedir}/mfx to the search path for old versions of libmfx

2020-09-15 Thread Haihao Xiang
${includedir}/mfx has been added to Cflags in libmfx.pc for the current libmfx. We may add ${includedir}/mfx to the search path for olda versions of libmfx so that we may include foo.h instead of mfx/foo.h After applying this change, we won't need to change #include to include the right header fil

[FFmpeg-devel] [PATCH 4/6] qsvenc: libmfx no longer supports multi-frame encode since version 2.0 (oneVPL)

2020-09-15 Thread Haihao Xiang
--- libavcodec/qsvenc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.h b/libavcodec/qsvenc.h index 77f886981c..9f3dc0b2ad 100644 --- a/libavcodec/qsvenc.h +++ b/libavcodec/qsvenc.h @@ -64,7 +64,7 @@ #define QSV_HAVE_ICQQSV_VERSION_ATLEAST(1, 28) #defi

[FFmpeg-devel] [PATCH 2/6] qsv: libmfx no longer supports user plugin since version 2.0 (oneVPL)

2020-09-15 Thread Haihao Xiang
See https://spec.oneapi.com/versions/latest/elements/oneVPL/source/VPL_intel_media_sdk.html#msdk-full-name-feature-removals https://github.com/oneapi-src/oneVPL --- libavcodec/qsv.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index

[FFmpeg-devel] [PATCH 6/6] qsv: libmfx no longer supports OPAQUE memory since version 2.0 (oneVPL)

2020-09-15 Thread Haihao Xiang
--- libavcodec/qsv.c | 4 ++ libavcodec/qsv.h | 2 + libavcodec/qsv_internal.h| 2 + libavcodec/qsvdec.c | 9 libavcodec/qsvenc.c | 21 + libavcodec/qsvenc.h | 2 + libavfilter/qsvvpp.c | 2

[FFmpeg-devel] [PATCH 3/6] qsv: libmfx no longer supports audio since version 2.0 (oneVPL)

2020-09-15 Thread Haihao Xiang
--- libavcodec/qsv.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 472e0952b3..2b77fdb2bf 100644 --- a/libavcodec/qsv.c +++ b/libavcodec/qsv.c @@ -143,8 +143,10 @@ static const struct { { MFX_ERR_INVALID_VIDEO_PARAM, AVERROR(EINVAL), "i

[FFmpeg-devel] [PATCH 5/6] qsvenc: libmfx no longer supports MFX_RATECONTROL_LA_EXT since version 2.0 (oneVPL)

2020-09-15 Thread Haihao Xiang
--- libavcodec/qsvenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 3c66eed554..88a8a99517 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -100,7 +100,7 @@ static const struct { #if QSV_HAVE_VCM { MFX_RATEC