Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread Nicolas George
lance.lmw...@gmail.com (12020-05-30): > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavutil/dict.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavutil/dict.c b/libavutil/dict.c > index 0ea7138..a1107b1 100644 > --- a/libavutil/dict.c > +++

[FFmpeg-devel] [PATCH 1/3] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavutil/dict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/dict.c b/libavutil/dict.c index 0ea7138..a1107b1 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -103,8 +103,8 @@ int

[FFmpeg-devel] [PATCH 3/3] avcodec/alac: remove FF_ALLOC_OR_GOTO and gotos label

2020-05-30 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/alac.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 3b41373..bf05406 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -489,6 +489,7 @@ static

Re: [FFmpeg-devel] [PATCH] avcodec/mv30: fix warning: suggest braces around initialization of subobject [-Wmissing-braces]

2020-05-30 Thread lance . lmwang
On Sat, May 30, 2020 at 01:34:03PM +0200, Nicolas George wrote: > lance.lmw...@gmail.com (12020-05-30): > > > -int pfill[3][1] = { 0 }; > > > +int pfill[3][1] = { {0} }; > > > will apply it tomorow if no objection. > > This warning is bogus, the code is valid and a common pattern

Re: [FFmpeg-devel] [PATCH v2 2/2] lavfi/aiir: Refine the pad/vpad related operation

2020-05-30 Thread Hendrik Leppkes
On Sat, May 30, 2020 at 1:05 PM Paul B Mahol wrote: > > Nobody approved this, so revert ASAP! > Simple changes don't need to be approved, as long as they are on the list for long enough, otherwise nothing would ever get done. If you want to review them, you should do it before they've been on

Re: [FFmpeg-devel] [PATCH] libavutil: add clean aperture (CLAP) side data.

2020-05-30 Thread Kieran O Leary
Hi, On Fri 29 May 2020, 22:47 Neil Birkbeck, wrote: > On Mon, May 11, 2020 at 9:37 PM Neil Birkbeck > wrote: > > > > > > > On Wed, May 6, 2020 at 8:45 AM James Almer wrote: > > > >> On 5/6/2020 12:22 PM, Neil Birkbeck wrote: > >> > On Tue, May 5, 2020 at 5:11 AM Kieran O Leary < >

[FFmpeg-devel] [PATCH 2/3] avcodec/alac: Add FF_CODEC_CAP_INIT_CLEANUP

2020-05-30 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavcodec/alac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/alac.c b/libavcodec/alac.c index 82689da..3b41373 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -511,7 +511,6 @@ static int

Re: [FFmpeg-devel] [PATCH] avcodec/mv30: fix warning: suggest braces around initialization of subobject [-Wmissing-braces]

2020-05-30 Thread Nicolas George
lance.lmw...@gmail.com (12020-05-30): > > -int pfill[3][1] = { 0 }; > > +int pfill[3][1] = { {0} }; > will apply it tomorow if no objection. This warning is bogus, the code is valid and a common pattern in FFmpeg. IIRC, we decided to keep it that way when it happens. Regards,

Re: [FFmpeg-devel] [PATCH v2] avfilter/vf_lut3d: prelut support for 3d cinespace luts

2020-05-30 Thread Paul B Mahol
LGTM On 5/24/20, mindm...@gmail.com wrote: > From: Mark Reid > > changes since v1: > * cleaned up code style > * slightly reworked apply_lut functions to feel more consistent with code > > --- > libavfilter/vf_lut3d.c | 372 +++-- > 1 file changed, 317

[FFmpeg-devel] [PATCH 2/4] lavf/tls_openssl: use the system cert store by default

2020-05-30 Thread rcombs
--- libavformat/tls_openssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index d66845cf48..b44dd3136d 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -259,6 +259,9 @@ static int tls_open(URLContext *h,

Re: [FFmpeg-devel] [PATCH] avfilter: add dblur video filter

2020-05-30 Thread Paul B Mahol
Will apply. On 5/27/20, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > doc/filters.texi | 23 +++ > libavfilter/Makefile | 1 + > libavfilter/allfilters.c | 1 + > libavfilter/vf_dblur.c | 307 +++ > 4 files changed, 332

Re: [FFmpeg-devel] [PATCH] avcodec: add PFM image decoder

2020-05-30 Thread Paul B Mahol
Will apply. On 5/27/20, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > libavcodec/Makefile | 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/codec_desc.c | 7 ++ > libavcodec/codec_id.h | 1 + > libavcodec/pnm.c| 21 +--- > libavcodec/pnm.h

[FFmpeg-devel] [PATCH 4/4] lavf/tls: verify TLS connections by default whenever possible

2020-05-30 Thread rcombs
--- libavformat/tls.c | 13 + libavformat/tls.h | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/libavformat/tls.c b/libavformat/tls.c index 10e0792e29..3cf24ca056 100644 --- a/libavformat/tls.c +++ b/libavformat/tls.c @@ -64,6 +64,19 @@ int

[FFmpeg-devel] [PATCH 3/4] lavf/tls: use AV_OPT_TYPE_BOOL

2020-05-30 Thread rcombs
--- libavformat/tls.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/tls.h b/libavformat/tls.h index beb19d6d55..6c2d025f6c 100644 --- a/libavformat/tls.h +++ b/libavformat/tls.h @@ -45,10 +45,10 @@ typedef struct TLSShared { #define

[FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: fix make checkheaders fail

2020-05-30 Thread Jun Zhao
From: Jun Zhao make checkheaders will get error as follow: CC libavutil/hwcontext_vulkan.h.o In file included from libavutil/hwcontext_vulkan.h.c:1: ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ undeclared here (not in a function) 130 | void

Re: [FFmpeg-devel] [PATCH v2 7/7] avcodec/adpcmenc: remove gotos and error label

2020-05-30 Thread lance . lmwang
On Fri, May 29, 2020 at 01:02:34PM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavcodec/adpcmenc.c | 13 +++-- > 1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c > index

[FFmpeg-devel] [PATCH 1/4] lavf/tls_openssl: add support for verifying the server hostname on >=1.1.0

2020-05-30 Thread rcombs
--- libavformat/tls_openssl.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/libavformat/tls_openssl.c b/libavformat/tls_openssl.c index 002197fa76..d66845cf48 100644 --- a/libavformat/tls_openssl.c +++ b/libavformat/tls_openssl.c @@ -272,8 +272,6 @@ static

Re: [FFmpeg-devel] [PATCH] avutil/attributes: Fix too many warning: false is not defined [-Wundef]

2020-05-30 Thread lance . lmwang
On Sat, May 30, 2020 at 01:27:30AM +0200, Hendrik Leppkes wrote: > On Fri, May 29, 2020 at 11:46 PM Carl Eugen Hoyos wrote: > > > > > > > > > > > Am 29.05.2020 um 13:18 schrieb lance.lmw...@gmail.com: > > > > > > From: Limin Wang > > > > > > Signed-off-by: Limin Wang > > > --- > > > try to

Re: [FFmpeg-devel] [PATCH v2 2/2] lavfi/aiir: Refine the pad/vpad related operation

2020-05-30 Thread Paul B Mahol
Nobody approved this, so revert ASAP! On 5/25/20, Jun Zhao wrote: > From: Jun Zhao > > move the pad/vpad related operation with more natural > coding style. > > Signed-off-by: Jun Zhao > --- > libavfilter/af_aiir.c | 10 -- > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff

Re: [FFmpeg-devel] [PATCH] avcodec/mv30: fix warning: suggest braces around initialization of subobject [-Wmissing-braces]

2020-05-30 Thread lance . lmwang
On Tue, May 12, 2020 at 11:09:19PM +0800, lance.lmw...@gmail.com wrote: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavcodec/mv30.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/mv30.c b/libavcodec/mv30.c > index fed9bcd..7e67133 100644

[FFmpeg-devel] [PATCH v6] avcodec/mpeg12enc: support mpeg2 encoder const profile

2020-05-30 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- doc/encoders.texi | 14 ++ libavcodec/mpeg12enc.c | 2 ++ libavcodec/profiles.h | 8 3 files changed, 24 insertions(+) diff --git a/doc/encoders.texi b/doc/encoders.texi index 954f0f6..1331b79 100644 ---

Re: [FFmpeg-devel] [PATCH v5] avcodec/mpeg12enc: support mpeg2 encoder const profile

2020-05-30 Thread lance . lmwang
On Fri, May 29, 2020 at 09:07:52PM +0200, Marton Balint wrote: > > > On Fri, 29 May 2020, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavcodec/mpeg12enc.c | 2 ++ > > libavcodec/profiles.h | 6 ++ > > 2 files changed, 8

[FFmpeg-devel] [PATCH 32/36] avcodec/mp3_header_decompress_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 31/36] avcodec/mjpeg2jpeg_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 29/36] avcodec/movsub_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

Re: [FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: fix make checkheaders fail

2020-05-30 Thread Lynne
May 30, 2020, 14:16 by mypopy...@gmail.com: > From: Jun Zhao > > make checkheaders will get error as follow: > CClibavutil/hwcontext_vulkan.h.o > In file included from libavutil/hwcontext_vulkan.h.c:1: > ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ > undeclared here

[FFmpeg-devel] [PATCH v2] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavutil/dict.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/dict.c b/libavutil/dict.c index 0ea7138..9d3d96c 100644 --- a/libavutil/dict.c +++ b/libavutil/dict.c @@ -103,8 +103,8 @@ int

Re: [FFmpeg-devel] [PATCH] avcodec/hq_hqa: Check info size

2020-05-30 Thread Michael Niedermayer
On Sat, May 30, 2020 at 02:09:42AM +0200, Hendrik Leppkes wrote: > On Sat, May 30, 2020 at 2:01 AM Michael Niedermayer > wrote: > > > > Fixes: assertion failure > > Fixes: > > 21079/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HQ_HQA_fuzzer-5737046523248640 > > > > Found-by: continuous

[FFmpeg-devel] [PATCH] avcodec/internal: move packet related functions to their own header

2020-05-30 Thread James Almer
Signed-off-by: James Almer --- I included the new header directly in internal.h because the alternative was including it in a hundred or so files that call ff_alloc_packet2(). If that's nonetheless prefered, i can go ahead with it. libavcodec/internal.h| 35 +---

[FFmpeg-devel] [PATCH 24/36] avcodec/h264_mp4toannexb_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 27/36] avcodec/mjpega_dump_header_bsf: Cosmetics

2020-05-30 Thread Andreas Rheinhardt
Reindentation; furthermore, the names of the out and out_buf variables have been switched: The latter is now an AVBufferRef * whereas the former is directly used for writing. And some variables have been put into a smaller scope. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 30/36] avcodec/imx_dump_header_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 28/36] avcodec/mjpega_dump_header_bsf: Miscellaneous improvements

