Re: [FFmpeg-devel] [PATCH 1/5] avformat/udp: add memory alloc checks

2021-01-06 Thread lance . lmwang
On Wed, Jan 06, 2021 at 09:39:17PM +0100, Marton Balint wrote: > > > On Wed, 6 Jan 2021, lance.lmw...@gmail.com wrote: > > > From: Limin Wang > > > > Signed-off-by: Limin Wang > > --- > > libavformat/udp.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/libavformat/udp.c

Re: [FFmpeg-devel] [PATCH 2/5] avformat/mxfenc: simplify the code and use mode for OP1a/D10/OPAtom muxer

2021-01-06 Thread lance . lmwang
On Wed, Jan 06, 2021 at 06:14:07PM +0100, Marton Balint wrote: > > > On Wed, 6 Jan 2021, Andreas Rheinhardt wrote: > > > lance.lmw...@gmail.com: > > > From: Limin Wang > > > > > > Signed-off-by: Limin Wang > > > --- > > > libavformat/mxfenc.c | 73 > > >

[FFmpeg-devel] [PATCH 2/2] avformat/nuv: Check channels

2021-01-06 Thread Michael Niedermayer
Fixes: signed integer overflow: -3468545475927866368 * 4 cannot be represented in type 'long' Fixes: 28879/clusterfuzz-testcase-minimized-ffmpeg_dem_NUV_fuzzer-6303367307591680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:

[FFmpeg-devel] [PATCH 1/2] avformat: Change avpriv_new_chapter() from O(n) to (1) in the common case

2021-01-06 Thread Michael Niedermayer
Fixes: timeout (slow -> 300ms) Fixes: 28876/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5664824587583488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/internal.h | 5 +

[FFmpeg-devel] [PATCH 4/5] avcodec/fft_template: Only check for FF_FFT_PERM_AVX on ARCH_X86

2021-01-06 Thread Andreas Rheinhardt
Also do it for FFT_FLOAT only, as this is the only combination for which it can be set. Signed-off-by: Andreas Rheinhardt --- libavcodec/fft_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/fft_template.c b/libavcodec/fft_template.c index

[FFmpeg-devel] [PATCH 3/5] avcodec/fft_fixed: Hardcode cosine tables to save space

2021-01-06 Thread Andreas Rheinhardt
The tables that are used take 256B; the code to initialize them uses 281B here (GCC 9.3, x64, -O3, but in av_cold functions). On top of that, removing this code also allows to remove the array of AVOnce used to guard the cosine tables against multiple initializations; this also removes

[FFmpeg-devel] [PATCH 2/5] avcodec/fft_template: Remove unused fixed-point cosine tables

2021-01-06 Thread Andreas Rheinhardt
There are three types of FFTs: floating-point, 32-bit fixed-point and 16-bit fixed-point. The latter has exactly one user: The fixed-point AC-3-encoder; the cosine tables used by it use up to seven bits. The tables corresponding to eight to seventeen bits are unused, as are the FFT functions for

[FFmpeg-devel] [PATCH 5/5] avcodec/fft_template: Perform some checks at compile-time

2021-01-06 Thread Andreas Rheinhardt
The fixed point FFT never uses the 32bit revtab; this commit adds some compile-time checks to make sure that dead code doesn't get compiled in. Also, while just at it, fix the indentation in ff_fft_init() and make sure that a do {} while (0) macro does not already swallow the semicolon on its

[FFmpeg-devel] [PATCH 1/5] avcodec/tableprint: Don't include mem_internal.h

2021-01-06 Thread Andreas Rheinhardt
tableprint.h does not declare anything as aligned; it just prints DECLARE_ALIGNED. So it can be removed; in fact, it needs to be removed, because mem_internal.h includes config.h which leads to warnings when building with hardcoded tables enabled because of redefinitions of

Re: [FFmpeg-devel] [PATCH] avformat/mov: adjust skip_samples according to seek timestamp

2021-01-06 Thread Matthieu Bouron
On Tue, Jan 05, 2021 at 09:56:39PM +0100, Marton Balint wrote: > > On Tue, 5 Jan 2021, Matthieu Bouron wrote: > > > > Could you factorize this to a function? It seems you are doing exactly the > > > same thing here and below. > > > > New patch attached. > > [...] > > > diff --git

