Re: [FFmpeg-devel] [PATCH 1/2] avcodec/aarch64/vvc: Optimize vvc_avg{8, 10, 12}

2025-02-19 Thread Zhao Zhili
> On Feb 20, 2025, at 01:40, Krzysztof Pyrkosz via ffmpeg-devel > wrote: > > --- > > This patch replaces integer widening with halving addition, and > multi-step "emulated" rounding shift with a single asm instruction doing > exactly that. This pattern repeats in other functions in this file

Re: [FFmpeg-devel] [PATCH] tests: Add fate-hevc-alpha

2025-02-19 Thread Zhao Zhili
Please put alpha.mp4 under hevc directory. md5sum alpha.mp4 738f66421c736aedda547529156cbe35 alpha.mp4 https://drive.google.com/file/d/17PcD8Re_JNTKDkOhChnV9l65T9k1j1WL/view?usp=drive_link > On Feb 20, 2025, at 12:35, Zhao Zhili wrote: > > From: Zhao Zhili > > --- > tests/fate/hevc.mak

[FFmpeg-devel] [PATCH] tests: Add fate-hevc-alpha

2025-02-19 Thread Zhao Zhili
From: Zhao Zhili --- tests/fate/hevc.mak | 3 +++ tests/ref/fate/hevc-alpha | 55 +++ 2 files changed, 58 insertions(+) create mode 100644 tests/ref/fate/hevc-alpha diff --git a/tests/fate/hevc.mak b/tests/fate/hevc.mak index c74bc06085..e432345ef7 10

[FFmpeg-devel] [PATCH 09/12] avfilter/vf_alphamerge: tag correct alpha mode

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- libavfilter/vf_alphamerge.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index f5779484a9..98c61e282d 100644 --- a/libavfilter/vf_alphamerge.c +++ b/libavfilter/vf_alphamerge.c @@ -85,6 +85,8 @@ static int d

[FFmpeg-devel] [PATCH 04/12] avcodec/avcodec: add AVCodecContext.alpha_mode

2025-02-19 Thread Niklas Haas
From: Niklas Haas Following in the footsteps of the previous commit, this commit adds the new fields to AVCodecContext so we can start properly setting it on codecs, as well as limiting the list of supported options to detect a format mismatch during encode. This commit also sets up the necessar

[FFmpeg-devel] [PATCH 05/12] avcodec/encode: enforce alpha mode compatibility at encode time

2025-02-19 Thread Niklas Haas
From: Niklas Haas Error out if trying to encode frames with an incompatible alpha mode. --- libavcodec/encode.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index cd10dcf3cd..4e05932e9f 100644 --- a/libavcodec/encode.c

Re: [FFmpeg-devel] [RFC] Experiment: enable github pull requests

2025-02-19 Thread Leandro Santiago
Hi devs, I'm been following the discussion but not taking part on it. I've just created a WIP PR on the forgejo instance which I'd like to get review, in case the instance is ready for the experiment. Please let me know if you prefer that I send the changes via the mailing list instead, in case