2020-05-30 Thread Andreas Rheinhardt
1. Instead of comparing two values read via AV_RL32 one can read both via AV_RN32 and compare the values. 2. Errors like AVERROR(ENOMEM) from failed allocations are now always forwarded. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpega_dump_header_bsf.c | 5 +++-- 1 file changed, 3

[FFmpeg-devel] [PATCH 23/36] avcodec/utils: Add utility functions for bsf

2020-05-30 Thread Andreas Rheinhardt
Several bitstream filters (e.g. dump_extradata, imxdump, mjpeg2jpeg, mjpegadump, mp3decomp, ...) don't buffer packets; instead, they just modify the buffer of one packet and don't change any other of the packet's non-buffer properties. The usual approach of these bitstream filters is to use

[FFmpeg-devel] [PATCH 26/36] avcodec/mjpega_dump_header_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 20/36] avcodec/hevc_mp4toannexb_bsf: Stop reallocating output buffer

2020-05-30 Thread Andreas Rheinhardt
Instead parse the input packet twice: Once to get the size of the output packet to be allocated (and to check the input packet for consistency) and once to actually copy the data. Not reallocating the output buffer also means that one can now use a PutByteContext for writing; it improves

[FFmpeg-devel] [PATCH 19/36] avcodec/hevc_mp4toannexb_bsf: Use unchecked bytestream2 API

