[FFmpeg-devel] [PATCH] lavc/qsvenc: allows the SDK runtime to choose LowPower/non-LowPower modes

2020-10-09 Thread Haihao Xiang
The SDK supports LowPower and non-LowPower modes, but some features are available only under one of the two modes. Currently non-LowPower mode is always chosen in FFmpeg if the mode is not set explicitly, which will result in some SDK errors if a feature is unavailable under non-LowPower mode. With

[FFmpeg-devel] [PATCH] lavf/mpeg: replace magic descriptor_tag values with defines

2020-10-09 Thread Brad Hards
This takes the used values from ISO/IEC 13818-1 Table 2-45 and adds them to the mpegts.h header. No functional changes. Signed-off-by: Brad Hards --- libavformat/mpegts.c| 16 libavformat/mpegts.h| 10 ++ libavformat/mpegtsenc.c | 6 +++--- 3 files changed, 21 i

Re: [FFmpeg-devel] [PATCH 1/6] qsv: add ${includedir}/mfx to the search path for old versions of libmfx

2020-10-09 Thread Xiang, Haihao
On Tue, 2020-09-29 at 16:21 +0100, Mark Thompson wrote: > On 16/09/2020 07:44, Haihao Xiang wrote: > > ${includedir}/mfx has been added to Cflags in libmfx.pc for the current > > libmfx. We may add ${includedir}/mfx to the search path for olda > > versions of libmfx so that we may include foo.h ins

[FFmpeg-devel] [PATCH 2/2] avcodec/sheervideo: Inline compile-time constants

2020-10-09 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/sheervideo.c | 343 1 file changed, 172 insertions(+), 171 deletions(-) diff --git a/libavcodec/sheervideo.c b/libavcodec/sheervideo.c index 3f9b299a1e..e1a203d361 100644 --- a/libavcodec/sheervideo.c +++ b

[FFmpeg-devel] [PATCH 1/2] avcodec/sheervideo: Improve creating VLC tables

2020-10-09 Thread Andreas Rheinhardt
Don't needlessly copy an array around; don't create a table with default symbols; and use smaller types to save stack space: The longest code here is 16 bits, so one can store the codes in this type. Signed-off-by: Andreas Rheinhardt --- libavcodec/sheervideo.c | 19 +++ 1 file c

Re: [FFmpeg-devel] [PATCH 0/6] qsv: Fix compiler errors when using libmfx 2.0 (oneVPL)

2020-10-09 Thread Xiang, Haihao
On Tue, 2020-09-29 at 16:09 +0100, Mark Thompson wrote: > On 16/09/2020 07:44, Haihao Xiang wrote: > > The oneAPI Video Processing Library (oneVPL) is a single interface for > > encode, decode and video processing, the obsolete features in Intel > > Media Software Development Kit are removed from o

[FFmpeg-devel] [PATCH 6/6] tools/target_dec_fuzzer: remove calls to avcodec_register*()

2020-10-09 Thread James Almer
They are no-ops. Signed-off-by: James Almer --- tools/target_dec_fuzzer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 7bea736fcf..39d4bb5647 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -118,17 +11

[FFmpeg-devel] [PATCH 5/6] tools/target_dem_fuzzer: switch to the iterate API

2020-10-09 Thread James Almer
Signed-off-by: James Almer --- tools/target_dem_fuzzer.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/target_dem_fuzzer.c b/tools/target_dem_fuzzer.c index eefb5c5fa3..10082993fe 100644 --- a/tools/target_dem_fuzzer.c +++ b/tools/target_dem_fuzzer.c @@ -105

[FFmpeg-devel] [PATCH 4/6] avformat/options: use the iterate API in format_child_class_next()

2020-10-09 Thread James Almer
Signed-off-by: James Almer --- libavformat/options.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/libavformat/options.c b/libavformat/options.c index 3160904fda..59e0389815 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -55,35 +5

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/mpeg12dec: Optimize reading mpeg2 intra escape codes

2020-10-09 Thread Andreas Rheinhardt
Michael Niedermayer: > On Thu, Oct 08, 2020 at 09:53:13PM +0200, Andreas Rheinhardt wrote: >> Said escape code is only six bits long, so that one has at least 25 - 6 >> bits in the bitstream reader's cache after reading it; therefore the >> whole following 18 bits (containing the actual code) are a