Re: [FFmpeg-devel] [PATCH 1/5] avformat/udp: add memory alloc checks

2021-01-06 Thread Marton Balint
On Wed, 6 Jan 2021, lance.lmw...@gmail.com wrote: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/udp.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/udp.c b/libavformat/udp.c index 13c346a..d33e4d6 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@

Re: [FFmpeg-devel] [PATCH 07/27] cbs: Implement common parts of cbs-based bitstream filters separately

2021-01-06 Thread Mark Thompson
On 06/01/2021 20:01, Andreas Rheinhardt wrote: Mark Thompson: On 01/01/2021 22:18, Andreas Rheinhardt wrote: Mark Thompson: This allows removal of a lot of duplicated code between BSFs. ---   libavcodec/Makefile  |   2 +-   libavcodec/cbs_bsf.c | 161

Re: [FFmpeg-devel] [PATCH] Moves yuv2yuvX_sse3 to yasm, unrolls main loop and other small optimizations for ~20% speedup.

2021-01-06 Thread Michael Niedermayer
On Tue, Jan 05, 2021 at 01:31:25PM +0100, Alan Kelly wrote: > Ping! crashes (due to alignment i think) (gdb) disassemble $rip-32,$rip+32 Dump of assembler code from 0x555730a1 to 0x555730e1: 0x555730a1 : int$0x71 0x555730a3 : out%al,$0x3

Re: [FFmpeg-devel] [PATCH 07/27] cbs: Implement common parts of cbs-based bitstream filters separately

2021-01-06 Thread Andreas Rheinhardt
Mark Thompson: > On 01/01/2021 22:18, Andreas Rheinhardt wrote: >> Mark Thompson: >>> This allows removal of a lot of duplicated code between BSFs. >>> --- >>>   libavcodec/Makefile  |   2 +- >>>   libavcodec/cbs_bsf.c | 161 +++ >>>   libavcodec/cbs_bsf.h |

Re: [FFmpeg-devel] [PATCH 07/27] cbs: Implement common parts of cbs-based bitstream filters separately

2021-01-06 Thread Mark Thompson
On 01/01/2021 22:18, Andreas Rheinhardt wrote: Mark Thompson: This allows removal of a lot of duplicated code between BSFs. --- libavcodec/Makefile | 2 +- libavcodec/cbs_bsf.c | 161 +++ libavcodec/cbs_bsf.h | 100 +++ 3

Re: [FFmpeg-devel] [PATCH v2] Replace arrays of pointers to strings by arrays of strings

2021-01-06 Thread Mark Thompson
On 06/01/2021 09:34, Marton Balint wrote: On Wed, 6 Jan 2021, Andreas Rheinhardt wrote: When the difference of the longest size and the average size of collection of strings is smaller than the size of a pointer, it makes sense to store the strings directly in an array instead of using an array

Re: [FFmpeg-devel] [PATCH 03/27] cbs_h2645: Merge SEI message handling in common between codecs

2021-01-06 Thread Mark Thompson
On 04/01/2021 15:42, Nuo Mi wrote: On Sat, Jan 2, 2021 at 5:44 AM Mark Thompson wrote: --- libavcodec/Makefile | 4 +- libavcodec/cbs_h264.h | 50 +--- libavcodec/cbs_h2645.c| 300 +++--

Re: [FFmpeg-devel] [PATCH 01/27] cbs_h2645: Merge SEI messages in common between codecs

2021-01-06 Thread Mark Thompson
On 04/01/2021 14:32, Nuo Mi wrote: On Sat, Jan 2, 2021 at 5:45 AM Mark Thompson wrote: Make a new template file for common SEI messages - this will also apply to H.266. --- libavcodec/cbs_h264.h | 37 +-- libavcodec/cbs_h2645.c| 24 +++--

Re: [FFmpeg-devel] [PATCH] libavdevice/decklink_dec: mark get_bmd_timecode static

2021-01-06 Thread Christopher Degawa
I forgot to mark get_frame_timecode as static as well ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject

[FFmpeg-devel] [PATCH] libavdevice/decklink_dec: mark get_bmd_timecode static

2021-01-06 Thread Christopher Degawa
the function is not used anywhere else and is causing mingw-w64 clang builds to fail with ffmpeg-git/libavdevice/decklink_dec.cpp:792:5: error: no previous prototype for function 'get_bmd_timecode' [-Werror,-Wmissing-prototypes] int get_bmd_timecode(AVFormatContext *avctx, AVTimecode *tc,

Re: [FFmpeg-devel] [PATCH 2/5] avformat/mxfenc: simplify the code and use mode for OP1a/D10/OPAtom muxer

2021-01-06 Thread Marton Balint
On Wed, 6 Jan 2021, Andreas Rheinhardt wrote: lance.lmw...@gmail.com: From: Limin Wang Signed-off-by: Limin Wang --- libavformat/mxfenc.c | 73 ++-- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/libavformat/mxfenc.c

Re: [FFmpeg-devel] [PATCH v4] avcodec/libvpxenc: add a way to set VP9E_SET_SVC_REF_FRAME_CONFIG

2021-01-06 Thread Wonkap Jang
HI JAmes, On Tue, Dec 29, 2020 at 11:54 AM Wonkap Jang < wonkap-at-google@ffmpeg.org> wrote: > Hi James, > > On Tue, Dec 29, 2020 at 11:51 AM Wonkap Jang wrote: > > > In order to fine-control referencing schemes in VP9 encoding, there > > is a need to use VP9E_SET_SVC_REF_FRAME_CONFIG

Re: [FFmpeg-devel] [PATCH 2/5] avformat/mxfenc: simplify the code and use mode for OP1a/D10/OPAtom muxer

2021-01-06 Thread Andreas Rheinhardt
lance.lmw...@gmail.com: > From: Limin Wang > > Signed-off-by: Limin Wang > --- > libavformat/mxfenc.c | 73 > ++-- > 1 file changed, 42 insertions(+), 31 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index

[FFmpeg-devel] [PATCH 5/5] avformat/hlsenc: use AV_OPT_TYPE_DURATION

2021-01-06 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- doc/muxers.texi | 4 ++-- libavformat/hlsenc.c | 18 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index 8e12aca..044c16b 100644 --- a/doc/muxers.texi +++

[FFmpeg-devel] [PATCH 2/5] avformat/mxfenc: simplify the code and use mode for OP1a/D10/OPAtom muxer

2021-01-06 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/mxfenc.c | 73 ++-- 1 file changed, 42 insertions(+), 31 deletions(-) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index d8678c9..7fce7b9 100644 --- a/libavformat/mxfenc.c

[FFmpeg-devel] [PATCH 3/5] avformat/mxfenc: prefer to use the existing metadata

2021-01-06 Thread lance . lmwang
From: Limin Wang Please check metadata with below command: ./ffmpeg -i ../fate-suite/mxf/Sony-1.mxf -c:v copy -c:a copy out.mxf ./ffmpeg -i out.mxf company_name: FFmpeg product_name: OP1a Muxer product_version : 58.65.101o => company_name: SONY

[FFmpeg-devel] [PATCH 4/5] avformat/hlsenc: reindent the code

2021-01-06 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/hlsenc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/hlsenc.c b/libavformat/hlsenc.c index cafe0e8..7f38db7 100644 --- a/libavformat/hlsenc.c +++ b/libavformat/hlsenc.c @@ -3032,8 +3032,8 @@

[FFmpeg-devel] [PATCH 1/5] avformat/udp: add memory alloc checks

2021-01-06 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavformat/udp.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/udp.c b/libavformat/udp.c index 13c346a..d33e4d6 100644 --- a/libavformat/udp.c +++ b/libavformat/udp.c @@ -892,6 +892,10 @@ static int udp_open(URLContext *h,

Re: [FFmpeg-devel] [PATCH v2] Replace arrays of pointers to strings by arrays of strings

2021-01-06 Thread Marton Balint
On Wed, 6 Jan 2021, Andreas Rheinhardt wrote: When the difference of the longest size and the average size of collection of strings is smaller than the size of a pointer, it makes sense to store the strings directly in an array instead of using an array of pointers to strings (unless doing so

[FFmpeg-devel] [PATCH v2] Replace arrays of pointers to strings by arrays of strings

2021-01-06 Thread Andreas Rheinhardt
When the difference of the longest size and the average size of collection of strings is smaller than the size of a pointer, it makes sense to store the strings directly in an array instead of using an array of pointers to strings (unless doing so precludes deduplicating strings); doing so also