[FFmpeg-devel] [PATCH 07/12] fftools/ffmpeg_enc: forward frame alpha mode to encoder

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- fftools/ffmpeg_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fftools/ffmpeg_enc.c b/fftools/ffmpeg_enc.c index a46af4dce1..18a0733773 100644 --- a/fftools/ffmpeg_enc.c +++ b/fftools/ffmpeg_enc.c @@ -271,6 +271,7 @@ int enc_open(void *opaque, const AVFrame *frame

[FFmpeg-devel] [PATCH 08/12] avfilter/vf_premultiply: tag correct alpha mode on result

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- libavfilter/vf_premultiply.c | 8 1 file changed, 8 insertions(+) diff --git a/libavfilter/vf_premultiply.c b/libavfilter/vf_premultiply.c index 322fc39094..1c08cf524a 100644 --- a/libavfilter/vf_premultiply.c +++ b/libavfilter/vf_premultiply.c @@ -512,6 +512,7 @@

Re: [FFmpeg-devel] [PATCH 04/12] avcodec/avcodec: add AVCodecContext.alpha_mode

2025-02-19 Thread Niklas Haas
On Wed, 19 Feb 2025 18:04:18 -0300 James Almer wrote: > On 2/19/2025 5:45 PM, Niklas Haas wrote: > > From: Niklas Haas > > > > Following in the footsteps of the previous commit, this commit adds the > > new fields to AVCodecContext so we can start properly setting it on codecs, > > as well as lim

Re: [FFmpeg-devel] [PATCH 04/12] avcodec/avcodec: add AVCodecContext.alpha_mode

2025-02-19 Thread James Almer
On 2/19/2025 5:45 PM, Niklas Haas wrote: From: Niklas Haas Following in the footsteps of the previous commit, this commit adds the new fields to AVCodecContext so we can start properly setting it on codecs, as well as limiting the list of supported options to detect a format mismatch during enc

[FFmpeg-devel] [PATCH 06/12] avcodec/png: set correct alpha mode

2025-02-19 Thread Niklas Haas
From: Niklas Haas PNG always uses straight alpha. --- libavcodec/pngdec.c | 5 + libavcodec/pngenc.c | 6 ++ 2 files changed, 11 insertions(+) diff --git a/libavcodec/pngdec.c b/libavcodec/pngdec.c index b9c997ab0e..d2a61d3bce 100644 --- a/libavcodec/pngdec.c +++ b/libavcodec/pngdec.c @

[FFmpeg-devel] [PATCH 11/12] avfilter/vf_setparams: add alpha_mode parameter

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- doc/filters.texi | 13 + libavfilter/vf_setparams.c | 10 ++ 2 files changed, 23 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index fa23c10b2d..6e8272fd81 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -22231,6 +2223

[FFmpeg-devel] [PATCH 03/12] avfilter/vf_showinfo: print alpha mode when relevant

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- libavfilter/vf_showinfo.c | 8 1 file changed, 8 insertions(+) diff --git a/libavfilter/vf_showinfo.c b/libavfilter/vf_showinfo.c index 8109ca7fce..c658cdcc3e 100644 --- a/libavfilter/vf_showinfo.c +++ b/libavfilter/vf_showinfo.c @@ -875,6 +875,14 @@ static int fi

[FFmpeg-devel] [PATCH 12/12] avfilter/vf_libplacebo: add an alpha_mode setting

2025-02-19 Thread Niklas Haas
From: Niklas Haas Chooses the desired output alpha mode. Note that this depends on an upstream version of libplacebo new enough to respect the corresponding AVFrame field in pl_map_avframe_ex. --- doc/filters.texi| 4 libavfilter/vf_libplacebo.c | 13 + 2 files chan

[FFmpeg-devel] [PATCH 10/12] avfilter/vf_overlay: respect alpha mode tagging by default

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- doc/filters.texi | 3 +- libavfilter/vf_overlay.c | 199 -- libavfilter/vf_overlay.h | 4 +- libavfilter/x86/vf_overlay_init.c | 8 +- 4 files changed, 116 insertions(+), 98 deletions(-) diff --git a/doc/

[FFmpeg-devel] [PATCH 01/12] avutil/frame: add AVFrame.alpha_mode

2025-02-19 Thread Niklas Haas
From: Niklas Haas FFmpeg currently handles alpha in a quasi-arbitrary way. Some filters/codecs assume alpha is premultiplied, others assume it is independent. If there is to be any hope for order in this chaos, we need to start by defining an enum for the possible range of values. --- doc/APIcha

Re: [FFmpeg-devel] [PATCH] lavc/vvc: Fix derivation of inverse LMCS idx

2025-02-19 Thread Frank Plowman
Ping On 02/02/2025 12:10, Frank Plowman wrote: > The clamping of idxYInv from H.266(V3) section 8.8.2.3 was missing. > This could lead to OOB reads from lmcs->pivot or input_pivot. > > I also changed the derivation of the forward LMCS idx to use a shift > rather than a division for speed and as t

[FFmpeg-devel] [PATCH v2 1/2] lavc/vvc: Fix slice map construction for small subpics

2025-02-19 Thread Frank Plowman
In the case pps_subpic_less_than_one_tile_slice is called, the subpicture is smaller than the tile and so there are multiple subpictures in the tile. Of course, then, not all the subpictures can start in the top-left corner as the code before the patch does. Patch fixes this, so each subpicture s

[FFmpeg-devel] [PATCH v2 2/2] lavc/vvc: Ensure subpictures don't overlap

2025-02-19 Thread Frank Plowman
This is essentially a re-implementation of https://patchwork.ffmpeg.org/project/ffmpeg/patch/20241005223955.54158-1-p...@frankplowman.com/ That patch was not applied last time. Instead we opted to identify issues which could be caused by invalid subpicture layouts and remedy those issues where th

Re: [FFmpeg-devel] [PATCH 2/2] lavc/vvc: Ensure subpictures don't overlap

2025-02-19 Thread Frank Plowman
Hi, Thanks for your review. On 16/02/2025 15:19, Nuo Mi wrote: > Hi Frank, > Thank you for the patch. > > On Sun, Feb 9, 2025 at 11:45 PM Frank Plowman wrote: > >> This is essentially a re-implementation of >> >> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20241005223955.54158-1-p...@fra

[FFmpeg-devel] [PATCH 2/2] docs: Add documentation about YAML output writer

2025-02-19 Thread softworkz
From: softworkz Signed-off-by: softworkz --- doc/ffprobe.texi | 16 1 file changed, 16 insertions(+) diff --git a/doc/ffprobe.texi b/doc/ffprobe.texi index ceedc8793b..106d865e18 100644 --- a/doc/ffprobe.texi +++ b/doc/ffprobe.texi @@ -626,6 +626,22 @@ This option automaticall

[FFmpeg-devel] [PATCH 1/2] fftools/ffprobe: Add YAML output writer

2025-02-19 Thread softworkz
From: softworkz Signed-off-by: softworkz --- fftools/ffprobe.c | 147 +- 1 file changed, 146 insertions(+), 1 deletion(-) diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c index 0270878ead..843c8df7f3 100644 --- a/fftools/ffprobe.c +++ b/fftools/ffp

[FFmpeg-devel] [PATCH 0/2] fftools/ffprobe: Add YAML output writer

2025-02-19 Thread ffmpegagent
fftools/ffprobe: Add YAML output writer Motivation While YAML might not be the greatest format as such, its strengths are in human readability, probably better than any other format we have currently, which makes it worthwhile to add afaic. softworkz (2): fftools/ffprobe: Add YAML output write

[FFmpeg-devel] [PATCH 2/2] avcodec/aarch64/vvc: Use rounding shift NEON instruction

2025-02-19 Thread Krzysztof Pyrkosz via ffmpeg-devel
--- Before and after on A78 dmvr_8_12x20_neon: 86.2 ( 6.90x) dmvr_8_20x12_neon: 94.8 ( 5.93x) dmvr_8_20x20_neon: 141.5 ( 6.50x) dmvr_12_12x20_neon:158.

Re: [FFmpeg-devel] [PATCH v6 0/9] Properly decode ogg metadata in ogg/{vorbis, flac, opus} chained bitstreams

2025-02-19 Thread Romain Beauxis
Le mer. 19 févr. 2025 à 12:17, Lynne a écrit : > > On 19/02/2025 06:24, Romain Beauxis wrote: > > This is a series of patches to allow proper decoding of ogg metadata in > > chained > > `ogg/vorbis, `ogg/flac` and `ogg/opus` streams. > > > > ## Changes since last version: > > * Metadata update is

[FFmpeg-devel] [PATCH 2/2] avfilter/vf_liplacebo: properly initialize variable

2025-02-19 Thread Niklas Haas
From: Niklas Haas Signed-off-by: Niklas Haas --- libavfilter/vf_libplacebo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index 5592460c16..0b7c0d2bfd 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_l

[FFmpeg-devel] [PATCH 1/2] avfilter/vf_libplacebo: remove deprecated options

2025-02-19 Thread Niklas Haas
From: Niklas Haas These were removed upstream and no longer have had any effect for a while now. Signed-off-by: Niklas Haas --- doc/filters.texi| 13 - libavfilter/vf_libplacebo.c | 9 - 2 files changed, 22 deletions(-) diff --git a/doc/filters.texi b/doc/filt

Re: [FFmpeg-devel] [PATCH v6 0/9] Properly decode ogg metadata in ogg/{vorbis, flac, opus} chained bitstreams

2025-02-19 Thread Lynne
On 19/02/2025 06:24, Romain Beauxis wrote: This is a series of patches to allow proper decoding of ogg metadata in chained `ogg/vorbis, `ogg/flac` and `ogg/opus` streams. ## Changes since last version: * Metadata update is now using a factored out function from the vorbis decoder which includ

Re: [FFmpeg-devel] [PATCH v6 4/9] tests: Add chained ogg/vorbis stream dump test.

2025-02-19 Thread Romain Beauxis
Le mar. 18 févr. 2025 à 23:25, Romain Beauxis a écrit : > > Samples available at: > https://www.dropbox.com/scl/fo/xrtrna2rxr1j354hrtymq/AGwemlxHYecBLNmQ8Fsy--4?rlkey=lzilr4m9w4gfdqygoe172vvy8&dl=0 > > Before the changes: > Stream ID: 0, codec name: vorbis, metadata: encoder=Lavc61.19.100 > libv

[FFmpeg-devel] [PATCH 1/2] avcodec/aarch64/vvc: Optimize vvc_avg{8, 10, 12}

2025-02-19 Thread Krzysztof Pyrkosz via ffmpeg-devel
--- This patch replaces integer widening with halving addition, and multi-step "emulated" rounding shift with a single asm instruction doing exactly that. This pattern repeats in other functions in this file, I fixed some in the succeeding patch. There's a lot of performance to be gained there. I

[FFmpeg-devel] [PATCH] avfilter/vf_libplacebo: switch to AV_OPT_TYPE_COLOR

2025-02-19 Thread Niklas Haas
From: Niklas Haas --- libavfilter/vf_libplacebo.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c index cc07ccd8be..08041f6894 100644 --- a/libavfilter/vf_libplacebo.c +++ b/libavfilter/vf_libplacebo.c

Re: [FFmpeg-devel] [PATCH v2 4/4] fftools/ffmpeg_filter: add -dump_filter_graph option

2025-02-19 Thread Niklas Haas
On Tue, 18 Feb 2025 17:43:35 +0100 epira...@gmail.com wrote: > > > On 18 Feb 2025, at 13:46, Niklas Haas wrote: > > > From: Niklas Haas > > > > Debugging option to dump the filter graph after insertion of auto-filters. > > Named such to avoid clashing with the existing -dumpgraph option on lavfi >

[FFmpeg-devel] [PATCH 1/3] avfilter/vf_libplacebo: switch to new background API

2025-02-19 Thread Niklas Haas
From: Niklas Haas Fixes a deprecation warning, and also fixes a bug where the depredated skip_target_clearing option was not correctly mapped to the new API inside libplacebo upstream. Signed-off-by: Niklas Haas Sponsored-by: nxtedition --- libavfilter/vf_libplacebo.c | 12 ++-- 1 file

[FFmpeg-devel] [PATCH 3/3] avfilter/vf_libplacebo: set colorspace properties on all inputs

2025-02-19 Thread Niklas Haas
From: Niklas Haas There is no reason to only do this on the first input. It doesn't actually matter for now given that we don't constrain the color space list, but it may matter when that changes. Signed-off-by: Niklas Haas --- libavfilter/vf_libplacebo.c | 6 ++ 1 file changed, 2 insertio

[FFmpeg-devel] [PATCH 2/3] avfilter/vf_libplacebo: allow differing formats per input

2025-02-19 Thread Niklas Haas
From: Niklas Haas Each input is entirely independent and can have varying pixel formats, color spaces, etc. To accomplish this, we need to make a full copy of the format list for each subsequent input, rather than sharing the same ref. Signed-off-by: Niklas Haas Sponsored-by: nxtedition --- li

[FFmpeg-devel] [PATCH 1/2] aarch64/hevcdsp_idct_neon: Optimize idct dc

2025-02-19 Thread Zhao Zhili
From: Zhao Zhili clang does better than the assembly code before the patch, especially for small size: hevc_idct_4x4_dc_8_c: 11.2 ( 1.00x) hevc_idct_4x4_dc_8_neon:15.5 ( 0.73x) hevc_idct_4x4_dc_10_c:

[FFmpeg-devel] [PATCH 2/2] aarch64/hevcdsp_idct_neon: Add implementation for idct dc 12

2025-02-19 Thread Zhao Zhili
From: Zhao Zhili Reduce binary size at the same time. The performance compared to clang -O3 is the same. --- libavcodec/aarch64/hevcdsp_idct_neon.S| 43 ++- libavcodec/aarch64/hevcdsp_init_aarch64.c | 8 + 2 files changed, 35 insertions(+), 16 deletions(-) diff --gi

[FFmpeg-devel] [PATCH] doc/metadata.texi: Start documenting keys

2025-02-19 Thread Tomas Härdin
Hi Rather than continue the RFC thread for this, I decided to submit a patch that begins the process of documenting metadata keys. There's quite a lot of keys used in the codebase, and this patch does not cover all of them. But it should give the general idea. I follow a similar approach to that

[FFmpeg-devel] [PATCH 1/2] avformat/hls demuxer: Add WebVTT subtitle support

2025-02-19 Thread softworkz
From: softworkz This add support for WebVTT subtitles in HLS streams. Just like for separate audio streams, it supports all available WebVTT streams in all renditions. No new options are added, it just works and provides subtitles streams like any other demuxer. The code prevents downloading subt

[FFmpeg-devel] [PATCH 2/2] avformat/webvttdec: Add webvtt extension and MIME type

2025-02-19 Thread softworkz
From: softworkz The webvtt extension is sometimes used in HLS playlists. Signed-off-by: softworkz --- libavformat/webvttdec.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavformat/webvttdec.c b/libavformat/webvttdec.c index 6e60348764..6feda1585e 100644 --- a/libavf

[FFmpeg-devel] [PATCH 0/2] avformat/hls demuxer: Add WebVTT subtitle support

2025-02-19 Thread ffmpegagent
This add support for WebVTT subtitles in HLS streams. similar like for separate audio streams, it supports all available WebVTT streams in all renditions. No new options are added, it just works and provides subtitles streams like other demuxers. The code prevents downloading subtitle segments whi

Re: [FFmpeg-devel] [RFC] Documenting metadata keys, informative (non-copied) metadata

2025-02-19 Thread Tomas Härdin
tis 2025-02-18 klockan 18:35 +0100 skrev Marvin S.: > > > On 18 Feb 2025, at 17:56, Tomas Härdin wrote: > > > tor 2025-02-13 klockan 12:54 +0100 skrev Tomas Härdin: > > > Hi > > > > > > In the samples_md5 patch discussion Michael wanted the proposed > > > key > > > to > > > be documented. But i

[FFmpeg-devel] [PATCH] avcodec/ffv1_parser: Rename close to ffv1_close

2025-02-19 Thread Zhao Zhili
From: Zhao Zhili This fixed wasm checkasm failure $ wasm-tools validate tests/checkasm/checkasm error: wasisdk://v25.0/build/sysroot/wasi-libc-wasm32-wasip1-threads/libc-top-half/musl/src/stdio/__stdio_close.c:24:9 function `__stdio_close` failed to validate Caused by: 0: func 4581 failed

[FFmpeg-devel] [PATCH 3/3] fftools: Enable filtergraph printing and update docs

2025-02-19 Thread softworkz
From: softworkz Enables filtergraph printing and adds the options to the docs Signed-off-by: softworkz --- doc/ffmpeg.texi | 10 ++ fftools/ffmpeg.c| 4 fftools/ffmpeg_filter.c | 5 + 3 files changed, 19 insertions(+) diff --git a/doc/ffmpeg.texi b/doc/ffmpe

[FFmpeg-devel] [PATCH 2/3] fftools/ffmpeg_graphprint: Add options for filtergraph printing

2025-02-19 Thread softworkz
From: softworkz The key benefits are: - Different to other graph printing methods, this is outputting: - all graphs with runtime state (including auto-inserted filters) - each graph with its inputs and outputs - all filters with their in- and output pads - all connections between all

[FFmpeg-devel] [PATCH 1/3] fftools/ffmpeg_filter: Move some declaration to new header file

2025-02-19 Thread softworkz
From: softworkz to allow print_graph to access the information. Signed-off-by: softworkz --- fftools/ffmpeg_filter.c | 188 +--- fftools/ffmpeg_filter.h | 232 2 files changed, 233 insertions(+), 187 deletions(-) create mode

[FFmpeg-devel] [PATCH 0/3] print_graphs: Complete Filtergraph Printing

2025-02-19 Thread ffmpegagent
The key benefits are: * Different to other graph printing methods, this is outputting: * all graphs with runtime state (including auto-inserted filters) * each graph with its inputs and outputs * all filters with their in- and output pads * all connections between all input- and

[FFmpeg-devel] [PATCH v3 2/2] libavformat/rtsp: Free memory allocated for temporary variables while processing sdp info

2025-02-19 Thread Rashad Tatum
--- This fixes the av_freep call from the previous patch. libavformat/rtsp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/rtsp.c b/libavformat/rtsp.c index 0c65f8d1a4..ac17717195 100644 --- a/libavformat/rtsp.c +++ b/libavformat/rtsp.c @@ -478,6 +478,7 @@ static void sdp_pars

[FFmpeg-devel] [PATCH v3 1/2] libavformat/rtsp: Make source specific multicast work for rtsp streams

2025-02-19 Thread Rashad Tatum
by first changing the RTSPSource to track the destination address obtained from the source filter. For each RTSPStream, only add the source filter from the sdp if sdp_ip string matches source-filter's destination address. Before issuing the setup request, change the lower_transport to multicast if