2020-05-30 Thread Andreas Rheinhardt
We already check manually and error out on invalid data, so we don't have to rely on the implicit checks provided by the safe version of the bytestream2 API. Signed-off-by: Andreas Rheinhardt --- libavcodec/hevc_mp4toannexb_bsf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff

[FFmpeg-devel] [PATCH 21/36] avcodec/hevc_mp4toannexb_bsf: Reindent after last commit

2020-05-30 Thread Andreas Rheinhardt
While just at it, use a smaller scope for a loop counter. Signed-off-by: Andreas Rheinhardt --- libavcodec/hevc_mp4toannexb_bsf.c | 45 +++ 1 file changed, 22 insertions(+), 23 deletions(-) diff --git a/libavcodec/hevc_mp4toannexb_bsf.c

[FFmpeg-devel] [PATCH 25/36] avcodec/hevc_mp4toannexb_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 22/36] avcodec/h264_mp4toannexb_bsf: Improve returned error code

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_mp4toannexb_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c index 2822644b10..91cabcf170 100644 --- a/libavcodec/h264_mp4toannexb_bsf.c +++

Re: [FFmpeg-devel] [PATCH 23/36] avcodec/utils: Add utility functions for bsf

2020-05-30 Thread James Almer
On 5/30/2020 1:05 PM, Andreas Rheinhardt wrote: > Several bitstream filters (e.g. dump_extradata, imxdump, mjpeg2jpeg, > mjpegadump, mp3decomp, ...) don't buffer packets; instead, they just > modify the buffer of one packet and don't change any other of the > packet's non-buffer properties. The

Re: [FFmpeg-devel] [PATCH 35/36] avcodec/vp9_superframe_bsf: Only store what is needed later

2020-05-30 Thread James Almer
On 5/30/2020 1:05 PM, Andreas Rheinhardt wrote: > This commit ends storing all the packets for later use. Instead the only > part that is actually needed later is kept: The buffer. This avoids > copies of packet structures and also makes the init function > superfluous. > > Signed-off-by: Andreas

Re: [FFmpeg-devel] [PATCH] avcodec/mv30: fix warning: suggest braces around initialization of subobject [-Wmissing-braces]

2020-05-30 Thread Nicolas George
Michael Niedermayer (12020-05-30): > if these warnings are not fixed, then ideally they should be suppressed > by some other means like compiler flags > so they do not distract from real issues That would be best. IIRC, the discussion arose when we considered adding the braces but it actually

[FFmpeg-devel] [PATCH 1/2] checkasm: sw_rgb: Fix mixed declaration and code

2020-05-30 Thread Jun Zhao
From: Jun Zhao Fix mixed declaration and code. Signed-off-by: Jun Zhao --- tests/checkasm/sw_rgb.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index 1e8ea15..e5aad20 100644 --- a/tests/checkasm/sw_rgb.c +++

[FFmpeg-devel] [PATCH 15/36] avcodec/mjpega_dump_header_bsf: Don't overread

2020-05-30 Thread Andreas Rheinhardt
When encountering an SOS marker, the two bytes after this marker are read, too. So one needs to make sure that these two bytes are still part of the packet's data. And when one checks whether the input already is of the desired format, one has to make sure that the place where one searches the

[FFmpeg-devel] [PATCH 14/36] avcodec/mjpega_dump_header_bsf: Make code more robust wrt overflow

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpega_dump_header_bsf.c | 18 +- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/libavcodec/mjpega_dump_header_bsf.c b/libavcodec/mjpega_dump_header_bsf.c index ab68f9c3e9..40c4c690ab 100644 ---

