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

2020-11-14 Thread Mohammad Izadi
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 or passed through. The fate test file can be found here:

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

2020-11-14 Thread Mohammad Izadi
Thank you Ian for your great detailed comments. Thanks, Mohammad On Wed, Nov 11, 2020 at 5:10 PM Jan Ekström wrote: > On 14.10.2020 2:53, Mohammad Izadi wrote: > > From: Mohammad Izadi > > > > HDR10+ is dynamic metadata (A/341 Amendment - SMPTE2094-40) that needs > to be decoded from ITU-T

Re: [FFmpeg-devel] [PATCH 100/114] avcodec/vp3: Use symbols table for VP3 motion vectors

2020-11-14 Thread Andreas Rheinhardt
Peter Ross: > On Tue, Nov 10, 2020 at 11:58:22AM +0100, Andreas Rheinhardt wrote: >> Expressions like array[get_vlc2()] can be optimized by using a symbols >> table if the array is always the same for a given VLC. This requirement >> is fulfilled for the VLC used for VP3 motion vectors. The reason

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/mobiclip: Use get_ue_golomb_31() where possible

2020-11-14 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mobiclip.c | 8 > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c > index 9fa88e84a0..42d33cf6a5 100644 > --- a/libavcodec/mobiclip.c > +++

Re: [FFmpeg-devel] [PATCH 001/114] avcodec/bitstream: Add second function to create VLCs

2020-11-14 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2020-11-12 21:51:28) >> Derek Buitenhuis: >>> On 10/11/2020 10:46, Andreas Rheinhardt wrote: +#define INIT_VLC_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, \ + symbols,

Re: [FFmpeg-devel] [PATCH 1/4] avformat/asfdec_o: Don't segfault with lots of attached pics

2020-11-14 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The ASF file format has a limit of 127 streams and the "asf_o" demuxer > (the ASF demuxer from Libav) has an array of pointers for a structure > called ASFStream that is allocated on demand for every stream. Attached > pictures are not streams in the sense of the ASF

Re: [FFmpeg-devel] [PATCH 001/114] avcodec/bitstream: Add second function to create VLCs

