Re: [FFmpeg-devel] [PATCH V6 4/6] lavu: add side data AV_FRAME_DATA_BOUNDING_BOXES

2021-04-01 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of Guo, > Yejun > Sent: 2021年4月1日 19:32 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH V6 4/6] lavu: add side data > AV_FRAME_DATA_BOUNDING_BOXES > > > > > -Original Message- > > From:

[FFmpeg-devel] [PATCH 2/3 v2] avformat: add a flag to enable exporting attached pictures

2021-04-01 Thread James Almer
Signed-off-by: James Almer --- Fixed some silly bugs in apetag, matroska, mov, and added a missing check in asf. libavformat/apetag.c | 8 +--- libavformat/asf.c| 6 -- libavformat/avformat.h | 1 + libavformat/dsfdec.c | 3 ++- libavformat/flacdec.c

[FFmpeg-devel] [PATCH 3/3 v2] avformat: add apic to AVStream

2021-04-01 Thread James Almer
Signed-off-by: James Almer --- Now allocated only on attached_pic disposition streams. Added muxer usage doxy for the new field as well since Andreas has a patchset meant for this purpose. But i can make it say unused instead and let the aforementioned patchset change it as its own API change. S

[FFmpeg-devel] [PATCH 2/3] avformat: add a flag to enable exporting attached pictures

2021-04-01 Thread James Almer
Signed-off-by: James Almer --- libavformat/apetag.c | 5 +++-- libavformat/asf.c| 3 ++- libavformat/avformat.h | 1 + libavformat/dsfdec.c | 3 ++- libavformat/flacdec.c| 4 +++- libavformat/hls.c| 10 ++ libavformat/matroskadec.

[FFmpeg-devel] [PATCH 1/2] avformat/apetag: ensure the binary tag is valid before allocating a stream for it

2021-04-01 Thread James Almer
Signed-off-by: James Almer --- libavformat/apetag.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/libavformat/apetag.c b/libavformat/apetag.c index 6f82fbe202..5a8144a27c 100644 --- a/libavformat/apetag.c +++ b/libavformat/apetag.c @@ -63,9 +63,7 @@ static int

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

2021-04-01 Thread Michael Niedermayer
On Fri, Apr 02, 2021 at 12:49:26AM +0200, Michael Niedermayer wrote: > On Fri, Apr 02, 2021 at 12:25:53AM +0200, Michael Niedermayer wrote: > > On Thu, Apr 01, 2021 at 09:22:23PM +0200, Paul B Mahol wrote: > > > Try this attached patch. I have not looked at all samples, as some > > > allocate > >

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

2021-04-01 Thread Michael Niedermayer
On Fri, Apr 02, 2021 at 12:25:53AM +0200, Michael Niedermayer wrote: > On Thu, Apr 01, 2021 at 09:22:23PM +0200, Paul B Mahol wrote: > > Try this attached patch. I have not looked at all samples, as some allocate > > too much memory for my system. > > > But this patch points where real bugs are, u

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

2021-04-01 Thread Michael Niedermayer
On Thu, Apr 01, 2021 at 09:22:23PM +0200, Paul B Mahol wrote: > Try this attached patch. I have not looked at all samples, as some allocate > too much memory for my system. > But this patch points where real bugs are, unlike yours patch which hides > real bugs even more. I would appreciate if cfh

[FFmpeg-devel] [PATCH 7/7] avcodec/options: Remove always-true check

2021-04-01 Thread Andreas Rheinhardt
Every codec has a name. Signed-off-by: Andreas Rheinhardt --- libavcodec/options.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/options.c b/libavcodec/options.c index 58c7ce8d62..b8d4a9faf6 100644 --- a/libavcodec/options.c +++ b/libavcodec/options.c @@ -39,7 +3

[FFmpeg-devel] [PATCH 6/7] avutil/frame: Return 0 on success in av_frame_ref()