[FFmpeg-devel] [PATCH 13/36] avcodec/mp3_header_decompress_bsf: Improve readability

2020-05-30 Thread Andreas Rheinhardt
Up until now, the mp3_header_decompress bsf used a single variable for two purposes in a bitfield-like manner: To contain the bitrate index as well as whether the padding_bit is set. The former was contained in bits 1-4, while the latter was given by bit 0. This made the code hard to understand.

[FFmpeg-devel] [PATCH 16/36] avcodec/mjpega_dump_header_bsf: Only allocate when necessary

2020-05-30 Thread Andreas Rheinhardt
This avoids having to free a buffer that hasn't been used at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/mjpega_dump_header_bsf.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/libavcodec/mjpega_dump_header_bsf.c

[FFmpeg-devel] [PATCH 12/36] avcodec/mp3_header_decompress_bsf: Don't output uninitialized CRC

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mp3_header_decompress_bsf.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/mp3_header_decompress_bsf.c b/libavcodec/mp3_header_decompress_bsf.c index 44c174c21c..fe021deed3 100644 ---

[FFmpeg-devel] [PATCH 11/36] avcodec/vp9_raw_reorder_bsf: Check for existence of data before reading it

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_raw_reorder_bsf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vp9_raw_reorder_bsf.c b/libavcodec/vp9_raw_reorder_bsf.c index 6562399159..6e77816256 100644 --- a/libavcodec/vp9_raw_reorder_bsf.c +++

[FFmpeg-devel] [PATCH 09/36] avcodec/vp9_superframe_split_bsf: Don't restrict frame_size to INT_MAX/8

2020-05-30 Thread Andreas Rheinhardt
By using a GetBitContext with a packet's data as buffer, one restricts said packet to a size of about INT_MAX/8. This restriction is not onerous, but unnecessary: The bitreader is only used to read the first byte of data. So change it. Furthermore, given that it has already been checked that the

[FFmpeg-devel] [PATCH 17/36] avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input

2020-05-30 Thread Andreas Rheinhardt
The hevc_mp4toannexb bsf does not explicitly check whether a NAL unit is so big that it extends beyond the end of the input packet; it does so only implicitly by using the checked version of the bytestream2 API. But this has downsides compared to real checks: It can lead to huge allocations (up to

[FFmpeg-devel] [PATCH 18/36] avcodec/bytestream: Add unchecked bytestream2 peek functions

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/bytestream.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h index 0516a6e3dc..d0033f14f3 100644 --- a/libavcodec/bytestream.h +++ b/libavcodec/bytestream.h @@ -77,11

[FFmpeg-devel] [PATCH 08/36] avcodec/vp9_superframe_split_bsf: Improve returned error message

2020-05-30 Thread Andreas Rheinhardt
If a parsed frame size happens to be so big that it is negative (as an int), the size in the error message would be negative which is nonsense in light of the fact that the size field is an unsigned value in the standard. Change this and also change the type of the variable to unsigned. Also

[FFmpeg-devel] [PATCH 10/36] avcodec/vp9_superframe_split_bsf: Use unchecked bytestream reader

2020-05-30 Thread Andreas Rheinhardt
It has already been checked that there is enough data available. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_split_bsf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp9_superframe_split_bsf.c b/libavcodec/vp9_superframe_split_bsf.c index

[FFmpeg-devel] [PATCH 33/36] avcodec/dump_extradata_bsf: Store pointer for access

2020-05-30 Thread Andreas Rheinhardt
Using par->extradata instead of ctx->par_in->extradata makes the code more readable and removes an overlong line. Furthermore, check for extradata_size instead of for the existence of extradata as nothing needs to be done in case extradata_size is zero. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 36/36] avcodec/vp9_superframe_bsf: Merge close and flush

2020-05-30 Thread Andreas Rheinhardt
They are essentially identical now. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 18 -- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c index 6d6b2c57de..278f5a47a6 100644

[FFmpeg-devel] [PATCH 34/36] avcodec/dump_extradata_bsf: Remove intermediate packet

2020-05-30 Thread Andreas Rheinhardt
This commit ends using separate packets for in- and output. Instead, the input is read directly into the packet destined for output via ff_bsf_get_packet_ref() and only the buffer-related fields are modified; the others are not touched. Signed-off-by: Andreas Rheinhardt ---

[FFmpeg-devel] [PATCH 35/36] avcodec/vp9_superframe_bsf: Only store what is needed later

2020-05-30 Thread Andreas Rheinhardt
This commit ends storing all the packets for later use. Instead the only part that is actually needed later is kept: The buffer. This avoids copies of packet structures and also makes the init function superfluous. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 45

Re: [FFmpeg-devel] [PATCH 33/36] avcodec/dump_extradata_bsf: Store pointer for access

2020-05-30 Thread James Almer
On 5/30/2020 1:05 PM, Andreas Rheinhardt wrote: > Using par->extradata instead of ctx->par_in->extradata makes the code > more readable and removes an overlong line. > > Furthermore, check for extradata_size instead of for the existence of > extradata as nothing needs to be done in case

Re: [FFmpeg-devel] [PATCH] avcodec/mv30: fix warning: suggest braces around initialization of subobject [-Wmissing-braces]

2020-05-30 Thread Michael Niedermayer
On Sat, May 30, 2020 at 01:34:03PM +0200, Nicolas George wrote: > lance.lmw...@gmail.com (12020-05-30): > > > -int pfill[3][1] = { 0 }; > > > +int pfill[3][1] = { {0} }; > > > will apply it tomorow if no objection. > > This warning is bogus, the code is valid agree > and a

Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread lance . lmwang
On Sat, May 30, 2020 at 03:32:18PM +0200, Nicolas George wrote: > lance.lmw...@gmail.com (12020-05-30): > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavutil/dict.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/libavutil/dict.c

Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread Nicolas George
lance.lmw...@gmail.com (12020-05-30): > I think it's cosmetic changes, so I didn't change the alignment for the first > version. > If it's OK, I'll update with format changes also. Please, try to see the moon, not the finger. Why do you think we insist on cosmetic changes on separate patches?

Re: [FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: fix make checkheaders fail

2020-05-30 Thread James Almer
On 5/30/2020 10:16 AM, Jun Zhao wrote: > From: Jun Zhao > > make checkheaders will get error as follow: > CClibavutil/hwcontext_vulkan.h.o > In file included from libavutil/hwcontext_vulkan.h.c:1: > ./libavutil/hwcontext_vulkan.h:130:23: error: ‘AV_NUM_DATA_POINTERS’ > undeclared here (not

[FFmpeg-devel] [PATCH 03/36] avcodec/vp9_superframe_bsf: Flush bsf upon superframe creation error

2020-05-30 Thread Andreas Rheinhardt
Otherwise we might come into a situation where we have to reject future packets because the cache is already full. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/libavcodec/vp9_superframe_bsf.c

[FFmpeg-devel] [PATCH 04/36] avcodec/vp9_superframe_bsf: Check superframe size for overflow

2020-05-30 Thread Andreas Rheinhardt
This is not dangerous now, because init_get_bits8() already restricts the size of each packet to INT_MAX/8 - AV_INPUT_BUFFER_PADDING_SIZE. But it is nevertheless better to check this explicitly. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 14 +- 1 file

[FFmpeg-devel] [PATCH 02/36] avcodec/vp9_superframe_bsf: Reuse vp9_superframe_flush()

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 27 --- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c index 34a47aa69e..d9c78c67f5 100644 ---

[FFmpeg-devel] [PATCH 01/36] avcodec/vp9_superframe_bsf: Check for existence of data before reading it

2020-05-30 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c index 57681e29e4..34a47aa69e 100644 --- a/libavcodec/vp9_superframe_bsf.c +++

[FFmpeg-devel] [PATCH 05/36] avcodec/vp9_superframe_bsf: Allow up to eight frames in a superframe

2020-05-30 Thread Andreas Rheinhardt
Up until now, the bsf errored out with a message that there were too many invisible frames if there were already seven frames cached even when the new frame was not invisible. This has been changed. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 4 +++- 1 file changed,

[FFmpeg-devel] [PATCH 06/36] avcodec/vp9_superframe_bsf: Don't restrict packet size to INT_MAX/8

2020-05-30 Thread Andreas Rheinhardt
by opening a GetBitContext on its data when all the info one cares about is actually in the first byte of data. Signed-off-by: Andreas Rheinhardt --- libavcodec/vp9_superframe_bsf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/vp9_superframe_bsf.c

[FFmpeg-devel] [PATCH 07/36] avcodec/vp9_superframe_split_bsf: Discard frames with size zero

2020-05-30 Thread Andreas Rheinhardt
They are invalid in VP9. If the packet given to the bsf has a size of zero, it would try to access pkt->data[-1] which could lead to segfaults. And if any of the frames inside a superframe had a size of zero, the code would either read into the next frame or into the superframe index.

Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread lance . lmwang
On Sat, May 30, 2020 at 04:03:33PM +0200, Nicolas George wrote: > lance.lmw...@gmail.com (12020-05-30): > > I think it's cosmetic changes, so I didn't change the alignment for the > > first version. > > If it's OK, I'll update with format changes also. > > Please, try to see the moon, not the

Re: [FFmpeg-devel] [PATCH 1/3] avutil/dict: av_realloc -> av_realloc_array()

2020-05-30 Thread James Almer
On 5/30/2020 10:55 AM, lance.lmw...@gmail.com wrote: > On Sat, May 30, 2020 at 03:32:18PM +0200, Nicolas George wrote: >> lance.lmw...@gmail.com (12020-05-30): >>> From: Limin Wang >>> >>> Signed-off-by: Limin Wang >>> --- >>> libavutil/dict.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2

Re: [FFmpeg-devel] [PATCH 2/2] hwcontext_vulkan: fix make checkheaders fail

2020-05-30 Thread James Almer
On 5/30/2020 11:19 AM, James Almer wrote: > On 5/30/2020 10:16 AM, Jun Zhao wrote: >> From: Jun Zhao >> >> make checkheaders will get error as follow: >> CC libavutil/hwcontext_vulkan.h.o >> In file included from libavutil/hwcontext_vulkan.h.c:1: >> ./libavutil/hwcontext_vulkan.h:130:23: error:

Re: [FFmpeg-devel] [PATCH 17/36] avcodec/hevc_mp4toannexb_bsf: Check NAL size against available input

2020-05-30 Thread Michael Niedermayer
On Sat, May 30, 2020 at 06:05:22PM +0200, Andreas Rheinhardt wrote: > The hevc_mp4toannexb bsf does not explicitly check whether a NAL unit > is so big that it extends beyond the end of the input packet; it does so > only implicitly by using the checked version of the bytestream2 API. > But this

Re: [FFmpeg-devel] [PATCH v2] avfilter/vf_lut3d: prelut support for 3d cinespace luts

2020-05-30 Thread Michael Niedermayer
On Sat, May 30, 2020 at 09:59:35AM +0200, Paul B Mahol wrote: > LGTM will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many things microsoft did are stupid, but not doing something just because microsoft did it is even more stupid. If everything

[FFmpeg-devel] [PATCH 1/2] avutil/buffer: add a mention that some arguments from av_buffer_pool_init2() may be NULL

2020-05-30 Thread James Almer
Signed-off-by: James Almer --- libavutil/buffer.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavutil/buffer.h b/libavutil/buffer.h index e0f94314f4..aa611fee8a 100644 --- a/libavutil/buffer.h +++ b/libavutil/buffer.h @@ -252,14 +252,15 @@ AVBufferPool

[FFmpeg-devel] [PATCH 2/2] avutil/buffer: reject NULL as argument for the av_buffer_pool_init2() alloc callback

2020-05-30 Thread James Almer
This prevents NULL pointer dereference crashes when calling av_buffer_pool_get() using the resulting pool. Signed-off-by: James Almer --- libavutil/buffer.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavutil/buffer.c b/libavutil/buffer.c index

Re: [FFmpeg-devel] [PATCH 2/2] Set stream_id correctly based on KLV profile selected.

2020-05-30 Thread Brad Hards
I think I fixed these issues in V2 http://ffmpeg.org/pipermail/ffmpeg-devel/2020-May/263332.html and http://ffmpeg.org/pipermail/ffmpeg-devel/2020-May/26.html Is anything more required? [Context: this is my first patch set to ffmpeg, and I'm still trying to understand the conventions] Brad

[FFmpeg-devel] [PATCH] libavutil/timestamp.h: Fix loss of precision in timestamps

2020-05-30 Thread Allan Cady
I prepared this patch a year ago but never followed through to get it accepted. Thought I would give it another try. I've been using a local copy with these changes, and for me it makes the difference between silencedetect being usable or not. Brief description: The existing implementation of

[FFmpeg-devel] [PATCH] fate: add adpcm_ima_ssi encoding test

2020-05-30 Thread Zane van Iperen
Signed-off-by: Zane van Iperen --- tests/fate/acodec.mak | 2 ++ tests/ref/acodec/adpcm-ima_ssi | 4 2 files changed, 6 insertions(+) create mode 100644 tests/ref/acodec/adpcm-ima_ssi diff --git a/tests/fate/acodec.mak b/tests/fate/acodec.mak index 80d26de0f9..bb6bfe5ada 100644

Re: [FFmpeg-devel] [PATCH] Don't update start time when lastpts is AV_NOPTS_VALUE.

2020-05-30 Thread Michael Niedermayer
On Fri, May 29, 2020 at 11:59:48AM -0700, Dale Curtis wrote: > Signed-off-by: Dale Curtis > --- > libavformat/oggparsetheora.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > oggparsetheora.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/anm: Check extradata length before allocating frame

2020-05-30 Thread Peter Ross
On Sat, May 30, 2020 at 06:32:59AM +0200, Andreas Rheinhardt wrote: > Then one doesn't need to free the frame in case the length turns out to > be insufficient. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/anm.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) > >

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/anm: Don't unnecessarily use context variables

2020-05-30 Thread Peter Ross
On Sat, May 30, 2020 at 06:33:00AM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/anm.c | 39 +++ > 1 file changed, 19 insertions(+), 20 deletions(-) > > diff --git a/libavcodec/anm.c b/libavcodec/anm.c > index

Re: [FFmpeg-devel] [PATCH v6 1/1] avformat: add kvag muxer

2020-05-30 Thread Michael Niedermayer
On Sat, May 30, 2020 at 12:10:14AM +, Zane van Iperen wrote: > On Fri, 29 May 2020 23:41:46 +0200 > "Michael Niedermayer" wrote: > > > > > On Fri, May 29, 2020 at 10:54:59AM +, Zane van Iperen wrote: > > > Signed-off-by: Zane van Iperen > > > --- > > > Changelog| 1 +

Re: [FFmpeg-devel] [PATCH 1/3] ffbuild: Refine MIPS handling

2020-05-30 Thread Shiyou Yin
>-Original Message- >From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-boun...@ffmpeg.org] >On Behalf Of >Jiaxun Yang >Sent: Tuesday, May 26, 2020 5:48 PM >To: ffmpeg-devel@ffmpeg.org >Cc: yinshi...@loongson.cn; Jiaxun Yang >Subject: [FFmpeg-devel] [PATCH 1/3] ffbuild: Refine