Re: [FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols

2024-03-23 Thread Zhao Zhili
On 2024/3/24 10:16, Zhao Zhili wrote: diff --git a/libavformat/file.c b/libavformat/file.c index dd5819c..fa13ae9 100644 --- a/libavformat/file.c +++ b/libavformat/file.c @@ -43,7 +43,7 @@   #if CONFIG_ANDROID_CONTENT_PROTOCOL   #include   #include "libavcodec/jni.h" -#include

[FFmpeg-devel] [PATCH] avformat/file: Fix duplicate symbol ff_jni_*

2024-03-23 Thread Zhao Zhili
From: Zhao Zhili --- libavformat/Makefile | 1 + libavformat/ffjni.c | 1 + libavformat/file.c | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 libavformat/ffjni.c diff --git a/libavformat/Makefile b/libavformat/Makefile index 44aa485029..e10ad436a8 100644 ---

[FFmpeg-devel] [PATCH v4 2/2] avformat/ccaption_dec: use NTSC resolution base

2024-03-23 Thread Marth64
Closed Captions are an NTSC concept, but the base resolution used for x/y calculation is the default PAL base in ASS encoder. This causes subtle positioning issues especially in 16:9 content. Use NTSC 240 TVL (360x240) as the base instead, and compensate the font size of the style. Update tests

[FFmpeg-devel] [PATCH v4 1/2] avcodec/ccaption_dec: don't print multiple \an and \pos tags

2024-03-23 Thread Marth64
Closed Captions decoder prints multiple \pos ASS tags per cue, and preceding the \pos tag is a fixed \an7 that fixes rendering position from the top left corner and enforces justification. Printing multiple \an and \pos tags in this way is invalid behavior, because only the first \pos tag in a

[FFmpeg-devel] [PATCH v4 0/2] Closed Captions decoder improvements (v4)

2024-03-23 Thread Marth64
Since v3: * Added trace logging of coordinates (requested in feedback) * Improved calculation of coordinates by using NTSC base resolution Signed-off-by: Marth64 -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH v9 5/5] doc/indevs: update CC extraction example to use RCWT muxer

2024-03-23 Thread Marth64
Signed-off-by: Marth64 --- doc/indevs.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/indevs.texi b/doc/indevs.texi index d1b2bacf8b..fc14737181 100644 --- a/doc/indevs.texi +++ b/doc/indevs.texi @@ -1069,9 +1069,9 @@ ffplay -f lavfi

[FFmpeg-devel] [PATCH v9 4/5] doc/muxers: refresh the RCWT muxer's doc to be consistent with the demuxer

2024-03-23 Thread Marth64
Signed-off-by: Marth64 --- doc/muxers.texi | 29 +++-- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/doc/muxers.texi b/doc/muxers.texi index a10a8e216f..4161401059 100644 --- a/doc/muxers.texi +++ b/doc/muxers.texi @@ -3038,19 +3038,18 @@ ogg files can

[FFmpeg-devel] [PATCH v9 3/5] avformat/rcwtenc: remove repeated documentation

2024-03-23 Thread Marth64
The high level summary of RCWT can be delegated doc/muxers, which makes it easier to maintain and more consistent with the documentation of the demuxer. Signed-off-by: Marth64 --- libavformat/rcwtenc.c | 5 - 1 file changed, 5 deletions(-) diff --git a/libavformat/rcwtenc.c

[FFmpeg-devel] [PATCH v9 2/5] avformat/rcwtdec: add RCWT Closed Captions demuxer

2024-03-23 Thread Marth64
RCWT (Raw Captions With Time) is a format native to ccextractor, a commonly used OSS tool for processing 608/708 Closed Captions (CC). RCWT can be used to archive the original extracted CC bitstream. The muxer was added in January 2024. In this commit, add the demuxer. One can now demux RCWT

[FFmpeg-devel] [PATCH v9 1/5] avformat/subtitles: extend ff_subtitles_queue_insert() to support not yet available events