2020-11-14 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2020-11-10 11:46:58) >> +int ff_init_vlc_from_lengths(VLC *vlc_arg, int nb_bits, int nb_codes, >> + const int8_t *lens, int lens_wrap, >> + const void *symbols, int symbols_wrap, int >>

Re: [FFmpeg-devel] [PATCH v2] avcodec/hevcdec: fix stat_coeff save/load for persistent_rice_adaptation_enabled_flag

2020-11-14 Thread Guangxin Xu
Hi Christophe, Thanks for the test. You are right, It's a wpp decode issue. Please help review it again. I have test it with make fate-hevc THREADS=12 THREAD_TYPE=slice make fate-hevc THREADS=12 make fate-hevc-conformance-WPP_HIGH_TP_444_8BIT_RExt_Apple_2 THREADS=12 THREAD_TYPE=slice thanks On

[FFmpeg-devel] [PATCH v2] fate/hevc-conformance: add clip for persistent_rice_adaptation_enabled_flag

2020-11-14 Thread Xu Guangxin
you can download it from: https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/RExt/WPP_HIGH_TP_444_8BIT_RExt_Apple_2.zip Signed-off-by: Xu Guangxin --- tests/fate/hevc.mak | 1 +

[FFmpeg-devel] [PATCH v2] fate/hevc-conformance: add clip for persistent_rice_adaptation_enabled_flag

2020-11-14 Thread Xu Guangxin
you can download it from: https://www.itu.int/wftp3/av-arch/jctvc-site/bitstream_exchange/draft_conformance/RExt/WPP_HIGH_TP_444_8BIT_RExt_Apple_2.zip Signed-off-by: Xu Guangxin --- tests/fate/hevc.mak | 1 +

[FFmpeg-devel] [PATCH v2] avcodec/hevcdec: fix stat_coeff save/load for persistent_rice_adaptation_enabled_flag

2020-11-14 Thread Xu Guangxin
It's required by the 9.3.1 TableStatCoeff* section. Following clips have this feature: WPP_HIGH_TP_444_8BIT_RExt_Apple_2.bit Bitdepth_A_RExt_Sony_1.bin Bitdepth_B_RExt_Sony_1.bin EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_10BIT_RExt_Sony_1.bit EXTPREC_HIGHTHROUGHPUT_444_16_INTRA_12BIT_RExt_Sony_1.bit

[FFmpeg-devel] [PATCH 1/3] tools/target_dec_fuzzer: Call avcodec_flush_buffers() in a fuzzer choosen pattern

2020-11-14 Thread James Almer
From: Michael Niedermayer This should increase coverage Signed-off-by: Michael Niedermayer Signed-off-by: James Almer --- tools/target_dec_fuzzer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 4eb59bd296..11530cbf79

[FFmpeg-devel] [PATCH 3/3] tools/target_bsf_fuzzer: set bitstream filter options

2020-11-14 Thread James Almer
Should increase coverage with some bitstream filters Signed-off-by: James Almer --- tools/target_bsf_fuzzer.c | 12 1 file changed, 12 insertions(+) diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c index da8d62dd0b..16300037ca 100644 ---

[FFmpeg-devel] [PATCH 2/3] tools/target_bsf_fuzzer: Call av_bsf_flush() in a fuzzer choosen pattern

2020-11-14 Thread James Almer
This should increase coverage. Based on a commit by Michael Niedermayer Signed-off-by: James Almer --- tools/target_bsf_fuzzer.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tools/target_bsf_fuzzer.c b/tools/target_bsf_fuzzer.c index 5d9f90075d..da8d62dd0b 100644 ---

Re: [FFmpeg-devel] [PATCH v2] configure: fix the bigendian test

2020-11-14 Thread David Michael
On Sat, Nov 14, 2020 at 8:21 PM David Michael wrote: > On Sat, Nov 14, 2020 at 6:57 PM Carl Eugen Hoyos wrote: > > Am Sa., 14. Nov. 2020 um 20:16 Uhr schrieb David Michael > > : > > > On Sat, Nov 14, 2020 at 2:06 PM Carl Eugen Hoyos > > > wrote: > > > > Am Sa., 14. Nov. 2020 um 18:22 Uhr

Re: [FFmpeg-devel] [PATCH v2] configure: fix the bigendian test

2020-11-14 Thread David Michael
On Sat, Nov 14, 2020 at 6:57 PM Carl Eugen Hoyos wrote: > Am Sa., 14. Nov. 2020 um 20:16 Uhr schrieb David Michael > : > > On Sat, Nov 14, 2020 at 2:06 PM Carl Eugen Hoyos wrote: > > > Am Sa., 14. Nov. 2020 um 18:22 Uhr schrieb David Michael > > > : > > > > > > > > There are two issues: > > >

Re: [FFmpeg-devel] [PATCH] avformat/dv: fix timestamps of audio packets in case of dropped corrupt audio frames

2020-11-14 Thread Marton Balint
On Fri, 6 Nov 2020, Michael Niedermayer wrote: On Wed, Nov 04, 2020 at 10:44:56PM +0100, Marton Balint wrote: On Wed, 4 Nov 2020, Michael Niedermayer wrote: we have "millisecond" based formats, rounded timestamps we have "exact" cases, maybe the timebase being 1 packet/frame per tick we

Re: [FFmpeg-devel] [PATCH v2] configure: fix the bigendian test

2020-11-14 Thread Carl Eugen Hoyos
Am Sa., 14. Nov. 2020 um 20:16 Uhr schrieb David Michael : > > On Sat, Nov 14, 2020 at 2:06 PM Carl Eugen Hoyos wrote: > > Am Sa., 14. Nov. 2020 um 18:22 Uhr schrieb David Michael > > : > > > > > > There are two issues: > > > > > > When build systems enable LTO in CFLAGS, the unused global

[FFmpeg-devel] [PATCH] avformat/mpegts: make sure mpegts_read_header always stops at the first pmt

2020-11-14 Thread Marton Balint
mpegts_read_header stops parsing the file at the first PMT. However the check that ensured this was wrong because streams can also be added before the first PMT is received (e.g. EIT). So let's make sure we are in the header reading phase by checking if ts->pkt is unset instead of checking if the

[FFmpeg-devel] [PATCH 4/4] avcodec/mobiclip: Check mv against INT_MAX

2020-11-14 Thread Michael Niedermayer
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 27369/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5083469356728320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:

[FFmpeg-devel] [PATCH 3/4] avformat/wavdec: More complete size check in find_guid()

2020-11-14 Thread Michael Niedermayer
Fixes: signed integer overflow: 9223372036854775807 + 8 cannot be represented in type 'long' Fixes: 27341/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5442833206738944 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by:

[FFmpeg-devel] [PATCH 2/4] avcodec/mv30: Use unsigned in idct_1d()

2020-11-14 Thread Michael Niedermayer
Fixes: signed integer overflow: 2110302399 + 39074947 cannot be represented in type 'int' Fixes: 27330/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MV30_fuzzer-5664923153334272 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg

[FFmpeg-devel] [PATCH 1/4] avformat/iff: Check size before skip

2020-11-14 Thread Michael Niedermayer
Fixes: Infinite loop Fixes: 27292/clusterfuzz-testcase-minimized-ffmpeg_dem_IFF_fuzzer-5731168991051776 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/iff.c | 3 +++ 1 file changed, 3

[FFmpeg-devel] [PATCH] tools/target_dem_fuzzer: use avio_context_free() to free the fuzzer's AVIOContext

2020-11-14 Thread James Almer
The doxy for avio_alloc_context() states it must be used for this. Signed-off-by: James Almer --- tools/target_dem_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c index e4f41765d6..e5c41eea01 100644 ---

Re: [FFmpeg-devel] [PATCH v2] configure: fix the bigendian test

2020-11-14 Thread David Michael
On Sat, Nov 14, 2020 at 2:06 PM Carl Eugen Hoyos wrote: > Am Sa., 14. Nov. 2020 um 18:22 Uhr schrieb David Michael > : > > > > There are two issues: > > > > When build systems enable LTO in CFLAGS, the unused global integer > > does not make it into the compiled object file. As a workaround, >

Re: [FFmpeg-devel] [PATCH v2] configure: fix the bigendian test

2020-11-14 Thread Carl Eugen Hoyos
Am Sa., 14. Nov. 2020 um 18:22 Uhr schrieb David Michael : > > There are two issues: > > When build systems enable LTO in CFLAGS, the unused global integer > does not make it into the compiled object file. As a workaround, > check if the compiler understands -fno-lto and append it after > CFLAGS

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

2020-11-14 Thread Mark Thompson
On 14/11/2020 17:32, Timo Rothenpieler wrote: On 14.11.2020 16:08, James Almer wrote: On 11/14/2020 12:01 PM, Timo Rothenpieler wrote: I still strongly dislike this whole thing. The same logic is ran essentially twice. While it's applying the same method it is not doing the same thing,

Re: [FFmpeg-devel] [PATCH v2 2/3] libavcodec: add a new AV_CODEC_EXPORT_DATA_FILM_GRAIN flag and option

2020-11-14 Thread Lynne
Nov 14, 2020, 11:23 by an...@khirnov.net: > Quoting Lynne (2020-11-12 18:42:22) > >> This introduces a new field to allow decoders to export their film grain >> parameters. >> Will be used by the next patch. >> >> Patch attached. >> From d5d5e1e5f90938ac5cfa462efc13658ab411246b Mon Sep 17

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

2020-11-14 Thread James Almer
On 11/14/2020 2:32 PM, Timo Rothenpieler wrote: On 14.11.2020 16:08, James Almer wrote: On 11/14/2020 12:01 PM, Timo Rothenpieler wrote: I still strongly dislike this whole thing. The same logic is ran essentially twice. But I also really don't like putting all this stuff into the hwaccel.

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

2020-11-14 Thread Timo Rothenpieler
On 14.11.2020 16:08, James Almer wrote: On 11/14/2020 12:01 PM, Timo Rothenpieler wrote: I still strongly dislike this whole thing. The same logic is ran essentially twice. But I also really don't like putting all this stuff into the hwaccel. That's way more logic than a hwaccel integration

[FFmpeg-devel] [PATCH v2] configure: fix the bigendian test

2020-11-14 Thread David Michael
There are two issues: When build systems enable LTO in CFLAGS, the unused global integer does not make it into the compiled object file. As a workaround, check if the compiler understands -fno-lto and append it after CFLAGS while building the endianness test. The hexdump output is line-wrapped,

Re: [FFmpeg-devel] [PATCH v7 1/8] libavcodec/qsv: enabling d3d11va support, added mfxhdlpair

2020-11-14 Thread Max Dmitrichenko
On Tue, Nov 3, 2020 at 7:47 PM Artem Galin wrote: > Adding DX11 relevant device type checks and adjusting callbacks with > proper MediaSDK pair type support. > > Extending structure for proper MediaSDK pair type support. > > Signed-off-by: Artem Galin > . Patchset obviously closes the gap

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

2020-11-14 Thread James Almer
On 11/14/2020 12:01 PM, Timo Rothenpieler wrote: I still strongly dislike this whole thing. The same logic is ran essentially twice. But I also really don't like putting all this stuff into the hwaccel. That's way more logic than a hwaccel integration should have to do. Atm, only nvdec cares

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

2020-11-14 Thread Timo Rothenpieler
I still strongly dislike this whole thing. The same logic is ran essentially twice. But I also really don't like putting all this stuff into the hwaccel. That's way more logic than a hwaccel integration should have to do. ___ ffmpeg-devel mailing list

[FFmpeg-devel] [PATCH v2] avdevice/decklink_dec: map the raw_format instead of

2020-11-14 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavdevice/decklink_common.h | 9 + libavdevice/decklink_dec.cpp | 3 ++- libavdevice/decklink_dec_c.c | 12 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/libavdevice/decklink_common.h

[FFmpeg-devel] [PATCH v2] avdevice/decklink_dec: map the raw_format instead of hardcode

2020-11-14 Thread lance . lmwang
From: Limin Wang Signed-off-by: Limin Wang --- libavdevice/decklink_common.h | 9 + libavdevice/decklink_dec.cpp | 3 ++- libavdevice/decklink_dec_c.c | 12 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/libavdevice/decklink_common.h

[FFmpeg-devel] [PATCH 1/2] avcodec/av1dec: derive coded_lossless only where it's used

2020-11-14 Thread James Almer
No hwaccel other than nvdec cares about this field Signed-off-by: James Almer --- libavcodec/av1dec.c| 33 - libavcodec/av1dec.h| 2 -- libavcodec/nvdec_av1.c | 29 - 3 files changed, 28 insertions(+), 36 deletions(-) diff

[FFmpeg-devel] [PATCH 2/2] avcodec/av1dec: derive skip_mode_frame_idx only where it's used

2020-11-14 Thread James Almer
No hwaccel other than nvdec cares about this field Signed-off-by: James Almer --- libavcodec/av1dec.c| 78 -- libavcodec/av1dec.h| 2 -- libavcodec/nvdec_av1.c | 72 +++--- 3 files changed, 68 insertions(+), 84

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

2020-11-14 Thread Zane van Iperen
On 8/11/20 7:41 pm, Michael Keeley wrote: Some DVRs (e.g. D7008FH made by iSmart Cities (Zhuhai) Limited) 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 +

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

2020-11-14 Thread Michael Keeley
Ping :-) > -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of Michael Keeley > Sent: Sunday, 8 November 2020 10:42 pm > To: ffmpeg-devel@ffmpeg.org > Cc: Michael Keeley > Subject: [FFmpeg-devel] [PATCH v2] avformat/dhav: also support ZLAV >

[FFmpeg-devel] [PATCH 2/2] avformat/rmdec: Check for EOF in index packet reading

2020-11-14 Thread Michael Niedermayer
Fixes: Timeout(>10sec -> 1ms) Fixes: 27284/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-630420985728 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/rmdec.c | 2 ++ 1 file

[FFmpeg-devel] [PATCH 1/2] avcodec/cbs_h265_syntax_template: Better check for num_long_term_sps

2020-11-14 Thread Michael Niedermayer
Fixes: index 26 out of bounds for type 'uint8_t [16]' Fixes: 24913/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-6261760693370880 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer ---

Re: [FFmpeg-devel] [PATCH v2 2/3] libavcodec: add a new AV_CODEC_EXPORT_DATA_FILM_GRAIN flag and option

2020-11-14 Thread Anton Khirnov
Quoting Lynne (2020-11-12 18:42:22) > This introduces a new field to allow decoders to export their film grain > parameters. > Will be used by the next patch. > > Patch attached. > From d5d5e1e5f90938ac5cfa462efc13658ab411246b Mon Sep 17 00:00:00 2001 > From: Lynne > Date: Thu, 12 Nov 2020

Re: [FFmpeg-devel] [PATCH 6/7] avcodec/utils: USe 64bit in get_audio_frame_duration() for ADPCM_DTK

2020-11-14 Thread Anton Khirnov
Quoting Michael Niedermayer (2020-11-04 01:06:48) > Fixes: signed integer overflow: 131203586 * 28 cannot be represented in type > 'int' > Fixes: > 26817/clusterfuzz-testcase-minimized-ffmpeg_dem_MSF_fuzzer-6296902548848640 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 5/7] avformat/wavdec: Avoid zeroing written to array

2020-11-14 Thread Anton Khirnov
Quoting Michael Niedermayer (2020-11-10 00:04:54) > Fixes: OOM > Fixes: > 26934/clusterfuzz-testcase-minimized-ffmpeg_dem_W64_fuzzer-5996784213819392 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer >

Re: [FFmpeg-devel] [PATCH 001/114] avcodec/bitstream: Add second function to create VLCs

2020-11-14 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2020-11-10 11:46:58) > +int ff_init_vlc_from_lengths(VLC *vlc_arg, int nb_bits, int nb_codes, > + const int8_t *lens, int lens_wrap, > + const void *symbols, int symbols_wrap, int > symbols_size, > +

Re: [FFmpeg-devel] [PATCH 001/114] avcodec/bitstream: Add second function to create VLCs

2020-11-14 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2020-11-12 21:51:28) > Derek Buitenhuis: > > On 10/11/2020 10:46, Andreas Rheinhardt wrote: > >> > >> +#define INIT_VLC_STATIC_FROM_LENGTHS(vlc, bits, nb_codes, lens, len_wrap, > >> \ > >> + symbols, symbols_wrap, symbols_size, >

Re: [FFmpeg-devel] [PATCH 100/114] avcodec/vp3: Use symbols table for VP3 motion vectors

2020-11-14 Thread Peter Ross
On Tue, Nov 10, 2020 at 11:58:22AM +0100, Andreas Rheinhardt wrote: > Expressions like array[get_vlc2()] can be optimized by using a symbols > table if the array is always the same for a given VLC. This requirement > is fulfilled for the VLC used for VP3 motion vectors. The reason it > hasn't been