Re: [FFmpeg-devel] [PATCH] avcodec/adpcm_ima_cunning: document origin of tables

2020-10-24 Thread Zane van Iperen
On 24/10/20 3:50 pm, Zane van Iperen wrote: > > Signed-off-by: Zane van Iperen > --- > libavcodec/adpcm_data.c | 12 > 1 file changed, 12 insertions(+) > Will apply soon. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://

Re: [FFmpeg-devel] [PATCH 1/4] avformat/alp: fix handling of TUN files

2020-10-24 Thread Zane van Iperen
On 23/10/20 11:44 pm, Zane van Iperen wrote: > > Sample rate is always 22050. Verified by trying various files in the game. > > Signed-off-by: Zane van Iperen > --- > libavformat/alp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Will apply soon. ___

Re: [FFmpeg-devel] [PATCH 2/8] avformat/electronicarts: Check for EOF in each iteration of the loop in ea_read_packet()

2020-10-24 Thread Peter Ross
On Sun, Oct 25, 2020 at 12:23:06AM +0200, Michael Niedermayer wrote: > Fixes: timeout(>20sec -> 1ms) > Fixes: > 26526/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-567232806912 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > S

[FFmpeg-devel] [PATCH 8/8] avcodec/exr: skip bottom clearing loop when its outside the image

2020-10-24 Thread Michael Niedermayer
Fixes: signed integer overflow: 1633771809 * 32960 cannot be represented in type 'int' Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Mi

[FFmpeg-devel] [PATCH 6/8] avformat/avs: Use 64bit for the avio_tell() output

2020-10-24 Thread Michael Niedermayer
Fixes: signed integer overflow: 9223372036854775807 - -1 cannot be represented in type 'long' Fixes: 26549/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4844306424397824 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Mic

[FFmpeg-devel] [PATCH 4/8] avformat/paf: Check for EOF in read_table()

2020-10-24 Thread Michael Niedermayer
Fixes: OOM Fixes: 26528/clusterfuzz-testcase-minimized-ffmpeg_dem_PAF_fuzzer-5081929248145408 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/paf.c | 20 +++- 1 file changed,

[FFmpeg-devel] [PATCH 5/8] tools/target_dem_fuzzer: Consider it an EIO when reading position wraps around 64bit

2020-10-24 Thread Michael Niedermayer
Fixes: signed integer overflow: 9223372036854775807 + 564 cannot be represented in type 'long' Fixes: 26494/clusterfuzz-testcase-minimized-ffmpeg_dem_VOC_fuzzer-576754158849228 Fixes: 26549/clusterfuzz-testcase-minimized-ffmpeg_dem_AVS_fuzzer-4844306424397824 Found-by: continuous fuzzing proces

[FFmpeg-devel] [PATCH 1/8] tools/target_dem_fuzzer: Limit max blocks

2020-10-24 Thread Michael Niedermayer
With a IO block size of 1 byte potentially megabytes are quite slow to read, thus limit the number Fixes: 26511/clusterfuzz-testcase-minimized-ffmpeg_dem_NUV_fuzzer-5679249073373184 Fixes: 26517/clusterfuzz-testcase-minimized-ffmpeg_dem_XMV_fuzzer-6316634501021696 Fixes: 26518/clusterfuzz-test

[FFmpeg-devel] [PATCH 3/8] avformat/moflex: Check pkt_size

2020-10-24 Thread Michael Niedermayer
Fixes: Timeout (>20sec -> 1ms) Fixes: 26527/clusterfuzz-testcase-minimized-ffmpeg_dem_MOFLEX_fuzzer-6308307310215168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/moflex.c | 2 ++ 1 file ch

[FFmpeg-devel] [PATCH 7/8] avcodec/exr: Check ymin vs. h

2020-10-24 Thread Michael Niedermayer
Fixes: out of array access Fixes: 26532/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_EXR_fuzzer-5613925708857344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/exr.c | 2 +- 1 file chang

[FFmpeg-devel] [PATCH 2/8] avformat/electronicarts: Check for EOF in each iteration of the loop in ea_read_packet()

2020-10-24 Thread Michael Niedermayer
Fixes: timeout(>20sec -> 1ms) Fixes: 26526/clusterfuzz-testcase-minimized-ffmpeg_dem_EA_fuzzer-567232806912 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/electronicarts.c | 2 ++ 1 file

Re: [FFmpeg-devel] [PATCH 4/4] avformat/mvi: Check count for overflow

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 05:59:55PM +0200, Michael Niedermayer wrote: > Fixes: left shift of 21378748 by 10 places cannot be represented in type 'int' > Fixes: > 26449/clusterfuzz-testcase-minimized-ffmpeg_dem_MVI_fuzzer-5680463374712832 > > Found-by: continuous fuzzing process > https://github.c

Re: [FFmpeg-devel] [PATCH 1/4] avformat/genh: Check block_align

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 05:59:52PM +0200, Michael Niedermayer wrote: > Fixes: infinite loop > Fixes: > 26440/clusterfuzz-testcase-minimized-ffmpeg_dem_GENH_fuzzer-5632134020333568 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-o

Re: [FFmpeg-devel] [PATCH 3/4] avformat/jacosubdec: Use 64bit inside get_shift()

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 05:59:54PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 1 * 30 cannot be represented in type > 'int' > Fixes: > 26448/clusterfuzz-testcase-minimized-ffmpeg_dem_JACOSUB_fuzzer-5638440374501376 > > Found-by: continuous fuzzing process > https

Re: [FFmpeg-devel] [PATCH 7/7] avformat/nistspheredec: Check bps

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 04:25:01PM +0200, Michael Niedermayer wrote: > Fixes: left shift of 90 by 3 places cannot be represented in type > 'int' > Fixes: > 26437/clusterfuzz-testcase-minimized-ffmpeg_dem_NISTSPHERE_fuzzer-4886896091856896 > > Found-by: continuous fuzzing process > https

Re: [FFmpeg-devel] [PATCH 3/7] avutil/common: Implement av_sat_add64_c() with fewer branches

2020-10-24 Thread Michael Niedermayer
On Wed, Oct 21, 2020 at 12:56:55PM +0200, Michael Niedermayer wrote: > On Wed, Oct 21, 2020 at 12:17:41PM +0200, Andreas Rheinhardt wrote: > > Michael Niedermayer: > > > No benchmark because this is not used in any speed relevant pathes nor is > > > it > > > used where __builtin_add_overflow is av

Re: [FFmpeg-devel] [PATCH 2/7] avcodec/vp9dsp_template: Fix some overflows in iadst8_1d()

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 04:24:56PM +0200, Michael Niedermayer wrote: > Fixes: signed integer overflow: 190587 * 11585 cannot be represented in type > 'int' > Fixes: > 26407/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP9_fuzzer-5086348408782848 > > Found-by: continuous fuzzing process > h

Re: [FFmpeg-devel] [PATCH 1/7] avcodec/fits: Check bscale

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 04:24:55PM +0200, Michael Niedermayer wrote: > Fixes: division by 0 > Fixes: > 26208/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FITS_fuzzer-6270472117026816 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg >

Re: [FFmpeg-devel] [PATCH 6/7] avformat/ifv: Check that total frames do not overflow

2020-10-24 Thread Michael Niedermayer
On Mon, Oct 19, 2020 at 04:25:00PM +0200, Michael Niedermayer wrote: > Fixes: Infinite loop > Fixes: > 26392/clusterfuzz-testcase-minimized-ffmpeg_dem_GIF_fuzzer-5713658237419520 > Fixes: > 26435/clusterfuzz-testcase-minimized-ffmpeg_dem_SUBVIEWER_fuzzer-6548251853193216 > > Found-by: continuous

Re: [FFmpeg-devel] [PATCH v2] expand hls_fmp4_init_filename with strftime()

2020-10-24 Thread Andreas Rheinhardt
Steven Liu: > Nikola Pajkovsky 于2020年10月23日周五 下午2:21写道: >> >> init.mp4 can be expanded with strftime() the same way as >> hls_segment_filename. >> >> Signed-off-by: Nikola Pajkovsky >> --- >> v2: fix memleak on strftime failure >> >> doc/muxers.texi | 7 ++ >> libavformat/hlsenc.c | 5

Re: [FFmpeg-devel] [PATCH v2] expand hls_fmp4_init_filename with strftime()

2020-10-24 Thread Steven Liu
Nikola Pajkovsky 于2020年10月23日周五 下午2:21写道: > > init.mp4 can be expanded with strftime() the same way as > hls_segment_filename. > > Signed-off-by: Nikola Pajkovsky > --- > v2: fix memleak on strftime failure > > doc/muxers.texi | 7 ++ > libavformat/hlsenc.c | 54 ++

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/pgxdec: Check depth more completely

