Re: [FFmpeg-devel] [PATCH] avfilter/fifo: Remove unused buffer frame

2022-02-16 Thread Paul B Mahol
On Wed, Feb 16, 2022 at 7:02 AM Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Forgotten in 03c8fe49ea3f2a2444607e541dff15a1ccd7f0c2. > > Signed-off-by: Andreas Rheinhardt > --- > What is actually the use-case of these filters? The documentation states > that they are auto-inserted

[FFmpeg-devel] [PATCH v2] avformat/nutdec: Add check for avformat_new_stream

2022-02-16 Thread Jiasheng Jiang
As the potential failure of the memory allocation, the avformat_new_stream() could return NULL pointer. Therefore, it should be better to check it and return error if fails. Also, the caller, nut_read_header(), needs to deal with the return value of the decode_main_header() and return error if memo

Re: [FFmpeg-devel] [PATCH v2] avformat/nutdec: Add check for avformat_new_stream

2022-02-16 Thread Jiasheng Jiang
Andreas Rheinhardt: >> As the potential failure of the memory allocation, >> the avformat_new_stream() could return NULL pointer. >> Therefore, it should be better to check it and return >> error if fails. >> >> Fixes: 84ad31ff18 ("lavf: replace av_new_stream->avformat_new_stream part >> II.") >

Re: [FFmpeg-devel] [PATCH] avformat/nutdec: Add check for avformat_new_stream

2022-02-16 Thread Jiasheng Jiang
Andreas Rheinhardt: >> As the potential failure of the memory allocation, >> the avformat_new_stream() could return NULL pointer. >> Therefore, it should be better to check it and return >> error if fails. >> >> Fixes: 84ad31ff18 ("lavf: replace av_new_stream->avformat_new_stream part >> II.") >

[FFmpeg-devel] [PATCH 2/2] fate/h264: add test case for h264-loss_packet_for_prev_frame_num_offset

2022-02-16 Thread Steven Liu
From: Steven Liu Signed-off-by: Steven Liu --- tests/fate/h264.mak | 2 ++ ...h264-loss_packet_for_prev_frame_num_offset | 23 +++ 2 files changed, 25 insertions(+) create mode 100644 tests/ref/fate/h264-loss_packet_for_prev_frame_num_offset diff --g

[FFmpeg-devel] [PATCH 1/2] avcodec/h264_slice: compute prev_frame_num_offset to correct value

2022-02-16 Thread Steven Liu
From: Shitao Wang If H.264 stream decode under loss packet transport network, h264_slice will process prev_frame_num_offset in wrong way, it will dup picture, This is different to JM, so compute the prev_frame_num_offset when prev_frame_num >= (1 << sps->log2_max_frame_num), then it will same as

Re: [FFmpeg-devel] [PATCH 2/2] fate/h264: add test case for h264-loss_packet_for_prev_frame_num_offset

2022-02-16 Thread Steven Liu
> 2022年2月16日 下午4:51,Steven Liu 写道: > > From: Steven Liu > > Signed-off-by: Steven Liu > --- > tests/fate/h264.mak | 2 ++ > ...h264-loss_packet_for_prev_frame_num_offset | 23 +++ > 2 files changed, 25 insertions(+) > create mode 100644 tests/ref/fate

Re: [FFmpeg-devel] [PATCH v6 1/1] avformat: Add IPFS protocol support.

2022-02-16 Thread Tomas Härdin
> +    // Test $IPFS_GATEWAY. > +    if (getenv("IPFS_GATEWAY") != NULL) { > +    snprintf(c->gateway_buffer, sizeof(c->gateway_buffer), "%s", > + getenv("IPFS_GATEWAY")); might want to error check this one > +    ret = 1; > +    goto err; > +    } else > +    av_

[FFmpeg-devel] [PATCH] tests/checkasm/nlmeans: Add check for av_calloc

2022-02-16 Thread Jiasheng Jiang
As the potential failure of the av_calloc(), it should be better to check it and fail() if fails in order to avoid the dereference of the NULL pointer. Fixes: f679711c1b ("checkasm: add vf_nlmeans test for ssd_integral_image") Signed-off-by: Jiasheng Jiang --- tests/checkasm/vf_nlmeans.c | 14 ++

Re: [FFmpeg-devel] [PATCH v3 2/4] avformat/imf: fix missing error reporting when opening resources

2022-02-16 Thread Zane van Iperen
On 3/2/22 14:07, p...@sandflow.com wrote: From: Pierre-Anthony Lemieux --- libavformat/imfdec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index e6a1020ecc..658ddc40f2 100644 --- a/libavformat/imfdec.c +++ b/libavfor

