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

2020-10-22 Thread Mohammad Izadi
Any comments? Thanks, Mohammad On Tue, Oct 13, 2020 at 4:53 PM Mohammad Izadi wrote: > From: Mohammad Izadi > > HDR10+ is dynamic metadata (A/341 Amendment - SMPTE2094-40) that needs to > be decoded from ITU-T T.35 in HEVC bitstream. The HDR10+ is transferred to > side data packet to be used

Re: [FFmpeg-devel] [PATCH v3] lavf/url: fix rel path’s query string contains :/

2020-10-22 Thread 蔡昊凝
于2020年10月17日周六 下午11:17写道: > From: "ruiquan.crq" > > Signed-off-by: ruiquan.crq > --- > libavformat/tests/url.c | 2 ++ > libavformat/url.c | 2 +- > tests/ref/fate/url | 8 > 3 files changed, 11 insertions(+), 1 deletion(-) > > diff --git a/libavformat/tests/url.c

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

2020-10-22 Thread Steven Liu
> 2020年10月23日 上午5:01,Nikola Pajkovsky 写道: > > init.mp4 can be expanded with strftime() the same way as > hls_segment_filename. > > Signed-off-by: Nikola Pajkovsky > --- > doc/muxers.texi | 7 ++ > libavformat/hlsenc.c | 52 ++-- > 2 files

[FFmpeg-devel] [PATCHv2 2/2] avformat/mspdec: Microsoft Paint (MSP) demuxer

2020-10-22 Thread Peter Ross
Signed-off-by: Peter Ross --- Changelog | 1 + doc/general_contents.texi | 2 + libavformat/Makefile | 1 + libavformat/allformats.c | 1 + libavformat/mspdec.c | 117 ++ 5 files changed, 122 insertions(+) create mode 100644

[FFmpeg-devel] [PATCHv2 1/2] avcodec/msp2dec: Microsoft Paint (MSP) version 2 decoder

2020-10-22 Thread Peter Ross
Signed-off-by: Peter Ross --- Changelog | 1 + libavcodec/Makefile | 1 + libavcodec/allcodecs.c | 1 + libavcodec/codec_desc.c | 7 +++ libavcodec/codec_id.h | 1 + libavcodec/msp2dec.c| 102 6 files changed, 113

Re: [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for opus

2020-10-22 Thread Michael Niedermayer
On Sun, Oct 04, 2020 at 09:41:42PM +0200, Michael Niedermayer wrote: > Fixes: Timeout (12sec -> 3sec) > Fixes: > 24549/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_LIBOPUS_fuzzer-6211170349088768 > > Found-by: continuous fuzzing process >

[FFmpeg-devel] [PATCH 2/5] avformat/cafdec: Check for EOF in index reading loop

2020-10-22 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavformat/cafdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index d0f942f3e4..cd6b550aad 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -202,6 +202,8 @@ static int

[FFmpeg-devel] [PATCH 3/5] avformat/cafdec: Check that bytes_per_packet and frames_per_packet are non negative

2020-10-22 Thread Michael Niedermayer
These fields are not signed in the spec (1.0) so they cannot be negative Changing bytes_per_packet to unsigned would not solve this as it is exported as block_align which is signed Fixes: Infinite loop Fixes: 26492/clusterfuzz-testcase-minimized-ffmpeg_dem_CAF_fuzzer-5632087614554112 Found-by:

[FFmpeg-devel] [PATCH 1/5] avformat/mpegts: Limit iterations of get_packet_size()

2020-10-22 Thread Michael Niedermayer
This is a pathological case where the fuzzer provides only 2 bytes per iteration. Fixes: Timeout (>30 -> 0.9sec) Fixes: 26488/clusterfuzz-testcase-minimized-ffmpeg_dem_MPEGTS_fuzzer-5911031077142528 Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 4/5] avformat/cafdec: Check the return code from av_add_index_entry()

2020-10-22 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavformat/cafdec.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavformat/cafdec.c b/libavformat/cafdec.c index 1e9c8c2b0b..5da37ab8dd 100644 --- a/libavformat/cafdec.c +++ b/libavformat/cafdec.c @@ -192,6 +192,7 @@ static int

[FFmpeg-devel] [PATCH 5/5] avcodec/hevc_cabac: Limit value in coeff_abs_level_remaining_decode() tighter

2020-10-22 Thread Michael Niedermayer
The max depth is 16bps, the max allowed coefficient depth is depth+6 Fixes: signed integer overflow: 1074266112 + 1073725439 cannot be represented in type 'int' Fixes: 26493/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5657763331702784 Found-by: continuous fuzzing process

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

2020-10-22 Thread Nikola Pajkovsky
init.mp4 can be expanded with strftime() the same way as hls_segment_filename. Signed-off-by: Nikola Pajkovsky --- doc/muxers.texi | 7 ++ libavformat/hlsenc.c | 52 ++-- 2 files changed, 48 insertions(+), 11 deletions(-) diff --git

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

