Re: [FFmpeg-devel] [PATCH v7 09/10] qsv: use a new method to create mfx session when using oneVPL

2022-03-15 Thread Xiang, Haihao
On Fri, 2022-03-11 at 15:00 +0100, Hendrik Leppkes wrote: > On Fri, Mar 11, 2022 at 2:43 PM Xiang, Haihao > wrote: > > > > On Fri, 2022-03-11 at 09:35 +0100, Hendrik Leppkes wrote: > > > On Fri, Mar 11, 2022 at 9:18 AM Xiang, Haihao > > > wrote: > > > > diff --git a/libavutil/hwcontext_d3d11va.c

Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add null encoders

2022-03-15 Thread Anton Khirnov
Quoting Paul B Mahol (2022-03-14 12:56:01) > +static int null_encoder(AVCodecContext *avctx, AVPacket *pkt, > +const AVFrame *frame, int *got_packet) > +{ > +int ret; > + > +pkt->pts = frame->pts; > +if (avctx->codec_type == AVMEDIA_TYPE_AUDIO) > +pkt->du

Re: [FFmpeg-devel] [PATCH v6 1/2] libavcodec: Added DFPWM1a codec

2022-03-15 Thread Anton Khirnov
Could we please have tests for all new decoders/demuxers? -- Anton Khirnov ___ 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

Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add null encoders

2022-03-15 Thread Paul B Mahol
On Tue, Mar 15, 2022 at 9:47 AM Anton Khirnov wrote: > Quoting Paul B Mahol (2022-03-14 12:56:01) > > +static int null_encoder(AVCodecContext *avctx, AVPacket *pkt, > > +const AVFrame *frame, int *got_packet) > > +{ > > +int ret; > > + > > +pkt->pts = frame->pts; >

Re: [FFmpeg-devel] [PATCH v2] avcodec/hevc_refs: don't use the frame's AVBufferRef sizes when initializing planes

2022-03-15 Thread Anton Khirnov
Quoting James Almer (2022-03-08 14:55:00) > Use the actual plane sizes instead. > > Signed-off-by: James Almer > --- > libavcodec/hevc_refs.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_refs.c > index 35b8e5e696..fe18ca

Re: [FFmpeg-devel] [PATCH v2] avcodec: Add dv marker bsf

2022-03-15 Thread Anton Khirnov
Could you please add a test? -- Anton Khirnov ___ 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".

[FFmpeg-devel] [PATCH 1/2] avfilter: simplify processing child context options

2022-03-15 Thread Anton Khirnov
THe call to av_opt_set() is redundant, since the option is written in the options dict, which is later passed to avfilter_init_dict(). --- libavfilter/avfilter.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index

[FFmpeg-devel] [PATCH 2/2] avfilter: handle duplicates in the options string

2022-03-15 Thread Anton Khirnov
Use the same logic as fftools/cmdutils - when a flag-type option starts with [+-], append it to the existing value. --- libavfilter/avfilter.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 030f1823ee..a6f2181efb 10

[FFmpeg-devel] [PATCH 02/10] fftools/cmdutils: drop extern declarations for nonexistent variables

2022-03-15 Thread Anton Khirnov
--- fftools/cmdutils.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index d8e5aa342b..f460cb028e 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -44,8 +44,6 @@ extern const char program_name[]; */ extern const int program_birth_year;

[FFmpeg-devel] [PATCH 05/10] fftools: move opt_timelimit from cmdutils to ffmpeg

2022-03-15 Thread Anton Khirnov
This option is only supported by ffmpeg. --- fftools/cmdutils.c | 17 - fftools/ffmpeg_opt.c | 20 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 12ef07b62f..e5684fa840 100644 --- a/fftools/cmdut

[FFmpeg-devel] [PATCH 01/10] fftools/cmdutils: drop prototypes for nonexistent functions

2022-03-15 Thread Anton Khirnov
--- fftools/cmdutils.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/fftools/cmdutils.h b/fftools/cmdutils.h index 50eed9b13a..d8e5aa342b 100644 --- a/fftools/cmdutils.h +++ b/fftools/cmdutils.h @@ -66,11 +66,6 @@ void exit_program(int ret) av_noreturn; */ void init_dynload(void);

[FFmpeg-devel] [PATCH 06/10] fftools/ffmpeg: drop mistakenly added empty line

2022-03-15 Thread Anton Khirnov
--- fftools/ffmpeg_opt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 778e02c39e..5f08cab908 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -1,4 +1,3 @@ - /* * ffmpeg option parsing * -- 2.34.1

[FFmpeg-devel] [PATCH 03/10] fftools: drop useless indirection

2022-03-15 Thread Anton Khirnov
--- fftools/cmdutils.c | 4 ++-- fftools/cmdutils.h | 2 -- fftools/ffmpeg.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 4b50e15eef..0ac98852fe 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1961,7 +1961,7 @

[FFmpeg-devel] [PATCH 08/10] fftools/ffprobe; drop -show_format_entry

2022-03-15 Thread Anton Khirnov
Deprecated since 2012. --- fftools/ffprobe.c | 18 -- 1 file changed, 18 deletions(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 42032ee9d6..c4e962389f 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffprobe.c @@ -3618,22 +3618,6 @@ static int opt_show_entries(void *opt

[FFmpeg-devel] [PATCH 07/10] fftools/ffplay: drop options deprecated since 2011

2022-03-15 Thread Anton Khirnov
--- doc/ffplay.texi | 8 fftools/ffplay.c | 14 -- 2 files changed, 22 deletions(-) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index e187b5852e..0f090128f2 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -34,10 +34,6 @@ various FFmpeg APIs. Force displayed width.

[FFmpeg-devel] [PATCH 09/10] fftools: drop the fake "default" option from ffplay/ffprobe

2022-03-15 Thread Anton Khirnov
It tries to process any unhandled options as AVOptions. Handle this directly in cmdutils.c, without resorting to a confusing fake option definition (which is currently visible to the users in -help output). --- fftools/cmdutils.c | 8 +++- fftools/ffplay.c | 1 - fftools/ffprobe.c | 1 - 3

[FFmpeg-devel] [PATCH 10/10] fftools/cmdutils: drop redundant code

2022-03-15 Thread Anton Khirnov
It allocates a dummy sws/swr context and tries setting options on it, apparently to check if they are valid. This is redundant, since the options will be checked if/when they are later applied on a context that is actually used for conversion. --- fftools/cmdutils.c | 15 --- 1 file ch

[FFmpeg-devel] [PATCH 2/2] lavc/vp9: fix the race in exporting video enc params

2022-03-15 Thread Anton Khirnov
The parameters are currently attached directly to the decoded frame after it is decoded. This is racy, since the frame is shared with other threads, as reported e.g. by the fate-vp9-encparams test in TSAN build. Instead, write the params to a refcounted AVBuffer. Each output frame then gets its ow

[FFmpeg-devel] [PATCH 1/2] lavc/threadframe: allow decoders to attach buffers to ThreadFrame

2022-03-15 Thread Anton Khirnov
This may be useful for synchronizing side data that only becomes available after ff_thread_finish_setup() is called. --- libavcodec/pthread_frame.c | 1 + libavcodec/threadframe.h | 3 +++ libavcodec/utils.c | 7 +++ 3 files changed, 11 insertions(+) diff --git a/libavcodec/pthread_

[FFmpeg-devel] [PATCH v4] avcodec/pngenc: support writing iCCP chunks

2022-03-15 Thread Niklas Haas
From: Niklas Haas encode_zbuf is mostly a mirror image of decode_zbuf. Other than that, the code is pretty straightforward. Special care needs to be taken to avoid writing more than 79 characters of the profile description (the maximum supported). To write the (dynamically sized) deflate-encoded

[FFmpeg-devel] [PATCH v5] avcodec/pngenc: support writing iCCP chunks

2022-03-15 Thread Niklas Haas
From: Niklas Haas We re-use the PNGEncContext.zstream for deflate-related operations. Other than that, the code is pretty straightforward. Special care needs to be taken to avoid writing more than 79 characters of the profile description (the maximum supported). To write the (dynamically sized)

[FFmpeg-devel] [PATCH v2] avcodec/mjpegenc: support writing ICC profiles

2022-03-15 Thread Niklas Haas
From: Niklas Haas This is mostly straightforward. The major complication is that, as a result of the 16-bit chunk size limitation, ICC profiles may need to be split up into multiple chunks. We also need to make sure to allocate enough extra space in the packet to fit the ICC profile, so modify b

Re: [FFmpeg-devel] [PATCH 3/4] avformat/mxfdec: Check for avio_read() failure in mxf_read_strong_ref_array()

2022-03-15 Thread Michael Niedermayer
On Mon, Mar 14, 2022 at 06:08:32PM +0100, Marton Balint wrote: > > > On Mon, 14 Mar 2022, Michael Niedermayer wrote: > > > On Sun, Mar 13, 2022 at 04:52:25PM +0100, Marton Balint wrote: > > > > > > > > > On Sun, 13 Mar 2022, Michael Niedermayer wrote: > > > > > > > Signed-off-by: Michael Nied

Re: [FFmpeg-devel] [PATCH 1/2] lavc/threadframe: allow decoders to attach buffers to ThreadFrame

2022-03-15 Thread Andreas Rheinhardt
Anton Khirnov: > This may be useful for synchronizing side data that only becomes > available after ff_thread_finish_setup() is called. > --- > libavcodec/pthread_frame.c | 1 + > libavcodec/threadframe.h | 3 +++ > libavcodec/utils.c | 7 +++ > 3 files changed, 11 insertions(+) > >

Re: [FFmpeg-devel] [PATCH v2] avcodec: Add dv marker bsf

2022-03-15 Thread Michael Niedermayer
On Tue, Mar 15, 2022 at 09:54:26AM +0100, Anton Khirnov wrote: > Could you please add a test? that was my plan somehow i forgot after the sample files from fate didnt work with it and i fixed that (in fact adding a test was why i tried it with files from fate :) thx for reminding me [...] -- M

[FFmpeg-devel] [PATCH] avcodec/codec_par: do not copy AVChannelLayout struct directly

2022-03-15 Thread Marton Balint
Later we use av_channel_layout_copy, but that uninits the struct unintentionally freeing the possibly allocated u.map pointer. Signed-off-by: Marton Balint --- libavcodec/codec_par.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/codec_par.c b/libavcodec/codec_par.c index e4b329c

[FFmpeg-devel] [PATCH] doc/APIchanges: update for the new channel layout API

2022-03-15 Thread Anton Khirnov
--- doc/APIchanges | 30 ++ 1 file changed, 30 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index ccc4f24b28..88a2e82b76 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,36 @@ libavutil: 2021-04-27 API changes, most recent first: +20

[FFmpeg-devel] [PATCH] avutil/channel_layout: Fix leak of string

2022-03-15 Thread Andreas Rheinhardt
Fixes memleaks in the channel_layout FATE-test. Signed-off-by: Andreas Rheinhardt --- libavutil/channel_layout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index 05ed35c078..8cc4efe4cf 100644 --- a/libavutil/channel_layout.c +++ b/

[FFmpeg-devel] [PATCH] avfilter/af_join: Don't use memcpy for overlapping regions

2022-03-15 Thread Andreas Rheinhardt
Reported by ASAN as memcpy-param-overlap when running the filter-join FATE-test. Signed-off-by: Andreas Rheinhardt --- libavfilter/af_join.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c index 3e272d9161..6f01c6f70a 100644 -

Re: [FFmpeg-devel] [PATCH] avfilter/af_join: Don't use memcpy for overlapping regions

2022-03-15 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] avcodec/codec_par: do not copy AVChannelLayout struct directly

2022-03-15 Thread James Almer
On 3/15/2022 11:28 AM, Marton Balint wrote: Later we use av_channel_layout_copy, but that uninits the struct unintentionally freeing the possibly allocated u.map pointer. Signed-off-by: Marton Balint --- libavcodec/codec_par.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/co

Re: [FFmpeg-devel] [PATCH] avutil/channel_layout: Fix leak of string

2022-03-15 Thread James Almer
On 3/15/2022 11:55 AM, Andreas Rheinhardt wrote: Fixes memleaks in the channel_layout FATE-test. Signed-off-by: Andreas Rheinhardt --- libavutil/channel_layout.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index 05ed35c078..8cc4

Re: [FFmpeg-devel] [PATCH] doc/APIchanges: update for the new channel layout API

2022-03-15 Thread James Almer
On 3/15/2022 11:54 AM, Anton Khirnov wrote: --- doc/APIchanges | 30 ++ 1 file changed, 30 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index ccc4f24b28..88a2e82b76 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,36 @@ libavutil:

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

2022-03-15 Thread Vignesh Venkatasubramanian
On Thu, Mar 10, 2022 at 10:14 AM Vignesh Venkatasubramanian wrote: > > On Thu, Mar 10, 2022 at 8:01 AM Andreas Rheinhardt > wrote: > > > > Vignesh Venkatasubramanian: > > > Add an AVIF muxer by re-using the existing the mov/mp4 muxer. > > > > > > AVIF Specifiation: https://aomediacodec.github.io/

[FFmpeg-devel] [PATCH 1/2] avformat/hls: add AVFMT_NO_BYTE_SEEK flag

2022-03-15 Thread Zhao Zhili
After d6ac6650b91, ffplay failed to seek HLS stream with AVSEEK_FLAG_BYTE enabled by default. --- libavformat/hls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/hls.c b/libavformat/hls.c index 06bc46c23f..a01529 100644 --- a/libavformat/hls.c +++ b/libavforma

[FFmpeg-devel] [PATCH 2/2] ffplay: check AVFMT_NO_BYTE_SEEK flag for seek_by_bytes

2022-03-15 Thread Zhao Zhili
--- fftools/ffplay.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 92ad7ce1a6..80678cfbb5 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -2819,7 +2819,9 @@ static int read_thread(void *arg) ic->pb->eof_reached = 0

[FFmpeg-devel] [PATCH] tests: Add fate-bsf-dv-error-marker

2022-03-15 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- tests/Makefile | 1 + tests/fate/dvvideo.mak | 6 ++ tests/ref/fate/bsf-dv-error-marker | 1 + 3 files changed, 8 insertions(+) create mode 100644 tests/fate/dvvideo.mak create mode 100644 tests/ref/fate/bsf-dv-error-mar

Re: [FFmpeg-devel] [PATCH] tests: Add fate-bsf-dv-error-marker

2022-03-15 Thread James Almer
On 3/15/2022 3:30 PM, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer --- tests/Makefile | 1 + tests/fate/dvvideo.mak | 6 ++ tests/ref/fate/bsf-dv-error-marker | 1 + 3 files changed, 8 insertions(+) create mode 100644 tests/fate/dvvi

[FFmpeg-devel] [PATCH 01/21] avcodec/pngenc: Avoid potentially truncating integers

2022-03-15 Thread Andreas Rheinhardt
So use 64bits for max_packet_size instead of size_t which might be 32 bits; this is consistent with ff_alloc_packet(). Also remove a redundant size check (ff_alloc_packet() already checks for that). Signed-off-by: Andreas Rheinhardt --- libavcodec/pngenc.c | 6 ++ 1 file changed, 2 insertion

[FFmpeg-devel] [PATCH 02/21] avcodec/zlib_wrapper: Add wrappers for zlib inflateInit, inflateEnd

2022-03-15 Thread Andreas Rheinhardt
It is not documented to be safe to call inflateEnd() on a z_stream that has never been successfully been initialized by inflateInit(), but just zeroed. It just happens to work and several codecs rely on this (they have FF_CODEC_CAP_INIT_CLEANUP set and even call inflateEnd() when inflateInit() fail

[FFmpeg-devel] [PATCH 03/21] avcodec/zmbv: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
Returns better error messages in case of error and deduplicates the inflateInit() code. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/zmbv.c | 38 ++ 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/configure b/con

[FFmpeg-devel] [PATCH 04/21] avcodec/zerocodec: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/zerocodec.c | 21 + 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/configur

[FFmpeg-devel] [PATCH 06/21] avcodec/tscc: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
Returns better error messages in case of error and deduplicates the inflateInit() code. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/tscc.c | 36 2 files changed, 13 insertions(+), 25 deletions(-) diff --git a/configure b/confi

[FFmpeg-devel] [PATCH 07/21] avcodec/rasc: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/rasc.c | 49 --- 2 files changed, 22 insertions(+), 29 deletions(-) diff

[FFmpeg-devel] [PATCH 08/21] avcodec/mwsc: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/mwsc.c | 32 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/config

[FFmpeg-devel] [PATCH 09/21] avcodec/mvha: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 3 +-- libavcodec/mvha.c | 30 +++--- 2 files changed, 12 insertions(+), 21 deletions(-) diff --git a/configu

[FFmpeg-devel] [PATCH 10/21] avcodec/mscc: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 4 ++-- libavcodec/mscc.c | 33 + 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/con

[FFmpeg-devel] [PATCH 11/21] avcodec/lcldec: Use ff_inflate_init/end(), cleanup generically

2022-03-15 Thread Andreas Rheinhardt
Returns better error messages in case of error and deduplicates the inflateInit() code and also allows to cleanup generically in case of errors as it is save to call ff_inflate_end() if ff_inflate_init() has not been called successfully. Signed-off-by: Andreas Rheinhardt --- configure

[FFmpeg-devel] [PATCH 05/21] avcodec/wcmv: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/wcmv.c | 46 +++--- 2 files changed, 20 insertions(+), 28 deletions(-) diff

[FFmpeg-devel] [PATCH 12/21] avcodec/flashsv: Use ff_inflate_init/end()

2022-03-15 Thread Andreas Rheinhardt
This fixes the problem of potentially closing a z_stream that has never been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure| 4 +-- libavcodec/flashsv.c | 73 +--- 2 files changed, 36 insertions(+), 41 deletions(-)

[FFmpeg-devel] [PATCH 13/21] avcodec/zlib_wrapper: Use our allocation, freeing functions

2022-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/zlib_wrapper.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/libavcodec/zlib_wrapper.c b/libavcodec/zlib_wrapper.c index b15d5be2b8..5b93c2c74f 100644 --- a/libavcodec/zlib_wrapper.c +++ b/libavcodec/zlib_wrap

[FFmpeg-devel] [PATCH 14/21] avcodec/lscrdec: Don't open and close z_streams unnecessarily

2022-03-15 Thread Andreas Rheinhardt
Instead reuse and reset a single z_stream. Signed-off-by: Andreas Rheinhardt --- configure| 2 +- libavcodec/lscrdec.c | 84 +--- 2 files changed, 33 insertions(+), 53 deletions(-) diff --git a/configure b/configure index e3d2f590cd..0e5923fc

[FFmpeg-devel] [PATCH 15/21] avcodec/pngdec: Don't open and close z_streams unnecessarily

2022-03-15 Thread Andreas Rheinhardt
Instead reuse and reset a single z_stream. Also use FFZStream in decode_zbuf(), because it has nicer error messages. Signed-off-by: Andreas Rheinhardt --- configure | 4 +- libavcodec/pngdec.c | 108 +++- 2 files changed, 48 insertions(+), 64 d

[FFmpeg-devel] [PATCH 16/21] avcodec/pngenc: Don't use deflateInit2() with default parameters

2022-03-15 Thread Andreas Rheinhardt
Use deflateInit() instead. Signed-off-by: Andreas Rheinhardt --- libavcodec/pngenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/pngenc.c b/libavcodec/pngenc.c index 64a9f5cc95..0b75f948d5 100644 --- a/libavcodec/pngenc.c +++ b/libavcodec/pngenc.c @@ -1071,7 +1

[FFmpeg-devel] [PATCH 17/21] avcodec/zlib_wrapper: Add wrapper for deflateInit()

2022-03-15 Thread Andreas Rheinhardt
The rationale is the same as for the wrappers for inflateInit(), although the case for it is admittedly not so strong because there are less users of deflateInit(). Signed-off-by: Andreas Rheinhardt --- configure | 2 ++ libavcodec/Makefile | 1 + libavcodec/zlib_wrapper.

[FFmpeg-devel] [PATCH 18/21] avcodec/zmbvenc: Use ff_deflate_init/end() wrappers

2022-03-15 Thread Andreas Rheinhardt
They emit better error messages (it does not claim that inflateInit failed upon an error from deflateInit!) and uses our allocation functions. Signed-off-by: Andreas Rheinhardt --- configure| 2 +- libavcodec/zmbvenc.c | 41 +++-- 2 files changed,

[FFmpeg-devel] [PATCH 19/21] avcodec/pngenc: Use ff_deflate_init/end() wrappers

2022-03-15 Thread Andreas Rheinhardt
They return nicer error messages. Signed-off-by: Andreas Rheinhardt --- configure | 6 ++ libavcodec/png.c| 10 - libavcodec/png.h| 4 libavcodec/pngenc.c | 49 ++--- 4 files changed, 26 insertions(+), 43 deletions(-)

[FFmpeg-devel] [PATCH 20/21] avcodec/lclenc: Use ff_deflate_init/end() wrappers

2022-03-15 Thread Andreas Rheinhardt
They return nicer error messages on error; furthermore, they also use our allocation functions. It also stops calling deflateEnd() on a z_stream that might not have been successfully initialized. Signed-off-by: Andreas Rheinhardt --- configure | 2 +- libavcodec/lclenc.c | 36

[FFmpeg-devel] [PATCH 21/21] avcodec/flashsv2enc: Avoid opening and closing z_stream

2022-03-15 Thread Andreas Rheinhardt
Instead initialize a z_stream during init and reset it when needed. Signed-off-by: Andreas Rheinhardt --- configure| 2 +- libavcodec/flashsv2enc.c | 70 +++- 2 files changed, 42 insertions(+), 30 deletions(-) diff --git a/configure b/configu

[FFmpeg-devel] [PATCH 1/4] avutil/channel_layout: print channels using av_channel_name_bprint in av_channel_layout_describe_bprint

2022-03-15 Thread Marton Balint
This reduces code duplication an allows printing AMBI%d channel names for custom layouts for non-standard or partial ambisonic layouts. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavutil/channel_layout.c

[FFmpeg-devel] [PATCH 2/4] avutil/channel_layout: factorize ambisonic order detection

2022-03-15 Thread Marton Balint
Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 40 ++ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index c60ccf368f..fb2335a334 100644 --- a/libavutil/channel_layout.c +++

[FFmpeg-devel] [PATCH 3/4] avutil/channel_layout: do not copy alloc new map for extra channel layout

2022-03-15 Thread Marton Balint
Also use av_channel_layout_bprint directly for describing channel layout for extra channels. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c i

[FFmpeg-devel] [PATCH 4/4] avutil/channel_layout: fix av_channel_layout_describe_bprint with custom and ambisonic channels

2022-03-15 Thread Marton Balint
bp->len cannot be used to detect if try_describe_ambisonic was successful because the bprint buffer might contain other data as well. Also describing an invalid ambisonic layout should not return 0 but AVERROR(EINVAL) instead, so change try_describe_ambisonic to actually return error on invalid am

Re: [FFmpeg-devel] [PATCH 3/4] avutil/channel_layout: do not copy alloc new map for extra channel layout

2022-03-15 Thread James Almer
On 3/15/2022 5:30 PM, Marton Balint wrote: Also use av_channel_layout_bprint directly for describing channel layout for extra channels. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/libavut

Re: [FFmpeg-devel] [PATCH 4/4] avutil/channel_layout: fix av_channel_layout_describe_bprint with custom and ambisonic channels

2022-03-15 Thread James Almer
On 3/15/2022 5:30 PM, Marton Balint wrote: bp->len cannot be used to detect if try_describe_ambisonic was successful because the bprint buffer might contain other data as well. Also describing an invalid ambisonic layout should not return 0 but AVERROR(EINVAL) instead, so change try_describe_

Re: [FFmpeg-devel] [PATCH 1/4] avutil/channel_layout: print channels using av_channel_name_bprint in av_channel_layout_describe_bprint

2022-03-15 Thread James Almer
On 3/15/2022 5:30 PM, Marton Balint wrote: This reduces code duplication an allows printing AMBI%d channel names for custom layouts for non-standard or partial ambisonic layouts. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 6 +- 1 file changed, 1 insertion(+), 5 dele

Re: [FFmpeg-devel] [PATCH 2/4] avutil/channel_layout: factorize ambisonic order detection

2022-03-15 Thread James Almer
On 3/15/2022 5:30 PM, Marton Balint wrote: Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 40 ++ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index c60ccf368f..fb23

[FFmpeg-devel] [PATCH] ffmpeg: remove usage of internal deprecation macro

2022-03-15 Thread James Almer
Signed-off-by: James Almer --- fftools/ffmpeg.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index a98e49b775..3b625a9918 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -2880,9 +2880,9 @@ static int init_input_stream(int ist_

Re: [FFmpeg-devel] [PATCH v2] avcodec/hevc_refs: don't use the frame's AVBufferRef sizes when initializing planes

2022-03-15 Thread James Almer
On 3/15/2022 5:53 AM, Anton Khirnov wrote: Quoting James Almer (2022-03-08 14:55:00) Use the actual plane sizes instead. Signed-off-by: James Almer --- libavcodec/hevc_refs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/hevc_refs.c b/libavcodec/hevc_r

[FFmpeg-devel] [PATCH v2 1/4] avutil/channel_layout: print channels using av_channel_name_bprint in av_channel_layout_describe_bprint

2022-03-15 Thread Marton Balint
This reduces code duplication an allows printing AMBI%d channel names for custom layouts for non-standard or partial ambisonic layouts. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavutil/channel_layout.c

[FFmpeg-devel] [PATCH v2 2/4] avutil/channel_layout: factorize ambisonic order detection

2022-03-15 Thread Marton Balint
Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 42 +++--- libavutil/channel_layout.h | 1 + 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index c60ccf368f..0069c6257b 100644

[FFmpeg-devel] [PATCH v2 3/4] avutil/channel_layout: do not copy alloc new map for extra channel layout

2022-03-15 Thread Marton Balint
Also use av_channel_layout_bprint directly for describing channel layout for extra channels. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c

[FFmpeg-devel] [PATCH v2 4/4] avutil/channel_layout: fix av_channel_layout_describe_bprint with custom and ambisonic channels

2022-03-15 Thread Marton Balint
bp->len cannot be used to detect if try_describe_ambisonic was successful because the bprint buffer might contain other data as well. Also describing an invalid ambisonic layout should not return 0 but AVERROR(EINVAL) instead, so change try_describe_ambisonic to actually return error on invalid am

Re: [FFmpeg-devel] [PATCH v2 2/4] avutil/channel_layout: factorize ambisonic order detection

2022-03-15 Thread James Almer
On 3/15/2022 6:18 PM, Marton Balint wrote: Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 42 +++--- libavutil/channel_layout.h | 1 + 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/libavutil/channel_layout.c b/libavutil/ch

Re: [FFmpeg-devel] [PATCH v2 3/4] avutil/channel_layout: do not copy alloc new map for extra channel layout

2022-03-15 Thread James Almer
On 3/15/2022 6:18 PM, Marton Balint wrote: Also use av_channel_layout_bprint directly for describing channel layout for extra channels. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/libavutil

Re: [FFmpeg-devel] [PATCH v2 4/4] avutil/channel_layout: fix av_channel_layout_describe_bprint with custom and ambisonic channels

2022-03-15 Thread James Almer
On 3/15/2022 6:18 PM, Marton Balint wrote: bp->len cannot be used to detect if try_describe_ambisonic was successful because the bprint buffer might contain other data as well. Also describing an invalid ambisonic layout should not return 0 but AVERROR(EINVAL) instead, so change try_describe_amb

Re: [FFmpeg-devel] [PATCH v2 2/4] avutil/channel_layout: factorize ambisonic order detection

2022-03-15 Thread Marton Balint
On Tue, 15 Mar 2022, James Almer wrote: On 3/15/2022 6:18 PM, Marton Balint wrote: Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 42 +++--- libavutil/channel_layout.h | 1 + 2 files changed, 31 insertions(+), 12 deletions(-) diff

Re: [FFmpeg-devel] [PATCH] avformat/mov: Add support for still image AVIF parsing

2022-03-15 Thread Vignesh Venkatasubramanian
On Thu, Mar 3, 2022 at 3:58 PM Vignesh Venkatasubramanian wrote: > > Add support for parsing AVIF still images. This patches supports > AVIF still images that have exactly 1 item (i.e.) no alpha channel. > Essentially, we will have to parse the "iloc" box and populate > the mov index. > > With thi

Re: [FFmpeg-devel] [PATCH] tests: Add fate-bsf-dv-error-marker

2022-03-15 Thread Michael Niedermayer
On Tue, Mar 15, 2022 at 03:35:08PM -0300, James Almer wrote: > > > On 3/15/2022 3:30 PM, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > tests/Makefile | 1 + > > tests/fate/dvvideo.mak | 6 ++ > > tests/ref/fate/bsf-dv-error-

Re: [FFmpeg-devel] [PATCH v2 3/4] avutil/channel_layout: do not copy alloc new map for extra channel layout

2022-03-15 Thread Marton Balint
On Tue, 15 Mar 2022, James Almer wrote: On 3/15/2022 6:18 PM, Marton Balint wrote: Also use av_channel_layout_bprint directly for describing channel layout for extra channels. Signed-off-by: Marton Balint --- libavutil/channel_layout.c | 17 - 1 file changed, 4 in

[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Fix build failure from channels API

2022-03-15 Thread Michael Niedermayer
Regression since 2f8ccca2fa94ce256ff77baa18f462c1abd8d2cc and surrounding commits Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index eaa26b0e62..3bd1ef

Re: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Fix build failure from channels API

2022-03-15 Thread James Almer
On 3/15/2022 7:34 PM, Michael Niedermayer wrote: Regression since 2f8ccca2fa94ce256ff77baa18f462c1abd8d2cc and surrounding commits Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/target_dec_fuzzer.c

Re: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Fix build failure from channels API

2022-03-15 Thread Michael Niedermayer
On Tue, Mar 15, 2022 at 07:45:36PM -0300, James Almer wrote: > On 3/15/2022 7:34 PM, Michael Niedermayer wrote: > > Regression since 2f8ccca2fa94ce256ff77baa18f462c1abd8d2cc and surrounding > > commits > > > > Signed-off-by: Michael Niedermayer > > --- > > tools/target_dec_fuzzer.c | 3 ++- > >

Re: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: Fix build failure from channels API

2022-03-15 Thread James Almer
On 3/15/2022 9:33 PM, Michael Niedermayer wrote: On Tue, Mar 15, 2022 at 07:45:36PM -0300, James Almer wrote: On 3/15/2022 7:34 PM, Michael Niedermayer wrote: Regression since 2f8ccca2fa94ce256ff77baa18f462c1abd8d2cc and surrounding commits Signed-off-by: Michael Niedermayer --- tools/tar

Re: [FFmpeg-devel] [PATCH 001/293 v8] avutil/channel_layout: Add a new channel layout API

2022-03-15 Thread Michael Niedermayer
On Mon, Jan 24, 2022 at 05:46:56PM -0300, James Almer wrote: > From: Anton Khirnov > > The new API is more extensible and allows for custom layouts. > More accurate information is exported, eg for decoders that do not > set a channel layout, lavc will not make one up for them. > > Deprecate the

Re: [FFmpeg-devel] [PATCH 001/293 v8] avutil/channel_layout: Add a new channel layout API

2022-03-15 Thread James Almer
On 3/15/2022 9:41 PM, Michael Niedermayer wrote: On Mon, Jan 24, 2022 at 05:46:56PM -0300, James Almer wrote: From: Anton Khirnov The new API is more extensible and allows for custom layouts. More accurate information is exported, eg for decoders that do not set a channel layout, lavc will not

[FFmpeg-devel] [PATCH] ffplay: don't shadow global variable

2022-03-15 Thread Zhao Zhili
--- fftools/ffplay.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 92ad7ce1a6..b583225d53 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -1454,13 +1454,13 @@ static void check_external_clock_speed(VideoState *is) { }