2020-10-24 Thread Andreas Rheinhardt
Michael Niedermayer: > On Fri, Oct 09, 2020 at 06:52:18PM +0200, Michael Niedermayer wrote: >> On Thu, Oct 08, 2020 at 09:48:41PM +0200, Andreas Rheinhardt wrote: >>> Michael Niedermayer: Fixes: shift exponent -1 is negative Fixes: 26107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODE

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/pgxdec: Check depth more completely

2020-10-24 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 06:52:18PM +0200, Michael Niedermayer wrote: > On Thu, Oct 08, 2020 at 09:48:41PM +0200, Andreas Rheinhardt wrote: > > Michael Niedermayer: > > > Fixes: shift exponent -1 is negative > > > Fixes: > > > 26107/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGX_fuzzer-53787

Re: [FFmpeg-devel] [PATCH] avformat/utils: check for integer overflow in av_get_frame_filename2()

2020-10-24 Thread Michael Niedermayer
On Sun, Aug 16, 2020 at 06:18:02PM +0200, Paul B Mahol wrote: > On 8/16/20, Michael Niedermayer wrote: > > On Sun, Aug 16, 2020 at 05:38:29PM +0200, Paul B Mahol wrote: > >> On 8/16/20, Michael Niedermayer wrote: > >> > Fixes: signed integer overflow: 317316873 * 10 cannot be represented in > >>

[FFmpeg-devel] [PATCH] avcodec/clearvideo: Don't check for errors for complete VLC

2020-10-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/clearvideo.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavcodec/clearvideo.c b/libavcodec/clearvideo.c index 65bf140401..73c0367f71 100644 --- a/libavcodec/clearvideo.c +++ b/libavcodec/clearvideo.c @@ -88,8 +88,6 @@ static inline int

Re: [FFmpeg-devel] [PATCH] Support HDR10+ metadata for HEVC.

2020-10-24 Thread Harry Mallon
> On 23 Oct 2020, at 05:57, Mohammad Izadi > wrote: > > Any comments? > > Thanks, > Mohammad > > > On Tue, Oct 13, 2020 at 4:53 PM Mohammad Izadi wrote: > >> From: Mohammad Izadi >> >> [..] Hi Mohammad, Your change is in Patchwork here https://patchwork.ffmpeg.org/project/ffmpeg/patc

[FFmpeg-devel] [PATCH 1/2] avcodec/bitstream: Check code length before truncating to uint8_t

2020-10-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- The main motivation for this patch is actually the second patch and not the improved check. libavcodec/bitstream.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c index 77c2b9ce

[FFmpeg-devel] [PATCH 2/2] avcodec/bitstream: Stop allocating one VLCcode more than needed

2020-10-24 Thread Andreas Rheinhardt
Allocating one temporary entry more than needed was made necessary by the COPY loop below writing an element before having checked that it should be written at all. But given that this behaviour changed, the need for overallocating is gone. Signed-off-by: Andreas Rheinhardt --- libavcodec/bitstr

Re: [FFmpeg-devel] [PATCH 2/4] avcodec/imc: Inline constants

2020-10-24 Thread Michael Niedermayer
On Fri, Oct 23, 2020 at 10:54:52PM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/imc.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything s

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/mpeg4videodec: Use smallest max_depth in get_vlc2()