2024-03-23 Thread Marth64
If ff_subtitles_queue_insert() were given a NULL buffer with 0 length, it would still attempt to grow the packet or memcpy depending on if merge option is enabled. In this commit, allow passing a NULL buffer with 0 length without attempting to do such operations. This way, if a subtitle demuxer

[FFmpeg-devel] [PATCH v9 0/5] RCWT Closed Captions demuxer (v9)

2024-03-23 Thread Marth64
Since v7/8: * Simplified demuxer error handling logic * Fixes buggy change to ff_subtitles_queue_insert() * Documentation improvements Signed-off-by: Marth64 -- 2.34.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH] avformat/dvdvideodec: add explicit inttypes.h include

2024-03-23 Thread Marth64
Since log statements printing int64 were made portable in 4464b7eeb194e98ac115f18d2b6be67361407c8a, let us include inttypes.h explicitly (as it is unclear where PRId64 and such are coming from now). Reported-by: Traneptora Signed-off-by: Marth64 --- libavformat/dvdvideodec.c | 1 + 1 file

Re: [FFmpeg-devel] [RFC] clarifying the TC conflict of interest rule

2024-03-23 Thread Michael Niedermayer
On Fri, Mar 22, 2024 at 01:52:55PM +0100, Anton Khirnov wrote: > Michael, > following up on the previous discussion in this thread - if you, > personally, would like to vote for a different option than those > suggested so far, please propose one. The goal of the vote is to find the option which

Re: [FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols

2024-03-23 Thread Zhao Zhili
On 2024/3/24 03:05, ad...@shaoxia.xyz wrote: From: 联盟少侠 Could you configure git to avoid Chinese character? The errors indicate that there are multiple definitions of several JNI (Java Native Interface) symbols in the FFmpeg library. Specifically, the linker ld.lld has found duplicate

Re: [FFmpeg-devel] [PATCH 08/12] lavc/frame_thread_encoder: avoid assigning a whole AVCodecContext

2024-03-23 Thread Michael Niedermayer
On Fri, Mar 22, 2024 at 09:28:37PM +0100, Anton Khirnov wrote: > It is highly unsafe, as AVCodecContext contains many allocated fields. > Copying information via AVCodecParameters and with av_opt_copy() should > handle everything needed by thread workers. > --- > libavcodec/frame_thread_encoder.c

[FFmpeg-devel] [PATCH 2/2] avutil/film_grain_params: remove do loop in CHECK macro

2024-03-23 Thread Leo Izen
The continue statement will break out of the do/while loop, not the outer loop as intended. This is one (compound) statement anyway, so we can remove the do/while entirely. Signed-off-by: Leo Izen --- libavutil/film_grain_params.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff

[FFmpeg-devel] [PATCH 1/2] avutil/film_grain_params: remove unused variables

2024-03-23 Thread Leo Izen
These variables are never read from, so they trigger -Wunused-variables Signed-off-by: Leo Izen --- libavutil/film_grain_params.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavutil/film_grain_params.c b/libavutil/film_grain_params.c index fff7252f2f..b3fa37f527 100644 ---

[FFmpeg-devel] [PATCH 0/2] Minor avutil/film_grain_params tweaks

2024-03-23 Thread Leo Izen
A few minor tweaks to libavutil/film_grain_params.c. Leo Izen (2): avutil/film_grain_params: remove unused variables avutil/film_grain_params: remove do loop in CHECK macro libavutil/film_grain_params.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) -- 2.44.0

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/liblc3: Add encoding/decoding support of LC3 audio codec