2021-04-01 Thread Andreas Rheinhardt
av_frame_copy() is allowed to return values >= 0 on success, whereas the documentation of av_frame_ref() states that the return value is 0 on success. Ergo the latter must not just return the former's return value. Signed-off-by: Andreas Rheinhardt --- libavutil/frame.c | 2 +- 1 file changed, 1

[FFmpeg-devel] [PATCH 5/7] avformat/dss: Return 0 on success

2021-04-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/dss.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/dss.c b/libavformat/dss.c index f4545326d2..fe8fd5cebb 100644 --- a/libavformat/dss.c +++ b/libavformat/dss.c @@ -247,7 +247,7 @@ static int dss_sp_read_pack

[FFmpeg-devel] [PATCH 4/7] avformat/dss: Avoid using intermediate buffer

2021-04-01 Thread Andreas Rheinhardt
All one needs is one byte beyond the end of the normal data; and because the packet is padded, one already has it. Signed-off-by: Andreas Rheinhardt --- libavformat/dss.c | 25 +++-- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/libavformat/dss.c b/libavform

[FFmpeg-devel] [PATCH 3/7] avformat/dss: Set values known during read_header in read_header

2021-04-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/dss.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/dss.c b/libavformat/dss.c index 468de3fe84..0b6d68af99 100644 --- a/libavformat/dss.c +++ b/libavformat/dss.c @@ -144,6 +144,8 @@ static int dss_read_heade

[FFmpeg-devel] [PATCH 2/7] avformat/dss: Don't prematurely modify context variable

2021-04-01 Thread Andreas Rheinhardt
The DSS demuxer currently decrements a counter that should be positive at the beginning of read_packet; should it become negative, it means that the data to be read can't be read contiguosly, but has to be read in two parts. In this case the counter is incremented again after the first read if said

[FFmpeg-devel] [PATCH 1/7] avformat/utils: Check allocations for failure

2021-04-01 Thread Andreas Rheinhardt
There would be leaks in case of failure. Signed-off-by: Andreas Rheinhardt --- There is unfortunately more of this dynarray_add. libavformat/utils.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 0834c80f4e..

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

2021-04-01 Thread Paul B Mahol
Try this attached patch. I have not looked at all samples, as some allocate too much memory for my system. But this patch points where real bugs are, unlike yours patch which hides real bugs even more. From fc4abcc0d0058ea8a7cd79ce26bfbcbed4cf5329 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date:

Re: [FFmpeg-devel] [PATCH 1/3] libswscale/x86/yuv2yuvX: Removes unrolling for mmx and mmxext

2021-04-01 Thread Michael Niedermayer
On Thu, Apr 01, 2021 at 12:00:15PM +0200, Alan Kelly wrote: > --- > This is so that inputs of size 8 are supported, as was the case with > the original implementation. A bug was found with inputs not divisible > by 16. > libswscale/x86/yuv2yuvX.asm | 14 +- > 1 file changed, 13 inse

[FFmpeg-devel] [PATCH 4/4] avcodec/ac3enc: Simplify AC-3 bit counting