2020-10-24 Thread Michael Niedermayer
On Fri, Oct 23, 2020 at 10:54:53PM +0200, Andreas Rheinhardt wrote: > The longest code here is 12 bits long and can be read in two attempts. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mpeg4videodec.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) probably ok thx [..

Re: [FFmpeg-devel] [PATCH 2/5] avcodec/mobiclip: Don't check for errors for complete VLCs

2020-10-24 Thread Michael Niedermayer
On Sat, Oct 24, 2020 at 01:04:57PM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mobiclip.c | 26 +- > 1 file changed, 5 insertions(+), 21 deletions(-) probably ok [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/mobiclip: Reduce size of VLCs, inline constants

2020-10-24 Thread Michael Niedermayer
On Sat, Oct 24, 2020 at 01:04:56PM +0200, Andreas Rheinhardt wrote: > The longest motion vector VLC for mobiclip is six bits long, so using > eight bits for the VLC table is wasteful. Furthermore, the length can be > inlined. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mobiclip.c |

Re: [FFmpeg-devel] [PATCH 3/5] avcodec/mobiclip: Don't use too big max_depth, inline constants

2020-10-24 Thread Michael Niedermayer
On Sat, Oct 24, 2020 at 01:04:58PM +0200, Andreas Rheinhardt wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mobiclip.c | 7 --- > 1 file changed, 4 insertions(+), 3 deletions(-) probably ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/mobiclip: Use smaller type for codes

2020-10-24 Thread Michael Niedermayer
On Sat, Oct 24, 2020 at 01:05:00PM +0200, Andreas Rheinhardt wrote: > Even though the length of these codes is > 8, only the lowest seven bits > are ever set (because the long codes are on the left of the tree), so > one can use an uint8_t for them, saving space. > > Signed-off-by: Andreas Rheinha

Re: [FFmpeg-devel] [PATCH] Moves yuv2yuvX_sse3 to yasm, unrolls main loop and other small optimizations for ~20% speedup. AVX2 version is ready and tested, although local tests show a significant spee

2020-10-24 Thread Michael Niedermayer
On Fri, Oct 23, 2020 at 03:34:18PM +0200, Alan Kelly wrote: > Fixed. The wrong step size was used causing a write passed the end of > the buffer. yuv2yuvX_mmxext is now called if there are any remaining > pixels. > > There is currently no checkasm for these functions. Is this required for > sub

Re: [FFmpeg-devel] [PATCH 1/8] avcodec/magicyuv: Check slice size before reading flags and pred

2020-10-24 Thread Michael Niedermayer
On Fri, Oct 23, 2020 at 08:54:33PM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: heap-buffer-overflow > > Fixes: > > 26487/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MAGICYUV_fuzzer-5742553675333632 > > > > Found-by: continuous fuzzing process > > https://github.com/g

Re: [FFmpeg-devel] [PATCH] avformat/dhav: also support ZLAV packets

2020-10-24 Thread Zhao Zhili
Hi Michael, > On Oct 24, 2020, at 8:32 AM, Michael Keeley wrote: > > Some DVRs (e.g. D7008FH made by Zhuhai Ltd) output the same format .dav file, > but use ZLAV/zlav tags to delimit the packets instead of DHAV/dhav. Zhuhai Ltd doesn't look like the real company name. I didn't find much inform

[FFmpeg-devel] [PATCH 2/5] avcodec/mobiclip: Don't check for errors for complete VLCs

2020-10-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 26 +- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index 8d37243d87..d209a53b07 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@

[FFmpeg-devel] [PATCH 5/5] avcodec/mobiclip: Use smaller type for codes

2020-10-24 Thread Andreas Rheinhardt
Even though the length of these codes is > 8, only the lowest seven bits are ever set (because the long codes are on the left of the tree), so one can use an uint8_t for them, saving space. Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 2 +- 1 file changed, 1 insertion(+), 1 dele

[FFmpeg-devel] [PATCH 3/5] avcodec/mobiclip: Don't use too big max_depth, inline constants

2020-10-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index d209a53b07..ab4baac099 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -31,6 +31,7 @@ #incl

[FFmpeg-devel] [PATCH 4/5] avcodec/mobiclip: Use static VLC tables

2020-10-24 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 71 ++- 1 file changed, 29 insertions(+), 42 deletions(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index ab4baac099..4e74033498 100644 --- a/libavcodec/mobiclip.c +++ b/libavco

[FFmpeg-devel] [PATCH 1/5] avcodec/mobiclip: Reduce size of VLCs, inline constants

2020-10-24 Thread Andreas Rheinhardt
The longest motion vector VLC for mobiclip is six bits long, so using eight bits for the VLC table is wasteful. Furthermore, the length can be inlined. Signed-off-by: Andreas Rheinhardt --- libavcodec/mobiclip.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libav

Re: [FFmpeg-devel] [PATCH] avformat/dhav: also support ZLAV packets

2020-10-24 Thread Paul B Mahol
LGTM On Sat, Oct 24, 2020 at 2:32 AM Michael Keeley wrote: > Some DVRs (e.g. D7008FH made by Zhuhai Ltd) output the same format .dav > file, > but use ZLAV/zlav tags to delimit the packets instead of DHAV/dhav. > > Signed-off-by: Michael Keeley > --- > Changelog | 1 + > libavform