Re: [FFmpeg-devel] [PATCH v6 1/1] avformat: Add IPFS protocol support.

2022-02-16 Thread Mark Gaiser
On Wed, Feb 16, 2022 at 10:40 AM Tomas Härdin wrote: > > > +// Test $IPFS_GATEWAY. > > +if (getenv("IPFS_GATEWAY") != NULL) { > > +snprintf(c->gateway_buffer, sizeof(c->gateway_buffer), "%s", > > + getenv("IPFS_GATEWAY")); > > might want to error check this one > >

[FFmpeg-devel] [PATCH] avcodec/libsvtav1: add a svtav1-params option to pass a list of key=value parameters

2022-02-16 Thread James Almer
Signed-off-by: James Almer --- doc/encoders.texi | 3 +++ libavcodec/libsvtav1.c | 52 ++ 2 files changed, 41 insertions(+), 14 deletions(-) diff --git a/doc/encoders.texi b/doc/encoders.texi index bfb6c7eef6..1a040bccdd 100644 --- a/doc/encoders.tex

[FFmpeg-devel] [PATCH v3 1/5] libavutil/wchar_filename.h: Add wchartoansi and utf8toansi

2022-02-16 Thread nihil-admirari
These functions are going to be used in libavformat/avisynth.c and fftools/cmdutils.c when replacing MAX_PATH-sized buffers with dynamically sized ones. --- libavutil/wchar_filename.h | 37 + 1 file changed, 37 insertions(+) diff --git a/libavutil/wchar_filenam

[FFmpeg-devel] [PATCH v3 3/5] compat/w32dlfcn.h: Replace MAX_PATH-sized buffers with dynamically sized ones

2022-02-16 Thread nihil-admirari
Also replaces a call to LoadLibraryExA with LoadLibraryExW since ANSI functions do not support long paths. --- compat/w32dlfcn.h | 74 ++- 1 file changed, 61 insertions(+), 13 deletions(-) diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h index 52a94ef

[FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones

2022-02-16 Thread nihil-admirari
--- fftools/cmdutils.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 4b50e15..ea78897 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -62,6 +62,7 @@ #endif #ifdef _WIN32 #include +#

[FFmpeg-devel] [PATCH v3 5/5] fftools: Enable long path support on Windows (fixes #8885)

2022-02-16 Thread nihil-admirari
--- fftools/Makefile | 5 + fftools/long_paths_utf8.manifest | 12 fftools/long_paths_utf8.rc | 3 +++ 3 files changed, 20 insertions(+) create mode 100644 fftools/long_paths_utf8.manifest create mode 100644 fftools/long_paths_utf8.rc diff --git a/fftool

[FFmpeg-devel] [PATCH v3 2/5] libavformat/avisynth.c: Replace MAX_PATH-sized buffers with dynamically sized ones

2022-02-16 Thread nihil-admirari
--- libavformat/avisynth.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/libavformat/avisynth.c b/libavformat/avisynth.c index 8bc3986..219f307 100644 --- a/libavformat/avisynth.c +++ b/libavformat/avisynth.c @@ -36,6 +36,7 @@ /* Platform-specific directives. */

Re: [FFmpeg-devel] [PATCH v2] Long path support for Windows (fixes #8885)

2022-02-16 Thread nil-admirari
ANSI functions do not support long paths, so I had to change LoadLibraryExA to LoadLibraryExW.in compat/w32dlfcn.h as well. I cannot find other uses of WinAPI functions ending with ..A(. Looks like FFmpeg doesn't use ANSI functions anywhere else, but the codebase is huge, so who knows. Previous p

Re: [FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones

2022-02-16 Thread Martin Storsjö
On Wed, 16 Feb 2022, nihil-admirari wrote: --- fftools/cmdutils.c | 31 +-- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 4b50e15..ea78897 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -62,6 +

Re: [FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones

2022-02-16 Thread nil-admirari
Previously there was GetModuleFileNameA. wchartoansi is used to match old behaviour. I can replace it with wchartoutf8 if you wish. > - if (GetModuleFileNameA(GetModuleHandleA(NULL), datadir, sizeof(datadir) - > 1)) > + if (wchartoansi(datadir_w, &datadir)) > + datadir = NULL; From: Martin Stor

Re: [FFmpeg-devel] [PATCH v3 4/5] fftools/cmdutils.c: Replace MAX_PATH-sized buffers with dynamically sized ones

2022-02-16 Thread Martin Storsjö
> On Feb 16, 2022, at 18:32, nil-admir...@mailo.com wrote: > > Previously there was GetModuleFileNameA. wchartoansi is used to match old > behaviour. I can replace it with wchartoutf8 if you wish. Oh, right. Well yes - if the path later is going to end up in a codepath that expects it to be U

[FFmpeg-devel] [PATCH v4 1/3] avformat/imf: open resources only when first needed

2022-02-16 Thread pal
From: Pierre-Anthony Lemieux IMF CPLs can reference thousands of files, which can result in system limits for the number of open files to be exceeded. The following patch opens and closes files as needed. Addresses https://trac.ffmpeg.org/ticket/9623 --- libavformat/imfdec.c | 17 ++---

[FFmpeg-devel] [PATCH v4 2/3] avformat/imf: fix packet pts, dts and muxing

2022-02-16 Thread pal
From: Pierre-Anthony Lemieux The IMF demuxer does not set the DTS and PTS of packets accurately in all scenarios. Moreover, audio packets are not trimmed when they exceed the duration of the underlying resource. imf-cpl-with-repeat FATE ref file is regenerated. Addresses https://trac.ffmpeg.org

[FFmpeg-devel] [PATCH v4 3/3] avformat/imf: document IMFVirtualTrackResourcePlaybackCtx

2022-02-16 Thread pal
From: Pierre-Anthony Lemieux --- libavformat/imfdec.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index 17a21f5ef9..143f1086b6 100644 --- a/libavformat/imfdec.c +++ b/libavformat/imfdec.c @@ -96,12 +96,12 @@ typedef

Re: [FFmpeg-devel] [PATCH v3 2/4] avformat/imf: fix missing error reporting when opening resources

2022-02-16 Thread Pierre-Anthony Lemieux
On Wed, Feb 16, 2022 at 3:45 AM Zane van Iperen wrote: > > > > > On 3/2/22 14:07, p...@sandflow.com wrote: > > From: Pierre-Anthony Lemieux > > > > --- > > libavformat/imfdec.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/libavformat/imfdec.c b/libavformat/

Re: [FFmpeg-devel] [PATCH 275/281] avfilter: convert to new channel layout API

2022-02-16 Thread Anton Khirnov
Quoting James Almer (2022-01-13 03:09:07) > diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c > index 1a2519dd32..31453823c5 100644 > --- a/libavfilter/af_channelsplit.c > +++ b/libavfilter/af_channelsplit.c > @@ -36,7 +36,7 @@ > typedef struct ChannelSplitContext { >

Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version

2022-02-16 Thread Helmut K. C. Tessarek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2022-02-16 02:37, Stephen Hutchinson wrote: > There is another option, basically what Gyan suggested earlier: grab the > release build of 3.7.1, fetch the extra headers from the Github repo, > then copy either all the contents of the tarball's /

Re: [FFmpeg-devel] [PATCH 1/3] avfilter: Rename blend_modes.c -> blend_modes_template.c

2022-02-16 Thread Michael Niedermayer
On Wed, Feb 16, 2022 at 05:38:04AM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > This is more consistent with similar usage > > > > Signed-off-by: Michael Niedermayer > > --- > > .../{blend_modes.c => blend_modes_template.c} | 0 > > libavfilter/vf_blend.c

Re: [FFmpeg-devel] [FFmpeg-cvslog] avfilter/af_speechnorm: speed up filtering code

2022-02-16 Thread James Almer
ffmpeg | branch: master | Paul B Mahol | Wed Feb 16 19:31:31 2022 +0100| [698de27f25bea278ce7155fc387b3d59b478d46b] | committer: Paul B Mahol avfilter/af_speechnorm: speed up filtering code Reduce some asserts by default. http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=698de27f25b

Re: [FFmpeg-devel] [PATCH 1/5] libswscale: Re-factor ff_shuffle_filter_coefficients.

2022-02-16 Thread Michael Niedermayer
On Wed, Feb 09, 2022 at 10:09:45AM +0100, Alan Kelly wrote: > Make the code more readable and follow the style guide. > --- > libswscale/utils.c | 64 +++--- > 1 file changed, 37 insertions(+), 27 deletions(-) > > diff --git a/libswscale/utils.c b/libswscal

[FFmpeg-devel] [PATCH v7 0/1] Add IPFS protocol support.

2022-02-16 Thread Mark Gaiser
Hi, This patch series adds support for IPFS. V7: - Removed sanitize_ipfs_gateway. Only the http/https check stayed and that's now in translate_ipfs_to_http. - Added a check for ipfs_cid. It's only to show an error is someone happens to profide `ffplay ipfs://` without a cid. - All snprintf usa

[FFmpeg-devel] [PATCH v7 1/1] avformat: Add IPFS protocol support.

2022-02-16 Thread Mark Gaiser
This patch adds support for: - ffplay ipfs:// - ffplay ipns:// IPFS data can be played from so called "ipfs gateways". A gateway is essentially a webserver that gives access to the distributed IPFS network. This protocol support (ipfs and ipns) therefore translates ipfs:// and ipns:// to a http:/

Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version

2022-02-16 Thread hydra3333
> On 2022-02-16 02:37, Stephen Hutchinson wrote: > > There is another option, basically what Gyan suggested earlier: grab the > > release build of 3.7.1, fetch the extra headers from the Github repo, > > then copy either all the contents of the tarball's /usr directory into > > the system /usr dir

Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version

2022-02-16 Thread Helmut K. C. Tessarek
-BEGIN PGP SIGNED MESSAGE- Hash: SHA512 On 2022-02-16 18:04, hydra3...@gmail.com wrote: > This probably will not help you, since I cross-compile under Ubuntu for > target Win10. However, for the record I did this, not quite according to > the git instructions, and it did not abort: > > #

[FFmpeg-devel] [PATCH] avformat/avisynth: fix frameprop version check

2022-02-16 Thread Stephen Hutchinson
Trying to be clever about determining between interface version 8 and 8.1 ended up with pre-8.1 versions of AviSynth+ segfaulting. The amount of time between interface version 8.1 and 9 is small, so just restrict the frameprop awareness to version 9 and call it a day. --- libavformat/avisynth.c |

Re: [FFmpeg-devel] [PATCH 3/3] configure: check avisynth header version

2022-02-16 Thread Stephen Hutchinson
On 2/16/22 1:25 PM, Helmut K. C. Tessarek wrote: On 2022-02-16 02:37, Stephen Hutchinson wrote: There is another option, basically what Gyan suggested earlier: grab the release build of 3.7.1, fetch the extra headers from the Github repo, then copy either all the contents of the tarball's /usr

Re: [FFmpeg-devel] [PATCH v2] libavcodec/qsvenc_hevc: encode RGB format rawvideo

2022-02-16 Thread Xiang, Haihao
On Tue, 2022-02-15 at 15:00 +0800, Wenbin Chen wrote: > Add support for hevc_qsv to input RGB format frame. It will > transform frame to yuv inside MediaSDK instead of using auto > scale. Now hevc_qsv supports directly encoding BGRA and X2RGB10 > format. X2RGB10 is only supported in VDENC (-low_pow

[FFmpeg-devel] [PATCH 1/3] avcodec/libaomenc: Add parameter for avif single image encoding

2022-02-16 Thread Vignesh Venkatasubramanian
Add a parameter to libaom-av1 encoder to enforce some of the single image constraints in the AV1 encoder. Setting this flag will limit the encoder to producing exactly one frame and the sequence header that is produced by the encoder will be conformant to the AVIF specification [1]. Part of Fixing

[FFmpeg-devel] [PATCH 2/3] avformat/av1: Add a parameter to av1c to omit seq header

2022-02-16 Thread Vignesh Venkatasubramanian
Add a parameter to omit seq header when generating the av1C atom. For now, this does not change any behavior. This will be used by a follow-up patch to add AVIF support. Signed-off-by: Vignesh Venkatasubramanian --- libavformat/av1.c | 7 +-- libavformat/av1.h | 4 +++- liba

[FFmpeg-devel] [PATCH 3/3] avformat/movenc: Add support for AVIF muxing

2022-02-16 Thread Vignesh Venkatasubramanian
Add an AVIF muxer by re-using the existing the mov/mp4 muxer. AVIF Specifiation: https://aomediacodec.github.io/av1-avif Sample usage for still image: ffmpeg -i image.png -c:v libaom-av1 -avif-image 1 image.avif Sample usage for animated AVIF image: ffmpeg -i video.mp4 animated.avif We can re-u

Re: [FFmpeg-devel] [PATCH 01/17] avcodec/svq3: Mark decoder as init-threadsafe

2022-02-16 Thread Andreas Rheinhardt
Andreas Rheinhardt: > The only interesting thing done in SVQ3's init function > is using zlib, but this is fine: https://zlib.net/zlib_faq.html#faq21 > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/svq3.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcod