[FFmpeg-devel] [PATCH v2] avformat/mov: discard data streams with all zero sample_delta

2022-07-06 Thread Zhao Zhili
From: Zhao Zhili Streams with all zero sample_delta in 'stts' have all zero dts. They have higher chance be chose by mov_find_next_sample(), which leads to seek again and again. For example, GoPro created a 'GoPro SOS' stream: Stream #0:4[0x5](eng): Data: none (fdsc / 0x63736466), 13 kb/s (def

[FFmpeg-devel] [PATCH v3] avformat/mov: discard data streams with all zero sample_delta

2022-07-06 Thread Zhao Zhili
From: Zhao Zhili Streams with all zero sample_delta in 'stts' have all zero dts. They have higher chance be chose by mov_find_next_sample(), which leads to seek again and again. For example, GoPro created a 'GoPro SOS' stream: Stream #0:4[0x5](eng): Data: none (fdsc / 0x63736466), 13 kb/s (def

Re: [FFmpeg-devel] [PATCH 14/18] avcodec/hevcdec: Don't allocate redundant HEVCContexts

2022-07-06 Thread Andreas Rheinhardt
Michael Niedermayer: > On Sat, Jul 02, 2022 at 08:32:06AM +0200, Andreas Rheinhardt wrote: >> Michael Niedermayer: >>> On Fri, Jul 01, 2022 at 12:29:45AM +0200, Andreas Rheinhardt wrote: The HEVC decoder has both HEVCContext and HEVCLocalContext structures. The latter is supposed to be th

[FFmpeg-devel] [PATCH] libavcodec/qsvenc: Use parameter from AVCodecContext to reset qsv codec

2022-07-06 Thread Wenbin Chen
Using parameter from AVCodecContext to reset qsv codec is more suitable for MFXVideoENCODE_Reset()'s usage. Per-frame metadata is more suitable for the usage of mfxEncodeCtrl being passed to MFXVideoENCODE_EncodeFrameAsync(). Now change it to use the value from AVCodecContext. Signed-off-by: Wenbi

Re: [FFmpeg-devel] [PATCH 1/8] avutil/mem: Handle fast allocations near UINT_MAX properly

2022-07-06 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2022-07-05 22:09:37) > av_fast_realloc and av_fast_mallocz? store the size of > the objects they allocate in an unsigned. Yet they overallocate > and currently they can allocate more than UINT_MAX bytes > in case a user has requested a size of about UINT_MAX * 16 / 17 >

Re: [FFmpeg-devel] [PATCH 1/8] avutil/mem: Handle fast allocations near UINT_MAX properly

2022-07-06 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2022-07-05 22:09:37) >> av_fast_realloc and av_fast_mallocz? store the size of >> the objects they allocate in an unsigned. Yet they overallocate >> and currently they can allocate more than UINT_MAX bytes >> in case a user has requested a size of about

Re: [FFmpeg-devel] [PATCH 1/8] avutil/mem: Handle fast allocations near UINT_MAX properly

2022-07-06 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2022-07-06 15:08:05) > Anton Khirnov: > > Quoting Andreas Rheinhardt (2022-07-05 22:09:37) > >> av_fast_realloc and av_fast_mallocz? store the size of > >> the objects they allocate in an unsigned. Yet they overallocate > >> and currently they can allocate more than UINT

Re: [FFmpeg-devel] [PATCH v2 3/6] avcodec: add API for automatic handling of icc profiles

2022-07-06 Thread Anton Khirnov
Quoting Niklas Haas (2022-06-29 12:12:48) > From: Niklas Haas > > This functionally already exists, but as pointed out in #9672 and #9673, > requiring users to manually include filters is clumsy, error-prone and > hard to use together with tools like ffplay. > > To streamline ICC profile support

Re: [FFmpeg-devel] [PATCH v2 6/6] avcodec/encode:: generate ICC profiles

2022-07-06 Thread Anton Khirnov
Quoting Niklas Haas (2022-06-29 12:12:51) > From: Niklas Haas > > Only if requested, and only if the codec signals support for ICC > profiles. Implementation roughly matches the functionality of the > existing vf_iccgen filter, albeit with some reduced flexibility and no > caching. > > Ideally,

Re: [FFmpeg-devel] Patch to libavc/opus to create extradata if missing