2020-10-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/wmadec.c | 9 - 1 file changed, 9 deletions(-) diff --git a/libavcodec/wmadec.c b/libavcodec/wmadec.c index 07fd960f7f..8504d8d6c4 100644 --- a/libavcodec/wmadec.c +++ b/libavcodec/wmadec.c @@ -345,10 +345,6 @@ static int

[FFmpeg-devel] [PATCH] avcodec/wma: Remove unused array

2020-10-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/wma.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/libavcodec/wma.c b/libavcodec/wma.c index b4992095ec..cfa5fa3355 100644 --- a/libavcodec/wma.c +++ b/libavcodec/wma.c @@ -39,19 +39,17 @@ static av_cold int

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-22 Thread Michael Niedermayer
On Thu, Oct 22, 2020 at 09:43:53AM +0200, Alan Kelly wrote: > Other functions to be ported to avx2 have been identified and are on > the todo list. > --- > libswscale/x86/Makefile | 1 + > libswscale/x86/swscale.c| 72 +++-- > libswscale/x86/yuv2yuvX.asm | 105

Re: [FFmpeg-devel] [PATCH 6/9] avformat/vividas: Check for zero v_size

2020-10-22 Thread Andreas Rheinhardt
Michael Niedermayer: > On Thu, Oct 22, 2020 at 07:55:31AM +0200, Andreas Rheinhardt wrote: >> Michael Niedermayer: >>> Fixes: SEGV on unknown address 0x >>> Fixes: >>> 26482/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-4905102324006912 >>> >>> Found-by: continuous fuzzing

Re: [FFmpeg-devel] [PATCH 6/9] avformat/vividas: Check for zero v_size

2020-10-22 Thread Michael Niedermayer
On Thu, Oct 22, 2020 at 07:55:31AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: SEGV on unknown address 0x > > Fixes: > > 26482/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-4905102324006912 > > > > Found-by: continuous fuzzing process > >

Re: [FFmpeg-devel] [PATCH 1/9] avformat/segafilm: Check that there is a stream

2020-10-22 Thread Michael Niedermayer
On Thu, Oct 22, 2020 at 07:20:49AM +0200, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: assertion failure > > Fixes: > > 26472/clusterfuzz-testcase-minimized-ffmpeg_dem_SEGAFILM_fuzzer-5759751591559168 > > > > Found-by: continuous fuzzing process > >

[FFmpeg-devel] [PATCH v2 3/3] fftools/ffmpeg: fix the wrong bitrate and speed stats

2020-10-22 Thread lance . lmwang
From: Limin Wang The bitrate and speed stats are wrong If the copyts is enabled. Please test with below command: wget http://samples.mplayerhq.hu/MPEG2/foxksaz.ts ./ffmpeg -y -copyts -i ./foxksaz.ts -c:v libx264 -x264opts \ nal-hrd=cbr:force-cfr=1 -b:v 3500k -minrate 3500k -maxrate 3500k

[FFmpeg-devel] [PATCH v2 2/3] avformat/mpegtsenc: make first_pcr sync with the first valid dts

2020-10-22 Thread lance . lmwang
From: Limin Wang now first_pts assume dts will start from zero, if it's not true(copyts is enable), too many null packet will be inserted for cbr output. Please test with below command, you'll get huge test.ts without the patch: ./ffmpeg -y -copyts -i ../fate-suite/mpegts/loewe.ts -c:v

[FFmpeg-devel] [PATCH v2 1/3] avformat/mpegtsenc: use total_size instead of avio_tell()

2020-10-22 Thread lance . lmwang
From: Limin Wang avio_tell() fails to get the amount of data written so far when the underlying IO context is flushed to segments. Please test with below command: $ ./ffmpeg -f lavfi -i testsrc=duration=100:size=vga -c:v libx264 -x264opts \ nal-hrd=cbr:force-cfr=1 -b:v 500k -minrate 500k

[FFmpeg-devel] [PATCH 2/3] avcodec/webp: Return directly when creating Huff table fails

2020-10-22 Thread Andreas Rheinhardt
Neither the auxiliary VLC table nor the code_lengths array need to be freed if creating the auxiliary VLC table fails. Signed-off-by: Andreas Rheinhardt --- libavcodec/webp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index

[FFmpeg-devel] [PATCH 3/3] avcodec/webp: Replace never-true check by assert

2020-10-22 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/webp.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libavcodec/webp.c b/libavcodec/webp.c index 549d125dcc..6de6a5c036 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -329,8 +329,7 @@ static int

[FFmpeg-devel] [PATCH 1/3] avcodec/webp: Use uint8_t for code lengths

2020-10-22 Thread Andreas Rheinhardt
They are always in the range 0..15, so using an int is not necessary. Furthermore, using an int would not work if sizeof(int) == 4 as ff_init_vlc_sparse() can only handle uint8_t, uint16_t and uint32_t lengths. Signed-off-by: Andreas Rheinhardt --- libavcodec/webp.c | 8 1 file

Re: [FFmpeg-devel] [PATCH] avdevice/gdigrab: Memory leak if BitBlt return false.

2020-10-22 Thread Andreas Rheinhardt
dont.b...@gmail.com: > From: walle > > lock screen or other permission notification in win7 or > higher windows version would case BitBlt return false, > and gdigrab_read_packet will return AVERROR(EIO) and do nothing to > allocated packet data, then memory leak happend. It's necessary to >

[FFmpeg-devel] [PATCH] avdevice/gdigrab: Memory leak if BitBlt return false.

2020-10-22 Thread dont . buck
From: walle lock screen or other permission notification in win7 or higher windows version would case BitBlt return false, and gdigrab_read_packet will return AVERROR(EIO) and do nothing to allocated packet data, then memory leak happend. It's necessary to release packet data before return from

Re: [FFmpeg-devel] [PATCH v4] Unbreak av_malloc_max(0) API/ABI

2020-10-22 Thread Joakim Tjernlund
Ping ? Jocke On Fri, 2020-10-16 at 10:57 +0200, Joakim Tjernlund wrote: > From https://bugs.chromium.org/p/chromium/issues/detail?id=1095962 > > This seems to be caused by the custom handling of "av_max_alloc(0)" in > Chromium's ffmpeg fork to mean unlimited (added

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-22 Thread Jean-Baptiste Kempf
Do we have checkasm for those functions? On Thu, 22 Oct 2020, at 09:43, Alan Kelly wrote: > Other functions to be ported to avx2 have been identified and are on > the todo list. > --- > libswscale/x86/Makefile | 1 + > libswscale/x86/swscale.c| 72 +++-- >

Re: [FFmpeg-devel] [RFC] support half-precision float in *_cuda filters

2020-10-22 Thread Timo Rothenpieler
On 22.10.2020 05:43, leozhang wrote: Half precision float is supported for those devices sm capacity =5.3. Theoretically, half float can achieve 2x performance speed up. So is there any plan to support half float in FFmpeg? Or any problem so that half float can't be met up? I'm not aware of

[FFmpeg-devel] [PATCH 2/2] avcodec/rv34: Simplify getting right VLC

2020-10-22 Thread Andreas Rheinhardt
For both RealVideo 3.0 as well as RealVideo 4.0 the VLC table to use depends upon the slice's quantization parameter; these are coded on five bits in the bitstream and are therefore in the range of 0..31; yet the last element here is not valid and therefore the quantizer is clipped to the range

[FFmpeg-devel] [PATCH 1/2] avcodec/rv34: Don't needlessly copy VLC length and symbol arrays

2020-10-22 Thread Andreas Rheinhardt
Most of the VLCs used by RealVideo 3 and 4 obey three simple rules: Shorter codes are on the left of the tree, for each length, the symbols are ascending from left to right and the symbols either form a permutation of 1..size or 0..(size - 1). For the latter case, one just needs to store the

[FFmpeg-devel] [PATCH] tests/fate/hevc: Add test for 3fbf8737923ac49754946a2505367630544b87f1

2020-10-22 Thread Michael Niedermayer
Tested-on: x86-32/64/ARM/MIPS Linux, Mingw/WINE 32/64 Signed-off-by: Michael Niedermayer --- tests/fate/hevc.mak| 3 +++ tests/ref/fate/hevc-small422chroma | 6 ++ 2 files changed, 9 insertions(+) create mode 100644 tests/ref/fate/hevc-small422chroma diff --git

Re: [FFmpeg-devel] [PATCH v2] libavformat/hls: use local var url for log to avoid crash

2020-10-22 Thread Steven Liu
> 2020年10月19日 上午10:07,javashu2...@gmail.com 写道: > > From: bevis > > During operation, the user exits and interrupts, causing pls->segment to be > released, resulting in a null pointer crash > > Signed-off-by: bevis > --- > libavformat/hls.c | 5 +++-- > 1 file changed, 3 insertions(+), 2

Re: [FFmpeg-devel] [PATCH v1] libavformat/hls: During operation, the user exits and interrupts, causing pls->segment to be released, resulting in a null pointer crash

2020-10-22 Thread 徐慧书
Steven Liu 于2020年10月21日周三 下午6:57写道: > > > > 2020年10月21日 下午5:16,徐慧书 写道: > > > > Steven Liu 于2020年10月17日周六 下午4:57写道: > > > >> > >> > >>> 在 2020年10月17日,13:38,徐慧书 写道: > >>> > >>> Andreas Rheinhardt 于2020年10月16日周五 > >> 下午9:32写道: > >>> > javashu2...@gmail.com: > > From: bevis > > >

[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 speed-up

2020-10-22 Thread Alan Kelly
Other functions to be ported to avx2 have been identified and are on the todo list. --- libswscale/x86/Makefile | 1 + libswscale/x86/swscale.c| 72 +++-- libswscale/x86/yuv2yuvX.asm | 105 3 files changed, 112 insertions(+), 66