2024-03-23 Thread Michael Niedermayer
On Fri, Mar 22, 2024 at 05:01:00PM +, Antoine Soulier via ffmpeg-devel wrote: > The LC3 audio codec is the default codec of Bluetooth LE audio. > This is a wrapper over the liblc3 library (https://github.com/google/liblc3). > > Signed-off-by: Antoine Soulier > Signed-off-by: Antoine SOULIER

[FFmpeg-devel] [PATCH v2 8/8] avcodec/dovi_rpu: attach ext blocks to frames

2024-03-23 Thread Niklas Haas
From: Niklas Haas --- libavcodec/dovi_rpu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index b3defd87bda..2b4d2b470c2 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -94,7 +94,7 @@ int

[FFmpeg-devel] [PATCH v2 7/8] avcodec/dovi_rpu: parse extension blocks

2024-03-23 Thread Niklas Haas
From: Niklas Haas We split the inner loop between v1 and v2 extension blocks to print a warning where an extension block was encountered in an unexpected context. Co-authored-by: quietvoid --- libavcodec/dovi_rpu.c | 178 ++ 1 file changed, 178

[FFmpeg-devel] [PATCH v2 5/8] avcodec/dovi_rpu: verify RPU data CRC32

2024-03-23 Thread Niklas Haas
From: Niklas Haas The Dolby Vision RPU contains a CRC32 to validate the payload against. The implementation is CRC32/MPEG-2. The CRC is only verified with the AV_EF_CRCCHECK flag. Co-authored-by: quietvoid --- libavcodec/av1dec.c | 3 ++- libavcodec/dovi_rpu.c | 18 --

[FFmpeg-devel] [PATCH v2 6/8] avcodec/dovi_rpu: add ext_blocks array to DOVIContext

2024-03-23 Thread Niklas Haas
From: Niklas Haas --- libavcodec/dovi_rpu.c | 3 +++ libavcodec/dovi_rpu.h | 6 ++ 2 files changed, 9 insertions(+) diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index d584d99590a..6097bd5422f 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -47,6 +47,7 @@

[FFmpeg-devel] [PATCH v2 4/8] avcodec/dovi_rpu: strip container in separate step

2024-03-23 Thread Niklas Haas
From: Niklas Haas This ensures that `gb` in the following section is fully byte-aligned, points at the start of the actual RPU, and ends on the CRC terminator. This is important for both calculation of the CRC, as well as dovi extension block parsing (which aligns to byte boundaries in various

[FFmpeg-devel] [PATCH v2 3/8] avcodec/dovi_rpu: switch to AVERROR_INVALIDDATA

2024-03-23 Thread Niklas Haas
From: Niklas Haas Instead of AVERROR(EINVAL) --- libavcodec/dovi_rpu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index c84a942f476..53f8c288db0 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -483,5 +483,5

[FFmpeg-devel] [PATCH v2 2/8] avutil/dovi_meta: add dolby vision extension blocks

2024-03-23 Thread Niklas Haas
From: Niklas Haas As well as accessors plus a function for allocating this struct with extension blocks, Definitions generously taken from quietvoid/dovi_tool, which is assembled as a collection of various patent fragments, as well as output by the official Dolby Vision bitstream verifier tool.

[FFmpeg-devel] [PATCH v2 1/8] avutil/dovi_meta: add AVDOVIDataMapping.nlq_pivots

2024-03-23 Thread Niklas Haas
From: quietvoid The NLQ pivots are not documented but should be present in the header for profile 7 RPU format. It has been verified using Dolby's verification toolkit. Signed-off-by: quietvoid Signed-off-by: Niklas Haas --- doc/APIchanges| 3 +++ libavcodec/dovi_rpu.c | 9 -

[FFmpeg-devel] [PATCH v2 0/8] Dolby Vision extension block parsing

2024-03-23 Thread Niklas Haas
Changes since v1: - Rebased onto master - Dropped av_dovi_metadata_alloc_ext(), instead statically allocate space for 32 extension blocks (AV_DOVI_MAX_EXT_BLOCKS) - Removed misleading comment on nlq_pivots - Fix memory leak on ff_dovi_ctx_flush() - Switch to using ff_refstruct to properly manage

[FFmpeg-devel] [PATCH] libavformat\file:Fix duplicate JNI symbols

2024-03-23 Thread admin
From: 联盟少侠 The errors indicate that there are multiple definitions of several JNI (Java Native Interface) symbols in the FFmpeg library. Specifically, the linker ld.lld has found duplicate definitions for the following symbols: - ff_jni_get_env - ff_jni_jstring_to_utf_chars -

Re: [FFmpeg-devel] [PATCH 2/6] avutil/dovi_meta: add dolby vision extension blocks

2024-03-23 Thread Niklas Haas
On Sat, 23 Mar 2024 19:08:04 +0100 Niklas Haas wrote: > On Sat, 23 Mar 2024 18:58:51 +0100 Andreas Rheinhardt > wrote: > > Niklas Haas: > > > From: Niklas Haas > > > > > > As well as accessors plus a function for allocating this struct with > > > extension blocks, > > > > > > Definitions

Re: [FFmpeg-devel] [PATCH 6/6] avcodec/dovi_rpu: parse extension blocks

2024-03-23 Thread Niklas Haas
On Sat, 23 Mar 2024 19:00:59 +0100 Andreas Rheinhardt wrote: > Niklas Haas: > > From: Niklas Haas > > > > We split the inner loop between v1 and v2 extension blocks to print > > a warning where an extension block was encountered in an unexpected > > context. > > > > Co-authored-by: quietvoid

Re: [FFmpeg-devel] [PATCH 2/6] avutil/dovi_meta: add dolby vision extension blocks

2024-03-23 Thread Niklas Haas
On Sat, 23 Mar 2024 18:58:51 +0100 Andreas Rheinhardt wrote: > Niklas Haas: > > From: Niklas Haas > > > > As well as accessors plus a function for allocating this struct with > > extension blocks, > > > > Definitions generously taken from quietvoid/dovi_tool, which is > > assembled as a

Re: [FFmpeg-devel] [PATCH 3/6] avcodec/dovi_rpu: strip container in separate step

2024-03-23 Thread Niklas Haas
On Sat, 23 Mar 2024 19:02:26 +0100 Andreas Rheinhardt wrote: > Niklas Haas: > > From: Niklas Haas > > > > This ensures that `gb` in the following section is fully byte-aligned, > > points at the start of the actual RPU, and ends on the CRC terminator. > > > > This is important for both

Re: [FFmpeg-devel] [PATCH 1/2] avcodec: add YUV color space metadata to AVCodec

2024-03-23 Thread Niklas Haas
On Fri, 09 Feb 2024 13:11:38 +0100 Niklas Haas wrote: > On Mon, 05 Feb 2024 19:04:30 +0100 Andreas Rheinhardt > wrote: > > This presumes the relevant states to be a cartesian product. Which need > > not be true. A callback would be better; this would also allow to base > > the list on other

Re: [FFmpeg-devel] [PATCH 2/2] avfilter/vf_scale2ref: switch to FFFrameSync

2024-03-23 Thread Niklas Haas
On Wed, 20 Mar 2024 20:55:26 +0100 Michael Niedermayer wrote: > On Wed, Mar 20, 2024 at 03:23:53PM +0100, Niklas Haas wrote: > > On Tue, 19 Mar 2024 22:55:56 +0100 Michael Niedermayer > > wrote: > > > is it neccessary to drop compatibility to the old syntax ? > > > > Only if we want to use

Re: [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1

2024-03-23 Thread Niklas Haas
On Tue, 19 Mar 2024 20:16:39 +0100 Niklas Haas wrote: > From: Niklas Haas > > AV1 streams don't use configuration records, so delete them when > encoding to AV1. Ideally this would be, as the comment suggests, handled > at the frame-level (and stripped by the av1 encoder), but given the >

[FFmpeg-devel] [PATCH 6/6] avcodec/dovi_rpu: parse extension blocks

2024-03-23 Thread Niklas Haas
From: Niklas Haas We split the inner loop between v1 and v2 extension blocks to print a warning where an extension block was encountered in an unexpected context. Co-authored-by: quietvoid --- libavcodec/dovi_rpu.c | 178 ++ 1 file changed, 178

[FFmpeg-devel] [PATCH 5/6] avcodec/dovi_rpu: add ext_blocks array to DOVIContext

2024-03-23 Thread Niklas Haas
From: Niklas Haas --- libavcodec/dovi_rpu.c | 1 + libavcodec/dovi_rpu.h | 7 +++ 2 files changed, 8 insertions(+) diff --git a/libavcodec/dovi_rpu.c b/libavcodec/dovi_rpu.c index cd54c8716dc..21cb1850e3e 100644 --- a/libavcodec/dovi_rpu.c +++ b/libavcodec/dovi_rpu.c @@ -48,6 +48,7 @@ void

[FFmpeg-devel] [PATCH 1/6] avutil/dovi_meta: add AVDOVIDataMapping.nlq_pivots

2024-03-23 Thread Niklas Haas
From: quietvoid The NLQ pivots are not documented but should be present in the header for profile 7 RPU format. It has been verified using Dolby's verification toolkit. Signed-off-by: quietvoid Signed-off-by: Niklas Haas --- doc/APIchanges| 3 +++ libavcodec/dovi_rpu.c | 9 -

[FFmpeg-devel] [PATCH 2/6] avutil/dovi_meta: add dolby vision extension blocks

2024-03-23 Thread Niklas Haas
From: Niklas Haas As well as accessors plus a function for allocating this struct with extension blocks, Definitions generously taken from quietvoid/dovi_tool, which is assembled as a collection of various patent fragments, as well as output by the official Dolby Vision bitstream verifier tool.

[FFmpeg-devel] [PATCH 3/6] avcodec/dovi_rpu: strip container in separate step

2024-03-23 Thread Niklas Haas
From: Niklas Haas This ensures that `gb` in the following section is fully byte-aligned, points at the start of the actual RPU, and ends on the CRC terminator. This is important for both calculation of the CRC, as well as dovi extension block parsing (which aligns to byte boundaries in various

[FFmpeg-devel] [PATCH 4/6] avcodec/dovi_rpu: verify RPU data CRC32

2024-03-23 Thread Niklas Haas
From: Niklas Haas The Dolby Vision RPU contains a CRC32 to validate the payload against. The implementation is CRC32/MPEG-2. The CRC is only verified with the AV_EF_CRCCHECK flag. Co-authored-by: quietvoid --- libavcodec/av1dec.c | 3 ++- libavcodec/dovi_rpu.c | 18 --

Re: [FFmpeg-devel] [PATCH] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-03-23 Thread Yiğithan Yiğit
Fixes #9613 --- libavfilter/af_volumedetect.c | 234 +- 1 file changed, 172 insertions(+), 62 deletions(-) diff --git a/libavfilter/af_volumedetect.c b/libavfilter/af_volumedetect.c index 8b001d1cf2..d13d043f88 100644 --- a/libavfilter/af_volumedetect.c +++

[FFmpeg-devel] [PATCH] avfilter/vf_stack: round down internal item heights

2024-03-23 Thread Timo Rothenpieler
Following situation: Someone wants to stack two yuv420p frames of the size 3x3 pixel each. Now the various AV_CEIL_RSHIFT() calculations calculate a height of 2 pixel for each items subsampled planes. However, for example in case of a vstack, the output frames will have a height of 6, so the

[FFmpeg-devel] [PATCH] avfilter/buffersrc: fix overriding unknown channel layouts with negotiated one

2024-03-23 Thread Marton Balint
Fixes ffplay playback of unknown layouts, when SDL directly supports the audio format, such as: ffplay -f lavfi anullsrc=cl=2C,aformat=s16 Without the patch, "Channel layout change is not supported" errors are generated because buffersrc (unknown 2 channel) and buffersink (stereo) negotiated a

Re: [FFmpeg-devel] [PATCH] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-03-23 Thread Paul B Mahol
On Sat, Mar 23, 2024 at 3:28 PM Yiğithan Yiğit wrote: > Hi, > > According to your advices, I made some changes of mine last patch. I feel > like this one way more better. I removed trivial calculations but I want to > say I am not proud of how I handled histogram in float despite 16 bit >

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/cbs_h266_syntax_template: Check tile_y

2024-03-23 Thread Nuo Mi
On Thu, Mar 21, 2024 at 9:15 AM Michael Niedermayer wrote: > Fixes: out of array access > Fixes: > 67021/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-4883576579489792 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by

Re: [FFmpeg-devel] [PATCH 1/2] lavc/vvc_parser: small cleanup for style

2024-03-23 Thread Nuo Mi
On Fri, Mar 22, 2024 at 6:36 PM Jun Zhao wrote: > From: Jun Zhao > > small cleanup for style, redundant semicolons, goto labels, > in FFmpeg, we put goto labels at brace level. > Pushed this patch. Thanks, Jun > Signed-off-by: Jun Zhao > --- > libavcodec/vvc_parser.c | 8 > 1 file

[FFmpeg-devel] [PATCH] all: Don't use ATOMIC_VAR_INIT

2024-03-23 Thread Andreas Rheinhardt
C11 required to use ATOMIC_VAR_INIT to statically initialize atomic objects with static storage duration. Yet this macro was unsuitable for initializing structures [1] and was actually unneeded for all known implementations (this includes our compatibility fallback implementations which simply

Re: [FFmpeg-devel] [PATCH] avfilter/af_volumedetect.c: Add 32bit float audio support

2024-03-23 Thread Yiğithan Yiğit
Hi, According to your advices, I made some changes of mine last patch. I feel like this one way more better. I removed trivial calculations but I want to say I am not proud of how I handled histogram in float despite 16 bit integer histogram. I am storing dB values instead of storing samples.

Re: [FFmpeg-devel] [PATCH v2 08/12] lavc/frame_thread_encoder: avoid assigning a whole AVCodecContext

2024-03-23 Thread Andreas Rheinhardt
Anton Khirnov: > It is highly unsafe, as AVCodecContext contains many allocated fields. > Everything needed by worked threads should be covered by > * routing through AVCodecParameters > * av_opt_copy() > * copying quantisation matrices manually > > avcodec_free_context() can now be used for

[FFmpeg-devel] [PATCH v2 08/12] lavc/frame_thread_encoder: avoid assigning a whole AVCodecContext

2024-03-23 Thread Anton Khirnov
It is highly unsafe, as AVCodecContext contains many allocated fields. Everything needed by worked threads should be covered by * routing through AVCodecParameters * av_opt_copy() * copying quantisation matrices manually avcodec_free_context() can now be used for per-thread contexts. ---

Re: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_enc: only promote first frame side data to global when meaningful

2024-03-23 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2024-03-23 14:15:06) >> Anton Khirnov: >>> Skip those side data types that do not make sense as global side data. >>> --- >>> fftools/ffmpeg_enc.c | 5 + >>> 1 file changed, 5 insertions(+) >>> >>> diff --git a/fftools/ffmpeg_enc.c

Re: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_enc: only promote first frame side data to global when meaningful

2024-03-23 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2024-03-23 14:15:06) > Anton Khirnov: > > Skip those side data types that do not make sense as global side data. > > --- > > fftools/ffmpeg_enc.c | 5 + > > 1 file changed, 5 insertions(+) > > > > diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c > > index

Re: [FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_enc: only promote first frame side data to global when meaningful

2024-03-23 Thread Andreas Rheinhardt
Anton Khirnov: > Skip those side data types that do not make sense as global side data. > --- > fftools/ffmpeg_enc.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c > index f01be1c22f..6a91fd0398 100644 > --- a/fftools/ffmpeg_enc.c > +++

[FFmpeg-devel] [PATCH 2/4] fftools/ffmpeg_enc: only promote first frame side data to global when meaningful

2024-03-23 Thread Anton Khirnov
Skip those side data types that do not make sense as global side data. --- fftools/ffmpeg_enc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index f01be1c22f..6a91fd0398 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -247,6

[FFmpeg-devel] [PATCH 1/4] lavu/frame: add side data descriptors

2024-03-23 Thread Anton Khirnov
They allow exporting extended information about side data types. --- doc/APIchanges | 4 +++ libavutil/frame.c | 70 ++--- libavutil/frame.h | 27 + libavutil/version.h | 2 +- 4 files changed, 72 insertions(+), 31 deletions(-)

[FFmpeg-devel] [PATCH 3/4] fftools/ffmpeg_enc: move decoded_side_data setup out of video-only block

2024-03-23 Thread Anton Khirnov
Nothing about this code is video-specific. --- fftools/ffmpeg_enc.c | 41 + 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index 6a91fd0398..61310c67f1 100644 --- a/fftools/ffmpeg_enc.c +++

[FFmpeg-devel] [PATCH 4/4] fftools/ffmpeg_enc: simplify error handling for decoded_side_data setup

2024-03-23 Thread Anton Khirnov
There is no need to free the already-added items, they will be freed alongside the codec context. There is also little point in an error message, as the only reason this can fail is malloc failure. --- fftools/ffmpeg_enc.c | 9 + 1 file changed, 1 insertion(+), 8 deletions(-) diff --git

Re: [FFmpeg-devel] [PATCH] avfilter: propagate colorspace and color_range from buffer filter and between AVFilterLink.

2024-03-23 Thread Damiano Galassi
On Sat, Mar 23, 2024 at 1:11 PM Niklas Haas wrote: > On Fri, 22 Mar 2024 22:02:39 +0100 Damiano Galassi > wrote: > > There two new fields were never sent down the filter chain, and no > filter after the first had colorspace and color_range set, causing breakage > in zscale and possible other

Re: [FFmpeg-devel] [PATCH 2/6] avfilter/af_channelmap: fix mapping if in_channel was a string but out_channel was not specified

2024-03-23 Thread Paul B Mahol
Please add coverage for regression cases in FATE. ___ 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

[FFmpeg-devel] [PATCH 2/2] avformat/file: Combine all CONFIG_ANDROID_CONTENT_PROTOCOL blocks

2024-03-23 Thread Andreas Rheinhardt
Besides improving readability this also ensures that a developer who has the android content protocol enabled and works on the other parts of the file will not forget to add necessary inclusions just because of (indirect) inclusions from the files included only when said protocol is enabled.

[FFmpeg-devel] [PATCH 1/2] avformat/file: Constify android content protocol

2024-03-23 Thread Andreas Rheinhardt
(The discrepancy between the definition and the declaration in protocols.c is actually UB.) Signed-off-by: Andreas Rheinhardt --- This and the next patch have not been tested (apart from "it compiles when the android content protocol is disabled"). libavformat/file.c | 2 +- 1 file changed, 1

[FFmpeg-devel] [PATCH 2/2] avcodec/mpegutils: Simplify indenting

2024-03-23 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c index 7f499b3d0f..d94e8f422f 100644 --- a/libavcodec/mpegutils.c +++ b/libavcodec/mpegutils.c @@ -265,7 +265,7 @@ void

[FFmpeg-devel] [PATCH 1/2] avcodec/mpegutils: Avoid allocations when using AVBPrint

2024-03-23 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegutils.c | 21 + 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/libavcodec/mpegutils.c b/libavcodec/mpegutils.c index fc3e270631..7f499b3d0f 100644 --- a/libavcodec/mpegutils.c +++ b/libavcodec/mpegutils.c @@

Re: [FFmpeg-devel] [PATCH] avfilter: propagate colorspace and color_range from buffer filter and between AVFilterLink.

2024-03-23 Thread Niklas Haas
On Fri, 22 Mar 2024 22:02:39 +0100 Damiano Galassi wrote: > There two new fields were never sent down the filter chain, and no filter > after the first had colorspace and color_range set, causing breakage in > zscale and possible other filters. > --- > libavfilter/avfilter.c | 4 >

Re: [FFmpeg-devel] [PATCH v3] configure: Explicitly check for static_assert, _Static_assert

2024-03-23 Thread Andreas Rheinhardt
Andreas Rheinhardt: > C11 provides static assertions via _Static_assert and > provides static_assert as a convenience define for this > in assert.h. Our codebase uses the latter, as _Static_assert > has actually already been deprecated in C23. > > Not all toolchains that declare support for C11

Re: [FFmpeg-devel] [PATCH 1/6] avfilter/af_channelmap: fix error message if FL source channel was missing

2024-03-23 Thread Marton Balint
On Tue, 19 Mar 2024, Marton Balint wrote: FL channel ID is 0, so for an unset value we must check for ID < 0. Regression since 1f96db959c1235bb7079d354e09914a0a2608f62. Will apply the series soon. Regards, Marton Signed-off-by: Marton Balint --- libavfilter/af_channelmap.c | 4 ++-- 1

Re: [FFmpeg-devel] [PATCH] avformat/mov_chan: respect channel order when parsing and creating chan atom

2024-03-23 Thread Marton Balint
On Mon, 18 Mar 2024, Marton Balint wrote: On Mon, 18 Mar 2024, Andreas Rheinhardt wrote: Marton Balint: Previously we always assumed that the channels are in native order, even if they were not. The new channel layout API allows us to signal the proper channel order, so let's do

[FFmpeg-devel] [PATCH v2 2/2] avutil/timestamp: change precision of av_ts_make_time_string()

2024-03-23 Thread Marton Balint
By calling the av_ts_make_time_string2() from the function we can fix the precision issue. Signed-off-by: Marton Balint --- libavutil/timestamp.h| 4 +--- tests/ref/fate/filter-metadata-scdet | 12 ++-- tests/ref/fate/filter-metadata-silencedetect | 2

[FFmpeg-devel] [PATCH v2 1/2] avutil/timestamp: introduce av_ts_make_time_string2 for better precision

2024-03-23 Thread Marton Balint
av_ts_make_time_string() used "%.6g" format, but this format was losing precision even when the timestamp to be printed was not that large. For example for 3 hours (10800) seconds, only 1 decimal digit was printed, which made this format inaccurate when it was used in e.g. the silencedetect

Re: [FFmpeg-devel] [PATCH 3/4] doc/muxers: add gxf

2024-03-23 Thread Stefano Sabatini
On date Wednesday 2024-03-20 17:47:31 +0100, Andreas Rheinhardt wrote: > Stefano Sabatini: > > --- > > doc/muxers.texi | 10 ++ > > 1 file changed, 10 insertions(+) > > > > diff --git a/doc/muxers.texi b/doc/muxers.texi > > index d9dd72e613..25d1a5907e 100644 > > --- a/doc/muxers.texi >

Re: [FFmpeg-devel] Add protocol for Android content providers (v4)

2024-03-23 Thread Matthieu Bouron
On Tue, Mar 19, 2024 at 06:49:43PM +0100, Matthieu Bouron wrote: > On Sun, Mar 17, 2024 at 11:28:31PM +0100, Matthieu Bouron wrote: > > Diff with previous iteration: > > - rebaed on latest master > > - applied feedback from Zhao (removed HAVE_SETMODE block, use a typedef > > struct, > > check

Re: [FFmpeg-devel] [PATCH v2] Changelog: Add libtorch

2024-03-23 Thread Stefano Sabatini
On date Thursday 2024-03-21 10:46:30 +0800, wenbin.chen-at-intel@ffmpeg.org wrote: > From: Wenbin Chen > > Signed-off-by: Wenbin Chen > --- > Changelog | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Changelog b/Changelog > index e3ca52430c..4af55ff537 100644 > --- a/Changelog >

Re: [FFmpeg-devel] [PATCH 10/12] lavc/encode: map AVCodecContext.decoded_side_data to coded_side_data

2024-03-23 Thread Anton Khirnov
Quoting James Almer (2024-03-23 03:33:13) > Why does this test change? And is it just the order or side data in the > output frame? Yes, just the order. And the test is being removed, so it doesn't matter either way. -- Anton Khirnov ___ ffmpeg-devel

Re: [FFmpeg-devel] [PATCH 06/12] fftools/ffmpeg_dec: apply cropping manually

2024-03-23 Thread Anton Khirnov
Quoting James Almer (2024-03-23 03:53:26) > On 3/22/2024 5:28 PM, Anton Khirnov wrote: > > lavfi does not require aligned buffers, so we can safely apply top/left > > cropping by any amount, without passing any special flags to lavc. > > Longer term, an even better solution would probably be