2022-07-06 Thread Tristan Matthews
Hi, On Sun, Jan 3, 2021 at 8:09 PM Andreas Rheinhardt < andreas.rheinha...@gmail.com> wrote: > Jonathan Baudanza: > > On Sun, Jan 3, 2021, at 3:34 PM, Andreas Rheinhardt wrote: > >> Lynne: > >>> > >>> Apart from that LGTM. > >> > >> +1 if the case of more than two channels has been properly teste

Re: [FFmpeg-devel] Patch to libavc/opus to create extradata if missing

2022-07-06 Thread Tristan Matthews
On Wed, Jul 6, 2022 at 10:10 AM Tristan Matthews wrote: > Hi, > > On Sun, Jan 3, 2021 at 8:09 PM Andreas Rheinhardt < > andreas.rheinha...@gmail.com> wrote: > >> Jonathan Baudanza: >> > On Sun, Jan 3, 2021, at 3:34 PM, Andreas Rheinhardt wrote: >> >> Lynne: >> >>> >> >>> Apart from that LGTM. >>

Re: [FFmpeg-devel] [PATCH v2 1/6] fflcms2: move to libavcodec

2022-07-06 Thread Andreas Rheinhardt
Niklas Haas: > From: Niklas Haas > > We will need this helper inside libavcodec in the future, so move it > there, leaving behind an #include to the raw source file in its old > location in libvfilter. This approach is inspired by the handling of > vulkan.c, and avoids us needing to expose any of

Re: [FFmpeg-devel] [PATCH 1/8] avutil/mem: Handle fast allocations near UINT_MAX properly

2022-07-06 Thread Tomas Härdin
tis 2022-07-05 klockan 22:09 +0200 skrev Andreas Rheinhardt: > av_fast_realloc and av_fast_mallocz? store the size of > the objects they allocate in an unsigned. Yet they overallocate > and currently they can allocate more than UINT_MAX bytes > in case a user has requested a size of about UINT_MAX

Re: [FFmpeg-devel] [PATCH 1/8] avutil/mem: Handle fast allocations near UINT_MAX properly

2022-07-06 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-07-05 klockan 22:09 +0200 skrev Andreas Rheinhardt: >> av_fast_realloc and av_fast_mallocz? store the size of >> the objects they allocate in an unsigned. Yet they overallocate >> and currently they can allocate more than UINT_MAX bytes >> in case a user has requested a siz

Re: [FFmpeg-devel] [PATCH 3/8] avutil/mem: Add av_fast_realloc_array()

2022-07-06 Thread Tomas Härdin
tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > From: Andreas Rheinhardt > > This is an array-equivalent of av_fast_realloc(). Its advantages > compared to using av_fast_realloc() for allocating arrays are as > follows: > > a) It performs its own overflow checks for the multiplica

Re: [FFmpeg-devel] [PATCH 3/8] avutil/mem: Add av_fast_realloc_array()

2022-07-06 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: >> From: Andreas Rheinhardt >> >> This is an array-equivalent of av_fast_realloc(). Its advantages >> compared to using av_fast_realloc() for allocating arrays are as >> follows: >> >> a) It performs its own overflow chec

Re: [FFmpeg-devel] [PATCH 3/8] avutil/mem: Add av_fast_realloc_array()

2022-07-06 Thread Tomas Härdin
ons 2022-07-06 klockan 16:46 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > > > From: Andreas Rheinhardt > > > > > > This is an array-equivalent of av_fast_realloc(). Its advantages > > > compared to using av_fast_realloc() for a

Re: [FFmpeg-devel] [PATCH 4/8] avformat/flvenc: Use array instead of linked list for index

2022-07-06 Thread Tomas Härdin
tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > Using a linked list had very much overhead (the pointer to the next > entry increased the size of the index entry struct from 16 to 24 > bytes, > not to mention the overhead of having separate allocations), so it is > better to (re)allo

Re: [FFmpeg-devel] [PATCH 5/8] avformat/matroskaenc: Use av_fast_realloc_array for index entries

2022-07-06 Thread Tomas Härdin
tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > > -    entries = av_realloc_array(entries, cues->num_entries + 1, > sizeof(mkv_cuepoint)); > -    if (!entries) > -    return AVERROR(ENOMEM); > -    cues->entries = entries; > +    ret = av_fast_realloc_array(&cues->entries, &cues

Re: [FFmpeg-devel] [PATCH 4/8] avformat/flvenc: Use array instead of linked list for index

2022-07-06 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: >> Using a linked list had very much overhead (the pointer to the next >> entry increased the size of the index entry struct from 16 to 24 >> bytes, >> not to mention the overhead of having separate allocations), so it is

Re: [FFmpeg-devel] [PATCH 6/8] avcodec/movtextenc: Use av_fast_realloc_array

2022-07-06 Thread Tomas Härdin
tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > > -    if (s->count + 1 > FFMIN(SIZE_MAX / sizeof(*s- > >style_attributes), UINT16_MAX) || > -    !(tmp = av_fast_realloc(s->style_attributes, > -    &s- > >style_attributes_bytes_allocated,

Re: [FFmpeg-devel] [PATCH 5/8] avformat/matroskaenc: Use av_fast_realloc_array for index entries

2022-07-06 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: >> >> -    entries = av_realloc_array(entries, cues->num_entries + 1, >> sizeof(mkv_cuepoint)); >> -    if (!entries) >> -    return AVERROR(ENOMEM); >> -    cues->entries = entries; >> +    ret = av_fast_realloc_array

Re: [FFmpeg-devel] [PATCH 5/8] avformat/matroskaenc: Use av_fast_realloc_array for index entries

2022-07-06 Thread Tomas Härdin
ons 2022-07-06 klockan 17:10 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2022-07-05 klockan 22:26 +0200 skrev Andreas Rheinhardt: > > > > > > -    entries = av_realloc_array(entries, cues->num_entries + 1, > > > sizeof(mkv_cuepoint)); > > > -    if (!entries) > > > -    return AVER

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/smacker: Optimize constant 16bit audio output

2022-07-06 Thread Michael Niedermayer
On Wed, May 04, 2022 at 11:39:54AM +0200, Tomas Härdin wrote: > tis 2022-05-03 klockan 18:30 +0200 skrev Michael Niedermayer: > > > > +    } else if (stereo) { > > +    val  = 256*values[1] + values[0]; > > +    val2 = 256*values[3] + values[2]; > > +    for(; i < unp_s

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/smacker: Optimize constant 16bit audio output

2022-07-06 Thread Paul B Mahol
lgtm ___ 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 "unsubscribe".

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/smacker: Optimize constant 16bit audio output

2022-07-06 Thread Tomas Härdin
ons 2022-07-06 klockan 19:11 +0200 skrev Michael Niedermayer: > On Wed, May 04, 2022 at 11:39:54AM +0200, Tomas Härdin wrote: > > tis 2022-05-03 klockan 18:30 +0200 skrev Michael Niedermayer: > > > > > > +    } else if (stereo) { > > > +    val  = 256*values[1] + values[0]; > > > +

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread Paul B Mahol
Added parser. The test will be added after this is merged. From 3558348c59e22ead8978fdaaa98e0bca361c772f Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 3 Jul 2022 23:50:05 +0200 Subject: [PATCH] avcodec: add Radiance HDR image format support Signed-off-by: Paul B Mahol --- doc/general_c

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread James Almer
On 7/6/2022 3:47 PM, Paul B Mahol wrote: Added parser. The test will be added after this is merged. [...] diff --git a/libavformat/img2.c b/libavformat/img2.c index 870d2ebbc5..b03075f3b0 100644 --- a/libavformat/img2.c +++ b/libavformat/img2.c @@ -91,6 +91,7 @@ const IdStrMap ff_img_tags[] =

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread James Almer
On 7/6/2022 3:47 PM, Paul B Mahol wrote: Added parser. The test will be added after this is merged. [...] +static int hdr_parse(AVCodecParserContext *s, AVCodecContext *avctx, + const uint8_t **poutbuf, int *poutbuf_size, + const uint8_t *buf, int buf_s

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread Andreas Rheinhardt
James Almer: > On 7/6/2022 3:47 PM, Paul B Mahol wrote: >> Added parser. >> The test will be added after this is merged. > > [...] > >> +static int hdr_parse(AVCodecParserContext *s, AVCodecContext *avctx, >> + const uint8_t **poutbuf, int *poutbuf_size, >> +  

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread James Almer
On 7/6/2022 4:09 PM, Andreas Rheinhardt wrote: James Almer: On 7/6/2022 3:47 PM, Paul B Mahol wrote: Added parser. The test will be added after this is merged. [...] +static int hdr_parse(AVCodecParserContext *s, AVCodecContext *avctx, + const uint8_t **poutbuf, int *p

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread Andreas Rheinhardt
James Almer: > > > On 7/6/2022 4:09 PM, Andreas Rheinhardt wrote: >> James Almer: >>> On 7/6/2022 3:47 PM, Paul B Mahol wrote: Added parser. The test will be added after this is merged. >>> >>> [...] >>> +static int hdr_parse(AVCodecParserContext *s, AVCodecContext *avctx, +  

Re: [FFmpeg-devel] [PATCH] avcodec: add Radiance HDR image format support

2022-07-06 Thread Paul B Mahol
On Wed, Jul 6, 2022 at 8:50 PM James Almer wrote: > On 7/6/2022 3:47 PM, Paul B Mahol wrote: > > Added parser. > > The test will be added after this is merged. > > [...] > > > diff --git a/libavformat/img2.c b/libavformat/img2.c > > index 870d2ebbc5..b03075f3b0 100644 > > --- a/libavformat/img2.c

[FFmpeg-devel] [PATCH 1/2] avutil/hwcontext_d3d11va: fix mixed declaration and code

2022-07-06 Thread Timo Rothenpieler
--- libavutil/hwcontext_d3d11va.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index 904d14bbc8..e5afcb2a9d 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -397,6 +397,7 @@ stat

[FFmpeg-devel] [PATCH 2/2] avutil/hwcontext_d3d11va: fix texture_infos writes on non-fixed-size pools

2022-07-06 Thread Timo Rothenpieler
--- libavutil/hwcontext_d3d11va.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/libavutil/hwcontext_d3d11va.c b/libavutil/hwcontext_d3d11va.c index e5afcb2a9d..6355bd1e29 100644 --- a/libavutil/hwcontext_d3d11va.c +++ b/libavutil/hwcontext_d3d11va.c @@ -166,6 +1

Re: [FFmpeg-devel] [PATCH 3/3] avformat/mov: disallow a zero sample size in trun atoms

2022-07-06 Thread Marton Balint
On Tue, 28 Jun 2022, "zhilizhao(赵志立)" wrote: On Jun 28, 2022, at 4:02 AM, Marton Balint wrote: In order to not generate 0 sized packets or create a huge index table needlessly. Fixes: Timeout Fixes: 43717/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-5206008287330304 Fixes: 4

[FFmpeg-devel] [PATCH] avfilter: add vsrc_ddagrab

2022-07-06 Thread Timo Rothenpieler
--- Changelog | 1 + configure | 7 + doc/filters.texi | 68 ++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/version.h | 2 +- libavfilter/vsrc_ddagrab.c

Re: [FFmpeg-devel] [PATCH v2 2/2] avcodec/libopusdec: Enable FEC/PLC

2022-07-06 Thread Lynne
Jul 4, 2022, 16:13 by philip-dylan.gleo...@savoirfairelinux.com: > Adds FEC/PLC support to libopus. The lost packets are detected as a > discontinuity in the audio stream. When a discontinuity is used, this > patch tries to decode the FEC data. If FEC data is present in the > packet, it is decoded

[FFmpeg-devel] [PATCH] Support bidirectional metadata in drawtext filter

2022-07-06 Thread Raymond Cheng
The drawtext filter supports static bidi text via a function called shape_text(). Fixed so that it calls shape_text() when rendering non-static text from metadata (so that bidi text is rendered properly). As an example, "Hello world" is "مرحبا بالعالم" in Arabic. The following command line worked

[FFmpeg-devel] [PATCH] Add metadatareader filter.

2022-07-06 Thread Raymond Cheng
FFmpeg has a handy set of filters, metadata/ametadata, which allow us to add, print or save per-frame metadata to a file. I will use these filters when I want to save the results from speech transcription, for instance. What is missing is a way to round-trip the saved metadata, so I decided to add

[FFmpeg-devel] [PATCH v2] libavfilter/vf_overlay_qsv: Use format of first input to set output format for overlay_qsv

2022-07-06 Thread Wenbin Chen
overlay_qsv hard coded to use nv12 as output format. Now use the format of the first input to set output format. For detailed information of supported format on different platform, please see the "composition" rows in "Video Processing Features" at below link: https://www.intel.com/content/www/us/

[FFmpeg-devel] [PATCH] libavcodec/qsvenc: Fix a log format issue

2022-07-06 Thread Wenbin Chen
Add a line feed to fix a log format issue. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c index 2382c2f5f7..81d93235d7 100644 --- a/libavcodec/qsvenc.c +++ b/libavcodec/qsvenc.c @@ -308,6 +308,7 @@