[FFmpeg-devel] [PATCH] Ticket #8750 Add inline function for the vec_xl intrinsic in non-VSX environments

2020-10-09 Thread Andriy Gelman
From: Chip Kerchner --- libswscale/ppc/yuv2rgb_altivec.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libswscale/ppc/yuv2rgb_altivec.c b/libswscale/ppc/yuv2rgb_altivec.c index 536545293d..930ef6b98f 100644 --- a/libswscale/ppc/yuv2rgb_altivec.c +++ b/libswscale/ppc/yuv2rgb_alt

[FFmpeg-devel] [PATCH 1/2] swscale/utils: split range override check into its own function

2020-10-09 Thread Jan Ekström
--- libswscale/utils.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/libswscale/utils.c b/libswscale/utils.c index 9ca378bd3b..832c9f873c 100644 --- a/libswscale/utils.c +++ b/libswscale/utils.c @@ -864,6 +864,11 @@ static void fill_xyztables(struct SwsContext *c)

[FFmpeg-devel] [PATCH 2/2] swscale/utils: override forced-zero formats back to full range

2020-10-09 Thread Jan Ekström
Fixes vf_scale outputting RGB AVFrames with limited range flagged in case either input or output specifically sets the range. This is the reverse of the logic utilized for RGB and PAL8 content in sws_setColorspaceDetails. --- libswscale/utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletio

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread James Almer
On 10/9/2020 7:43 PM, Andreas Rheinhardt wrote: > James Almer: >> Allocate it only when it's needed. >> >> Fixes: OOM >> Fixes: >> 23817/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-6300869057576960 >> >> Found-by: continuous fuzzing process >> https://github.com/google/oss-fuzz

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread James Almer
On 10/9/2020 7:41 PM, Andreas Rheinhardt wrote: > Andreas Rheinhardt: >> James Almer: >>> On 10/9/2020 1:36 PM, Michael Niedermayer wrote: On Thu, Oct 08, 2020 at 10:25:11AM -0300, James Almer wrote: > Allocate it only when needed, and instead of giving it a fixed initial > size >

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread Andreas Rheinhardt
Andreas Rheinhardt: > James Almer: >> On 10/9/2020 1:36 PM, Michael Niedermayer wrote: >>> On Thu, Oct 08, 2020 at 10:25:11AM -0300, James Almer wrote: Allocate it only when needed, and instead of giving it a fixed initial size that's doubled on each realloc, ensure it's always big enough

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread Andreas Rheinhardt
James Almer: > Allocate it only when it's needed. > > Fixes: OOM > Fixes: > 23817/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-6300869057576960 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: James Alme

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread James Almer
On 10/9/2020 6:16 PM, Andreas Rheinhardt wrote: > James Almer: >> On 10/9/2020 1:36 PM, Michael Niedermayer wrote: >>> On Thu, Oct 08, 2020 at 10:25:11AM -0300, James Almer wrote: Allocate it only when needed, and instead of giving it a fixed initial size that's doubled on each realloc, e

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/mpeg12: Don't pretend reading dct_dc_size_* VLCs can fail

2020-10-09 Thread Andreas Rheinhardt
Michael Niedermayer: > On Thu, Oct 08, 2020 at 09:53:12PM +0200, Andreas Rheinhardt wrote: >> It can't because the corresponding trees don't have any loose ends. >> >> Removing the checks also removed an instance of av_log(NULL (with a >> nonsense message) from the codebase. >> >> Signed-off-by: An

Re: [FFmpeg-devel] [PATCH 18/18] lavf: document some AVStream fields as private

2020-10-09 Thread James Almer
On 10/9/2020 6:57 PM, James Almer wrote: > On 10/9/2020 6:55 PM, Michael Niedermayer wrote: >> On Fri, Oct 09, 2020 at 03:04:30PM +0200, Anton Khirnov wrote: >>> Specifically: pts_wrap_bits, first_dts, cur_dts. >>> They are supposed to be private and are located in the private section >>> of AVStre

Re: [FFmpeg-devel] [PATCH v2] swscale: separate exported and internal range flags

2020-10-09 Thread Jan Ekström
On Fri, Oct 9, 2020 at 10:02 PM Michael Niedermayer wrote: > > On Wed, Oct 07, 2020 at 09:27:20PM +0300, Jan Ekström wrote: > > Fixes vf_scale outputting RGB AVFrames with limited range in > > case either input or output specifically sets the range. > > > > Keeps the external interfaces the same,

Re: [FFmpeg-devel] [PATCH 11/18] lavf: move AVStream.pts_buffer to AVStreamInternal

2020-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 03:04:23PM +0200, Anton Khirnov wrote: > Those are private fields, no reason to have them exposed in a public > header. > --- > libavformat/avformat.h | 3 +-- > libavformat/internal.h | 4 > libavformat/mux.c | 12 ++-- > libavformat/utils.c| 14 +++

Re: [FFmpeg-devel] [PATCH 18/18] lavf: document some AVStream fields as private

2020-10-09 Thread James Almer
On 10/9/2020 6:55 PM, Michael Niedermayer wrote: > On Fri, Oct 09, 2020 at 03:04:30PM +0200, Anton Khirnov wrote: >> Specifically: pts_wrap_bits, first_dts, cur_dts. >> They are supposed to be private and are located in the private section >> of AVStream, but ffmpeg.c currently accesses them regard

Re: [FFmpeg-devel] [PATCH 13/18] lavf: move AVStream.last_in_packet_buffer to AVStreamInternal

2020-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 03:04:25PM +0200, Anton Khirnov wrote: > Those are private fields, no reason to have them exposed in a public > header. > --- > libavformat/avformat.h | 6 +- > libavformat/internal.h | 5 + > libavformat/mux.c | 18 +- > libavformat/mxfenc.c

Re: [FFmpeg-devel] [PATCH 18/18] lavf: document some AVStream fields as private

2020-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 03:04:30PM +0200, Anton Khirnov wrote: > Specifically: pts_wrap_bits, first_dts, cur_dts. > They are supposed to be private and are located in the private section > of AVStream, but ffmpeg.c currently accesses them regardless. They > should be moved to AVStreamInternal once

[FFmpeg-devel] [PATCH] avformat/libsrt: fix cleanups on failed libsrt_open() and libsrt_setup()

2020-10-09 Thread Marton Balint
- Call srt_epoll_release() to avoid fd leak on libsrt_setup() error. - Call srt_cleanup() on libsrt_open() failure. - Fix return value and method on mode parsing failure. Based on a patch by Nicolas Sugino . Signed-off-by: Marton Balint --- libavformat/libsrt.c | 21 ++--- 1 fil

[FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread James Almer
Allocate it only when it's needed. Fixes: OOM Fixes: 23817/clusterfuzz-testcase-minimized-ffmpeg_BSF_H264_METADATA_fuzzer-6300869057576960 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: James Almer --- libavcodec/h2645_parse.

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/mpeg12: Don't pretend reading dct_dc_size_* VLCs can fail

2020-10-09 Thread Michael Niedermayer
On Thu, Oct 08, 2020 at 09:53:12PM +0200, Andreas Rheinhardt wrote: > It can't because the corresponding trees don't have any loose ends. > > Removing the checks also removed an instance of av_log(NULL (with a > nonsense message) from the codebase. > > Signed-off-by: Andreas Rheinhardt > --- >

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/mpeg12dec: Optimize reading mpeg2 intra escape codes

2020-10-09 Thread Michael Niedermayer
On Thu, Oct 08, 2020 at 09:53:13PM +0200, Andreas Rheinhardt wrote: > Said escape code is only six bits long, so that one has at least 25 - 6 > bits in the bitstream reader's cache after reading it; therefore the > whole following 18 bits (containing the actual code) are already in the > bitstream

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread Andreas Rheinhardt
James Almer: > On 10/9/2020 1:36 PM, Michael Niedermayer wrote: >> On Thu, Oct 08, 2020 at 10:25:11AM -0300, James Almer wrote: >>> Allocate it only when needed, and instead of giving it a fixed initial size >>> that's doubled on each realloc, ensure it's always big enough for the NAL >>> currently

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread James Almer
On 10/9/2020 1:36 PM, Michael Niedermayer wrote: > On Thu, Oct 08, 2020 at 10:25:11AM -0300, James Almer wrote: >> Allocate it only when needed, and instead of giving it a fixed initial size >> that's doubled on each realloc, ensure it's always big enough for the NAL >> currently being parsed. >> >

[FFmpeg-devel] [PATCH 3/3 v2] cmdutils: use the new device iteration API to list devices

2020-10-09 Thread James Almer
Signed-off-by: James Almer --- fftools/cmdutils.c | 32 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 88fdbeaf1e..ba25e5c884 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2302,7 +2302,8

[FFmpeg-devel] [PATCH] avfilter/vf_bwdif_cuda: CUDA implementation of bwdif

2020-10-09 Thread Philip Langdale
I've been sitting on this for a couple of years now, and I figured I should just send it out. This is what I believe is a conceptually correct port of bwdif to cuda (modulo edge handling which is not done in the same way because the conditional checks for edges are expensive in cuda, but that's the

Re: [FFmpeg-devel] [PATCH 3/3] cmdutils: use the new device iteration API to list devices

2020-10-09 Thread Andreas Rheinhardt
James Almer: > Signed-off-by: James Almer > --- > fftools/cmdutils.c | 28 ++-- > 1 file changed, 6 insertions(+), 22 deletions(-) > > diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c > index 88fdbeaf1e..83989b8190 100644 > --- a/fftools/cmdutils.c > +++ b/fftools/cmd

[FFmpeg-devel] [PATCH 2/3] avdevice: add new API for iterating input and output devices

2020-10-09 Thread James Almer
And deprecate the linked list based one. Based on a patch by Josh de Kock. Signed-off-by: James Almer --- doc/APIchanges | 5 + libavdevice/alldevices.c | 22 ++ libavdevice/avdevice.h | 36 libavdevice/version.h| 7

[FFmpeg-devel] [PATCH 3/3] cmdutils: use the new device iteration API to list devices

2020-10-09 Thread James Almer
Signed-off-by: James Almer --- fftools/cmdutils.c | 28 ++-- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 88fdbeaf1e..83989b8190 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -2302,7 +2302,8 @@ s

[FFmpeg-devel] [PATCH 1/3] avdevice/alldevices: stop using deprecated linked list API

2020-10-09 Thread James Almer
Signed-off-by: James Almer --- libavdevice/alldevices.c | 76 libavdevice/avdevice.c | 46 2 files changed, 76 insertions(+), 46 deletions(-) diff --git a/libavdevice/alldevices.c b/libavdevice/alldevices.c index a6f68dd3bb..413

Re: [FFmpeg-devel] [PATCH 9/9] avformat/aviobuf: increase default read buffer size to 2*max_buffer_size for streamed data

2020-10-09 Thread Marton Balint
On Thu, 8 Oct 2020, Marton Balint wrote: On Tue, 6 Oct 2020, Marton Balint wrote: On Wed, 30 Sep 2020, Paul B Mahol wrote: On Tue, Sep 29, 2020 at 11:10:21PM +0200, Marton Balint wrote: This should increase the effectiveness of ffio_ensure_seekback by reducing the number of buffer

Re: [FFmpeg-devel] [PATCH v2] swscale: separate exported and internal range flags

2020-10-09 Thread Michael Niedermayer
On Wed, Oct 07, 2020 at 09:27:20PM +0300, Jan Ekström wrote: > Fixes vf_scale outputting RGB AVFrames with limited range in > case either input or output specifically sets the range. > > Keeps the external interfaces the same, but allows us to retrieve > and set nonzero value for RGB. Additionally

Re: [FFmpeg-devel] [PATCH 14/18] lavf: move AVStream.{need_parsing, parser} to AVStreamInternal

2020-10-09 Thread Andreas Rheinhardt
Paul B Mahol: > On Fri, Oct 09, 2020 at 04:36:27PM +0200, Andreas Rheinhardt wrote: >> Anton Khirnov: >>> Those are private fields, no reason to have them exposed in a public >>> header. >>> --- >>> libavdevice/v4l2.c | 2 +- >> >> This is a problem: There is no requirement to update li

Re: [FFmpeg-devel] [PATCH 14/18] lavf: move AVStream.{need_parsing, parser} to AVStreamInternal

2020-10-09 Thread Paul B Mahol
On Fri, Oct 09, 2020 at 04:36:27PM +0200, Andreas Rheinhardt wrote: > Anton Khirnov: > > Those are private fields, no reason to have them exposed in a public > > header. > > --- > > libavdevice/v4l2.c | 2 +- > > This is a problem: There is no requirement to update libavdevice at the >

Re: [FFmpeg-devel] [PATCH 15/18] ffmpeg: stop using non-public AVStream fields

2020-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 03:04:27PM +0200, Anton Khirnov wrote: > This effectively reverts ae2cb9290ac and 52c5521877a. > --- > fftools/ffmpeg_opt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) breaks: ./ffmpeg -ss 2:16 -i ~/tickets/2687/Thailand-Wave.wmv last2sec-of-source.asf wi

Re: [FFmpeg-devel] [PATCH 4/7] lavfi/vf_spp: convert to the video_enc_params API

2020-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 08:13:24AM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2020-10-06 00:15:06) > > On Mon, Oct 05, 2020 at 10:26:24AM +0200, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2020-10-03 20:23:02) > > > > On Fri, Oct 02, 2020 at 08:03:28PM +0200, Anton Khirn

Re: [FFmpeg-devel] [PATCH v2] swscale: separate exported and internal range flags

2020-10-09 Thread Jan Ekström
On Wed, Oct 7, 2020 at 9:27 PM Jan Ekström wrote: > > Fixes vf_scale outputting RGB AVFrames with limited range in > case either input or output specifically sets the range. > > Keeps the external interfaces the same, but allows us to retrieve > and set nonzero value for RGB. Additionally defines

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

2020-10-09 Thread Michael Niedermayer
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-5378790047612928 > > > > Found-by: continuous fuzzing process > > https://github.c

Re: [FFmpeg-devel] [PATCH 3/3] avformat/flvdec: Check for EOF in amf_parse_object()

2020-10-09 Thread Michael Niedermayer
On Fri, Oct 09, 2020 at 10:37:20PM +0800, Steven Liu wrote: > > > > 在 2020年10月9日,03:19,Michael Niedermayer 写道: > > > > Fixes: Timeout (too long -> 1ms) > > Fixes: > > 26108/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5653887668977664 > > > > Found-by: continuous fuzzing process > >

Re: [FFmpeg-devel] [PATCH] avcodec/h2645_parse: remove initial skipped_bytes_pos buffer

2020-10-09 Thread Michael Niedermayer
On Thu, Oct 08, 2020 at 10:25:11AM -0300, James Almer wrote: > Allocate it only when needed, and instead of giving it a fixed initial size > that's doubled on each realloc, ensure it's always big enough for the NAL > currently being parsed. > > Fixes: OOM > Fixes: > 23817/clusterfuzz-testcase-min

Re: [FFmpeg-devel] [PATCH] libavcodec/adts_header: add frame_length field and avpriv function to parse AAC ADTS header

2020-10-09 Thread Nachiket Tarate
From: ffmpeg-devel on behalf of Andreas Rheinhardt Sent: Friday, October 9, 2020 8:11 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH] libavcodec/adts_header: add frame_length field and avpriv function to parse AAC ADTS header Nachiket Tara

Re: [FFmpeg-devel] [PATCH] libavcodec/adts_header: add frame_length field and avpriv function to parse AAC ADTS header

2020-10-09 Thread Andreas Rheinhardt
Nachiket Tarate: > @James Almer > > Kindly merge this patch if it looks fine. > Can we see the supposed applications first? - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscri

Re: [FFmpeg-devel] [PATCH] libavcodec/adts_header: add frame_length field and avpriv function to parse AAC ADTS header

2020-10-09 Thread Nachiket Tarate
@James Almer Kindly merge this patch if it looks fine. -- Thanks & Regards, Nachiket Tarate From: ffmpeg-devel on behalf of Nachiket Tarate Sent: Thursday, October 8, 2020 8:02 PM To: ffmpeg-devel@ffmpeg.org Subject: [FFmpeg-devel] [PATCH] libavcodec/adts_h

Re: [FFmpeg-devel] [PATCH 3/3] avformat/flvdec: Check for EOF in amf_parse_object()

2020-10-09 Thread Steven Liu
> 在 2020年10月9日,03:19,Michael Niedermayer 写道: > > Fixes: Timeout (too long -> 1ms) > Fixes: > 26108/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-5653887668977664 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by:

Re: [FFmpeg-devel] [PATCH 14/18] lavf: move AVStream.{need_parsing, parser} to AVStreamInternal

2020-10-09 Thread Andreas Rheinhardt
Anton Khirnov: > Those are private fields, no reason to have them exposed in a public > header. > --- > libavdevice/v4l2.c | 2 +- This is a problem: There is no requirement to update libavdevice at the same time as libavformat; one might use a newer version of libavformat together wit

[FFmpeg-devel] [PATCH 16/18] lavf: move AVStream.{probe_packets, codec_info_nb_frames} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 12 ++--- libavformat/dump.c | 3 ++- libavformat/internal.h | 10 +++ libavformat/mpegts.c | 2 +- libavformat/sbgdec.c |

[FFmpeg-devel] [PATCH 08/18] lavf: move AVStream.{request_probe, skip_to_keyframe} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/asfdec_f.c| 2 +- libavformat/avformat.h| 13 - libavformat/avidec.c | 2 +- libavformat/internal.h| 13 + libavformat/matroskadec.c | 8 libavformat/mp

[FFmpeg-devel] [PATCH 12/18] lavf: move AVStream.probe_data to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 2 +- libavformat/internal.h | 2 ++ libavformat/utils.c| 5 +++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index ef6d

[FFmpeg-devel] [PATCH 07/18] lavf: move AVStream.{*skip_samples.*_discard_sample} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 29 - libavformat/internal.h | 29 + libavformat/mov.c | 12 ++-- libavformat/mp3dec.c | 8 libavformat/swfdec.

[FFmpeg-devel] [PATCH 11/18] lavf: move AVStream.pts_buffer to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 3 +-- libavformat/internal.h | 4 libavformat/mux.c | 12 ++-- libavformat/utils.c| 14 +++--- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a

[FFmpeg-devel] [PATCH 01/18] lavf: move AVStream.info to AVStreamInternal

2020-10-09 Thread Anton Khirnov
This struct is for internal use of avformat_find_stream_info(), so it should not be exposed in public headers. Keep a stub pointer in its place to avoid changing AVStream layout, since e.g. ffmpeg.c accesses some fields located after it (even though they are marked as private). --- libavformat/avf

[FFmpeg-devel] [PATCH 14/18] lavf: move AVStream.{need_parsing, parser} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavdevice/v4l2.c | 2 +- libavformat/aacdec.c | 2 +- libavformat/aadec.c | 6 +- libavformat/acm.c| 2 +- libavformat/asfdec_f.c | 10 ++-- libavformat/av1dec.c

[FFmpeg-devel] [PATCH 10/18] lavf: move AVStream.*index_entries* to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. Since there are some (semi-)public fields located after these, even though this section is supposed to be private, keep some dummy padding there until the next major bump to preserve ABI compatibility. --- libavformat/ape

[FFmpeg-devel] [PATCH 15/18] ffmpeg: stop using non-public AVStream fields

2020-10-09 Thread Anton Khirnov
This effectively reverts ae2cb9290ac and 52c5521877a. --- fftools/ffmpeg_opt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 19f719e3ff..a5c92bf461 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -2215,7 +2

[FFmpeg-devel] [PATCH 18/18] lavf: document some AVStream fields as private

2020-10-09 Thread Anton Khirnov
Specifically: pts_wrap_bits, first_dts, cur_dts. They are supposed to be private and are located in the private section of AVStream, but ffmpeg.c currently accesses them regardless. They should be moved to AVStreamInternal once that bug is fixed. Remove the marker for the private AVStream section,

[FFmpeg-devel] [PATCH 13/18] lavf: move AVStream.last_in_packet_buffer to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 6 +- libavformat/internal.h | 5 + libavformat/mux.c | 18 +- libavformat/mxfenc.c | 10 +- 4 files changed, 20 insertions(+), 19 deletions(-) diff -

[FFmpeg-devel] [PATCH 09/18] lavf: move AVStream.interleaver_chunk_* to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 3 --- libavformat/internal.h | 3 +++ libavformat/mux.c | 16 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libavformat/avformat.h b/libavformat/avf

[FFmpeg-devel] [PATCH 02/18] lavf: move AVStream.{inject_global_side_data, display_aspect_ratio} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 12 libavformat/internal.h | 12 libavformat/mov.c | 4 ++-- libavformat/mxfdec.c | 2 +- libavformat/utils.c| 14 +++--- 5 files changed, 22 ins

[FFmpeg-devel] [PATCH 17/18] lavf: move AVStream.last_IP_* to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 4 ++-- libavformat/internal.h | 3 +++ libavformat/nutdec.c | 2 +- libavformat/utils.c| 20 ++-- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/lib

[FFmpeg-devel] [PATCH 03/18] lavf: move AVStream.{last_dts_for_order_check, dts_[mis]ordered} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 7 --- libavformat/internal.h | 7 +++ libavformat/utils.c| 28 ++-- 3 files changed, 21 insertions(+), 21 deletions(-) diff --git a/libavformat/avformat

[FFmpeg-devel] [PATCH 06/18] lavf: move AVStream.{nb_decoded_frames, mux_ts_offset} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 11 --- libavformat/internal.h | 11 +++ libavformat/mux.c | 6 +++--- libavformat/utils.c| 10 +- 4 files changed, 19 insertions(+), 19 deletions(-) diff --

[FFmpeg-devel] [PATCH 04/18] lavf: move AVStream.pts_reorder_error[_count] to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 6 -- libavformat/internal.h | 6 ++ libavformat/utils.c| 18 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libavformat/avformat.h b/libavfo

[FFmpeg-devel] [PATCH 05/18] lavf: move AVStream.{pts_wrap_*, update_initial_durations_done} to AVStreamInternal

2020-10-09 Thread Anton Khirnov
Those are private fields, no reason to have them exposed in a public header. --- libavformat/avformat.h | 22 -- libavformat/internal.h | 22 ++ libavformat/mpegts.c | 4 ++-- libavformat/utils.c| 38 +++--- 4 files cha

Re: [FFmpeg-devel] [PATCH] avcodec/dpxenc: stop hardcoding color trc/primaries

2020-10-09 Thread Paul B Mahol
On Fri, Oct 09, 2020 at 01:48:46PM +0100, Kieran O Leary wrote: > On Fri, Oct 9, 2020 at 12:10 PM Paul B Mahol wrote: > > > On Fri, Oct 09, 2020 at 10:08:45AM +0100, Kieran O Leary wrote: > > > Pinging as I think my comment got lost in the conversation, my main > > concern > > > is about the Prin

Re: [FFmpeg-devel] [PATCH] avcodec/dpxenc: stop hardcoding color trc/primaries

2020-10-09 Thread Kieran O Leary
On Fri, Oct 9, 2020 at 12:10 PM Paul B Mahol wrote: > On Fri, Oct 09, 2020 at 10:08:45AM +0100, Kieran O Leary wrote: > > Pinging as I think my comment got lost in the conversation, my main > concern > > is about the Printing Density value aka 1, > > This patch is for encoder, not for decoder (we

Re: [FFmpeg-devel] [PATCH] avcodec/dpxenc: stop hardcoding color trc/primaries

2020-10-09 Thread Paul B Mahol
On Fri, Oct 09, 2020 at 10:08:45AM +0100, Kieran O Leary wrote: > Pinging as I think my comment got lost in the conversation, my main concern > is about the Printing Density value aka 1, This patch is for encoder, not for decoder (well decoder also need fixing but later). The meaning of 1 value

Re: [FFmpeg-devel] [PATCH 4/4] avcodec/apedec: use ff_clz() instead of while loop

2020-10-09 Thread Paul B Mahol
On Thu, Oct 08, 2020 at 09:33:35PM +0200, Michael Niedermayer wrote: > On Wed, Oct 07, 2020 at 05:12:47PM +0200, Paul B Mahol wrote: > > On Wed, Oct 07, 2020 at 04:45:56PM +0200, Michael Niedermayer wrote: > > > On Tue, Oct 06, 2020 at 12:08:27PM +0200, Anton Khirnov wrote: > > > > Quoting Paul B M

Re: [FFmpeg-devel] [PATCH 1/3] avformat/mspdec: Microsoft Paint (MSP) demuxer

2020-10-09 Thread Moritz Barsnick
On Thu, Oct 08, 2020 at 22:02:02 +1100, Peter Ross wrote: > Week nine or so of lockdown... What, wait. I'm like week thirty or so. ;) > OBJS-$(CONFIG_MPJPEG_DEMUXER)+= mpjpegdec.o > OBJS-$(CONFIG_MPJPEG_MUXER) += mpjpeg.o > OBJS-$(CONFIG_MPL2_DEMUXER) += m

Re: [FFmpeg-devel] [PATCH] avcodec/dpxenc: stop hardcoding color trc/primaries

2020-10-09 Thread Kieran O Leary
Pinging as I think my comment got lost in the conversation, my main concern is about the Printing Density value aka 1, K On Thu, Oct 8, 2020 at 10:25 AM Kieran O Leary wrote: > Woah, more amazing film preservation patches, thank you! > From my uninformed reading of the code, does this only supp