2021-04-01 Thread Andreas Rheinhardt
When encoding E-AC-3, whether coupling is on or not determines whether an additional frame based coupling exponent strategy element frmcplexpstr (of size five bits) is present in the bitstream. So just add five to the number of bits when counting them instead of adding 5*s->cpl_on (the latter field

[FFmpeg-devel] [PATCH 3/4] avcodec/[e]ac3enc: Fix indentation

2021-04-01 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Will apply patches 1-4 tomorrow unless there are objections. libavcodec/ac3enc.c | 37 +++-- libavcodec/eac3enc.c | 16 2 files changed, 27 insertions(+), 26 deletions(-) diff --git a/libavcodec/ac3enc.c b/l

Re: [FFmpeg-devel] [PATCH] avformat/utils: add helper functions to retrieve index entries from an AVStream

2021-04-01 Thread James Almer
On 4/1/2021 11:29 AM, Nicolas George wrote: James Almer (12021-04-01): Pos doesn't seem like it would be useful outside of the internal seeking methods, size seems to be the least useful of them all pos and size seem very useful to me for an application that wants to make quick graphs of (time

Re: [FFmpeg-devel] [PATCH] avformat/utils: add helper functions to retrieve index entries from an AVStream

2021-04-01 Thread Nicolas George
James Almer (12021-04-01): > Pos doesn't seem like it would be useful outside of the internal seeking > methods, size seems to be the least useful of them all pos and size seem very useful to me for an application that wants to make quick graphs of (time, bitrate). As a general rule "foobar does

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/adpcmenc: don't share a single AVClass between multiple AVCodecs.

2021-04-01 Thread James Almer
On 4/1/2021 10:55 AM, Zane van Iperen wrote: On 1/4/21 11:24 pm, James Almer wrote: LGTM. It should be backported, too. That's the plan. Is this just 1/3 or the entire series? Just for 1/3. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/adpcmenc: don't share a single AVClass between multiple AVCodecs.

2021-04-01 Thread Zane van Iperen
On 1/4/21 11:24 pm, James Almer wrote: LGTM. It should be backported, too. That's the plan. Is this just 1/3 or the entire series? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscri

Re: [FFmpeg-devel] [PATCH] avformat/utils: add helper functions to retrieve index entries from an AVStream

2021-04-01 Thread James Almer
On 4/1/2021 7:07 AM, Anton Khirnov wrote: Quoting James Almer (2021-03-25 14:37:20) On 3/25/2021 8:55 AM, Nicolas George wrote: Same situation as av_add_index_entry(). And if you look at the signature of the (3) function in my last proposal, i kept the av_index_* namespace free precisely in cas

[FFmpeg-devel] [PATCH v3] examples/decode_video: flush parser to fix missing frame

2021-04-01 Thread Zhao Zhili
--- check EOF by "eof = !data_size && feof(f);" doc/examples/decode_video.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/examples/decode_video.c b/doc/examples/decode_video.c index 18ee90a6c0..2f779328a7 100644 --- a/doc/examples/decode_video.c +++ b/doc/ex

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/adpcmenc: don't share a single AVClass between multiple AVCodecs.

2021-04-01 Thread James Almer
On 4/1/2021 8:34 AM, Zane van Iperen wrote: Temporary fix until AVClass::child_class_next is gone. Signed-off-by: Zane van Iperen --- libavcodec/adpcmenc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index

[FFmpeg-devel] [PATCH 3/3] avfilter/find_rect: write score to metadata

2021-04-01 Thread Gyan Doshi
--- libavfilter/vf_find_rect.c | 4 1 file changed, 4 insertions(+) diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index f9129cc140..b6f5a1be29 100644 --- a/libavfilter/vf_find_rect.c +++ b/libavfilter/vf_find_rect.c @@ -187,6 +187,7 @@ static int filter_frame(AVFilterL

[FFmpeg-devel] [PATCH 2/3] avfilter/find_rect: add option to discard non-matching frames

2021-04-01 Thread Gyan Doshi
Default is disabled. --- doc/filters.texi | 3 +++ libavfilter/vf_find_rect.c | 9 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/filters.texi b/doc/filters.texi index 64878e15da..5e35fa6467 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12139,6 +1

[FFmpeg-devel] [PATCH 1/3] avfilter/find_rect: improve logging

2021-04-01 Thread Gyan Doshi
Log now indicates timestamps of frames where a match is made. Loglevel is changed to INFO since the user specifically wants this info. --- libavfilter/vf_find_rect.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_find_rect.c b/libavfilter/vf_find_rect.c index

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/tiff: Don't use separate temporary buffer for fax

2021-04-01 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Also don't unnecessarily copy the input data around if it needn't be > reversed; and remove a redundant memset -- av_fast_padded_malloc() > already does this for us. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/tiff.c | 28 ++-- > 1 file

[FFmpeg-devel] [PATCH 1/2] mov: Pick up "com.apple.quicktime.artwork" as cover art

2021-04-01 Thread Martin Storsjö
--- libavformat/mov.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index a1411264ec..162772f499 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -410,7 +410,18 @@ retry: str_size = data_size

Re: [FFmpeg-devel] [PATCH] mov: Skip computing SAR from invalid display matrix elements

2021-04-01 Thread Anton Khirnov
Quoting Vittorio Giovara (2021-04-01 12:09:36) > On Thu, Apr 1, 2021 at 10:09 AM Anton Khirnov wrote: > > > Quoting Vittorio Giovara (2021-03-31 23:18:01) > > > On Wed, Mar 31, 2021 at 8:54 PM Anton Khirnov wrote: > > > > > > > Quoting Vittorio Giovara (2021-03-31 18:43:02) > > > > > On Wed, Mar

[FFmpeg-devel] [PATCH 2/2] mov: Don't export unknown/unhandled metadata types as if they were UTF8

2021-04-01 Thread Martin Storsjö
They can be other incompatible text encodings (such as UTF-16), or even binary data. --- libavformat/mov.c | 8 1 file changed, 8 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 162772f499..f539bca1f0 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -509,6

[FFmpeg-devel] [PATCH 3/3] avcodec/adpcm: refactor init/flush code

2021-04-01 Thread Zane van Iperen
Most of the codecs just need everything zeroed. Those that don't are either handled inline during decode, or pull state from extradata. Move state reset/init functionality into adpcm_flush(), and invoke it from adpcm_decode_init(). Signed-off-by: Zane van Iperen --- libavcodec/adpcm.c | 71

[FFmpeg-devel] [PATCH 2/3] avcodec/adpcm_swf: remove memory allocation during trellis encoding

2021-04-01 Thread Zane van Iperen
The block size is hardcoded, so the buffer size is always known. Statically allocate the buffer on the stack. Signed-off-by: Zane van Iperen --- libavcodec/adpcmenc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 58

[FFmpeg-devel] [PATCH 1/3] avcodec/adpcmenc: don't share a single AVClass between multiple AVCodecs.

2021-04-01 Thread Zane van Iperen
Temporary fix until AVClass::child_class_next is gone. Signed-off-by: Zane van Iperen --- libavcodec/adpcmenc.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/adpcmenc.c b/libavcodec/adpcmenc.c index 78600735cf..58308dae47 100644 --- a/libavcodec/

Re: [FFmpeg-devel] [PATCH V6 4/6] lavu: add side data AV_FRAME_DATA_BOUNDING_BOXES

2021-04-01 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of Anton > Khirnov > Sent: 2021年4月1日 16:13 > To: FFmpeg development discussions and patches > Subject: Re: [FFmpeg-devel] [PATCH V6 4/6] lavu: add side data > AV_FRAME_DATA_BOUNDING_BOXES > > Quoting Guo, Yejun (2021-03-26 09:09:29) >

Re: [FFmpeg-devel] [PATCH] mov: Skip computing SAR from invalid display matrix elements

2021-04-01 Thread Vittorio Giovara
On Thu, Apr 1, 2021 at 10:09 AM Anton Khirnov wrote: > Quoting Vittorio Giovara (2021-03-31 23:18:01) > > On Wed, Mar 31, 2021 at 8:54 PM Anton Khirnov wrote: > > > > > Quoting Vittorio Giovara (2021-03-31 18:43:02) > > > > On Wed, Mar 31, 2021 at 2:41 PM Anton Khirnov > wrote: > > > > > > > >

Re: [FFmpeg-devel] [PATCH] avformat/utils: add helper functions to retrieve index entries from an AVStream

2021-04-01 Thread Anton Khirnov
Quoting James Almer (2021-03-25 14:37:20) > On 3/25/2021 8:55 AM, Nicolas George wrote: > > Same situation as av_add_index_entry(). And if you look at the signature > of the (3) function in my last proposal, i kept the av_index_* namespace > free precisely in case a new API in the future needs t

[FFmpeg-devel] [PATCH 1/3] libswscale/x86/yuv2yuvX: Removes unrolling for mmx and mmxext

2021-04-01 Thread Alan Kelly
--- This is so that inputs of size 8 are supported, as was the case with the original implementation. A bug was found with inputs not divisible by 16. libswscale/x86/yuv2yuvX.asm | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/libswscale/x86/yuv2yuvX.asm b/lib

[FFmpeg-devel] [PATCH 3/3] tests/checkasm/sw_scale: adds additional tests sizes for yux2yuvX

2021-04-01 Thread Alan Kelly
--- tests/checkasm/sw_scale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/sw_scale.c b/tests/checkasm/sw_scale.c index a10118704b..3ac0f9082f 100644 --- a/tests/checkasm/sw_scale.c +++ b/tests/checkasm/sw_scale.c @@ -68,8 +68,8 @@ static void check_yuv2

[FFmpeg-devel] [PATCH 2/3] libswscale/x86/swscale: Only call ff_yuv2yuvX functions if the input size is > 0

2021-04-01 Thread Alan Kelly
--- libswscale/x86/swscale.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libswscale/x86/swscale.c b/libswscale/x86/swscale.c index cc9e8b0155..0848a31461 100644 --- a/libswscale/x86/swscale.c +++ b/libswscale/x86/swscale.c @@ -197,7 +197,8 @@ static void yuv2yuvX_ ##o

Re: [FFmpeg-devel] [PATCH V6 4/6] lavu: add side data AV_FRAME_DATA_BOUNDING_BOXES

2021-04-01 Thread Anton Khirnov
Quoting Guo, Yejun (2021-03-26 09:09:29) > Signed-off-by: Guo, Yejun > --- > doc/APIchanges | 2 ++ > libavutil/Makefile | 1 + > libavutil/boundingbox.h | 79 + > libavutil/frame.c | 1 + > libavutil/frame.h | 7 > 5 file

Re: [FFmpeg-devel] [PATCH] mov: Skip computing SAR from invalid display matrix elements

2021-04-01 Thread Anton Khirnov
Quoting Vittorio Giovara (2021-03-31 23:18:01) > On Wed, Mar 31, 2021 at 8:54 PM Anton Khirnov wrote: > > > Quoting Vittorio Giovara (2021-03-31 18:43:02) > > > On Wed, Mar 31, 2021 at 2:41 PM Anton Khirnov wrote: > > > > > > > Quoting Vittorio Giovara (2021-03-30 18:55:27) > > > > > Hello, > >

Re: [FFmpeg-devel] [PATCH 1/2] avutil/common: Add FF_PTR_ADD()

2021-04-01 Thread Anton Khirnov
Quoting Michael Niedermayer (2021-03-31 00:44:16) > On Mon, Mar 29, 2021 at 12:19:57PM +0200, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2021-03-15 09:47:43) > > > Suggested-by: Andreas Rheinhardt > > > Signed-off-by: Michael Niedermayer > > > --- > > > libavutil/common.h | 2 ++ > > >

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/h265_metadata_bsf: Check nb_units before accessing the first in h265_metadata_update_fragment()

2021-04-01 Thread Michael Niedermayer
On Tue, Mar 30, 2021 at 01:31:25PM +0200, Michael Niedermayer wrote: > Fixes: null pointer dereference > Fixes: > 32113/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-4803262287052800 > > Same as 0c48c332eeb2866d9353125f701e099c48889463 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/exr: Check oe in huf_decode() before use

2021-04-01 Thread Michael Niedermayer
On Tue, Mar 30, 2021 at 11:23:02AM +0200, Michael Niedermayer wrote: > Fixes: out of array access > Fixes: > 31386/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5773234709594112 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmp