[FFmpeg-devel] [PATCH WIP 4/5] avcodec/hevc/sei: Add support for alpha channel information

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc/sei.c | 30 ++ libavcodec/hevc/sei.h | 14 ++ 2 files changed, 44 insertions(+) diff --git a/libavcodec/hevc/sei.c b/libavcodec/hevc/sei.c index e11a33773c..56983fe96e 100644 --- a/libavcodec/hevc/sei.c +++ b/libavcode

[FFmpeg-devel] [PATCH WIP 2/5] avcodec/hevc: Rewrite scalability_mask_flag parse in decode_vps_ext

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili Remove a for loop and make it easy to extend to support other types of scalability. --- libavcodec/hevc/hevc.h | 10 +- libavcodec/hevc/ps.c | 25 +++-- libavcodec/hevc/ps.h | 2 ++ 3 files changed, 22 insertions(+), 15 deletions(-) diff --git a

[FFmpeg-devel] [PATCH WIP 5/5] avcodec/hevc: Add alpha layer support

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili --- libavcodec/hevc/hevcdec.c | 75 ++- libavcodec/hevc/hevcdec.h | 2 ++ libavcodec/hevc/refs.c| 10 +- 3 files changed, 85 insertions(+), 2 deletions(-) diff --git a/libavcodec/hevc/hevcdec.c b/libavcodec/hevc/hevcdec.c index be35a

[FFmpeg-devel] [PATCH WIP 3/5] avcodec/hevc/ps: Add basic HEVC_SCALABILITY_AUXILIARY support

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili Only implementing what's needed for HEVC with alpha. --- libavcodec/hevc/ps.c | 64 +--- libavcodec/hevc/ps.h | 1 + 2 files changed, 43 insertions(+), 22 deletions(-) diff --git a/libavcodec/hevc/ps.c b/libavcodec/hevc/ps.c index 5b1bcd

[FFmpeg-devel] [PATCH WIP 1/5] avcodec/hevc: Move ScalabilityMask to hevc header file

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili So it can be used in hevc decoder. --- libavcodec/hevc/hevc.h | 7 +++ libavcodec/hevc/ps.c | 8 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/hevc/hevc.h b/libavcodec/hevc/hevc.h index 8bd59142db..eae28b3b04 100644 --- a/libavcodec/hev

[FFmpeg-devel] [PATCH WIP 0/5] avcodec/hevc: Add alpha video decoding support

2024-12-10 Thread Zhao Zhili
From: Zhao Zhili What works: 1. Create a sample with macOS videotoolbox ffmpeg -i base.mp4 -i alpha.mp4 \ -c:v hevc_videotoolbox -alpha_quality 0.5 -b:v 2M \ -filter_complex '[0:v]scale,format=bgra[v0];[1:v]scale=640x480,format=gray[v1];[v0][v1]alphamerge[v2]' \ -map '

[FFmpeg-devel] [PATCH 1/5] avutil/channel_layout: add a 9.1.6 layout

2024-12-10 Thread James Almer
Signed-off-by: James Almer --- doc/utils.texi| 2 ++ libavutil/channel_layout.c| 1 + libavutil/channel_layout.h| 2 ++ tests/ref/fate/channel_layout | 1 + 4 files changed, 6 insertions(+) diff --git a/doc/utils.texi b/doc/utils.texi index eb5ccc8355..9c50dac949 100644 -

Re: [FFmpeg-devel] [PATCH v2] libavformat/mpegts: demux DVB VBI data

2024-12-10 Thread Scott Theisen
On 12/8/24 17:04, Marton Balint wrote: On Sun, 8 Dec 2024, Scott Theisen wrote: On 12/3/24 17:23, Marton Balint wrote:   On Tue, 3 Dec 2024, Marton Balint wrote:   On Sat, 30 Nov 2024, Scott Theisen wrote:   DVB VBI data is defined in ETSI EN 301 775 and can include EBU teletext   data   as

Re: [FFmpeg-devel] [PATCH 5/7] avformat/mpegts: add s337m support

2024-12-10 Thread Scott Theisen
On 12/8/24 22:55, Michael Niedermayer wrote: On Wed, Dec 04, 2024 at 03:14:07PM +0100, ffnicol...@sfr.fr wrote: From: Nicolas Gaullier Move s302m decoder from avcodec to avformat. Set AVSTREAM_PARSE_FULL for s337m support. Signed-off-by: Nicolas Gaullier --- libavformat/mpegts.c | 138 +++

Re: [FFmpeg-devel] [PATCH v2 05/16] swscale/utils: read dynamic HDR10+ metadata from AVFrame

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:04PM +0100, Niklas Haas wrote: > From: Niklas Haas > > Logic ported from libplacebo's AVFrame helpers. The basic idea is to use the > provided MaxRGB/MaxSCL values to infer what the actual luminance would have > been, which HDR10+ metadata does not provide direct

Re: [FFmpeg-devel] [PATCH v2 06/16] swscale/utils: add helper function to infer colorspace metadata

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:05PM +0100, Niklas Haas wrote: > From: Niklas Haas > > Logic is loosely on equivalent decisions in libplacebo. The basic idea is to > try > and be a bit conservative by treating AVCOL_*_UNSPECIFIED as a no-op, unless > the > other primaries set are non-standard

Re: [FFmpeg-devel] [PATCH v2 07/16] swscale/utils: fix XYZ primaries tagging

2024-12-10 Thread Michael Niedermayer
On Fri, Dec 06, 2024 at 03:32:06PM +0100, Niklas Haas wrote: > From: Niklas Haas > > Swscale currently handles XYZ by embedding a forced conversion to > BT.709 RGB with a hardcoded matrix. This is not ideal, but to preserve the > status quo and avoid any unexpected changes in behavior, this patch

Re: [FFmpeg-devel] [PATCH v2 08/16] swscale: add ICC intent enum and option

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:07PM +0100, Niklas Haas wrote: > From: Niklas Haas > > This setting can be used to infuence the type of tone and gamut mapping used > internally when color space conversions are required. As discussed at VDD'24, > the default was set to relative colorimetric clip

Re: [FFmpeg-devel] [PATCH v2 03/16] swscale/utils: set static/implied HDR metadata

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:02PM +0100, Niklas Haas wrote: > From: Niklas Haas > > Provide default values for the fields added in the previous commit. > --- > libswscale/utils.c | 21 + > 1 file changed, 21 insertions(+) > > diff --git a/libswscale/utils.c b/libswscale

Re: [FFmpeg-devel] [PATCH v2 16/16] swscale: remove primaries/trc change warning

2024-12-10 Thread Michael Niedermayer
On Fri, Dec 06, 2024 at 03:32:15PM +0100, Niklas Haas wrote: > From: Niklas Haas > > This is now supported when using the new API. > --- > libswscale/swscale.c | 11 --- > 1 file changed, 11 deletions(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC78

Re: [FFmpeg-devel] [PATCH v2 01/16] swscale/utils: check for supported color transfers

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:00PM +0100, Niklas Haas wrote: > From: Niklas Haas > > We will use the av_csp_itu_eotf() functions to decode these internally, so > check this function to see if it succeeds. > --- > libswscale/utils.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-

Re: [FFmpeg-devel] [PATCH] libavcodec/mpegaudio_parser.c: differentiate MPEG audio dual mono

2024-12-10 Thread Scott Theisen
On 12/10/24 19:16, James Almer wrote: On 12/10/2024 9:06 PM, Scott Theisen wrote: On 12/9/24 02:30, Anton Khirnov wrote: Quoting James Almer (2024-11-30 14:41:20) On 11/14/2024 1:37 AM, Scott Theisen wrote: When attempting to upstream this MythTV change in September 2022, it was recommended t

Re: [FFmpeg-devel] [PATCH] libavcodec/mpegaudio_parser.c: differentiate MPEG audio dual mono

2024-12-10 Thread James Almer
On 12/10/2024 9:06 PM, Scott Theisen wrote: On 12/9/24 02:30, Anton Khirnov wrote: Quoting James Almer (2024-11-30 14:41:20) On 11/14/2024 1:37 AM, Scott Theisen wrote: When attempting to upstream this MythTV change in September 2022, it was recommended to use AV_CHANNEL_ORDER_CUSTOM with two

Re: [FFmpeg-devel] [PATCH v2 02/16] swscale/utils: add HDR metadata to SwsFormat

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:01PM +0100, Niklas Haas wrote: > From: Niklas Haas > > Only add the condensed values that we actually care about. Group them into > a new struct to make it easier to discard or replace this metadata. > > Define a special comparison function that does not choke o

Re: [FFmpeg-devel] [PATCH v2 04/16] swscale/utils: read HDR mastering metadata from AVFrame

2024-12-10 Thread Michael Niedermayer
On Fri, Dec 06, 2024 at 03:32:03PM +0100, Niklas Haas wrote: > From: Niklas Haas > > --- > libswscale/utils.c | 18 ++ > 1 file changed, 18 insertions(+) should be ok thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you think the mosad

[FFmpeg-devel] [PATCHv2 1/2] avformat/iff: SndAnim decoding

2024-12-10 Thread Peter Ross
Fixes ticket #5553. --- Additional hardening thanks to target_dem_fuzzer.c libavformat/iff.c | 311 +++--- 1 file changed, 210 insertions(+), 101 deletions(-) diff --git a/libavformat/iff.c b/libavformat/iff.c index 7601baa629..ab0488dd31 100644 --- a/liba

[FFmpeg-devel] [PATCHv2 2/2] tests/fate/demux: IFF test case

2024-12-10 Thread Peter Ross
--- Test file: https://pross.sdf.org/sandpit/Hammer2.sndanim tests/fate/demux.mak | 3 +++ tests/ref/fate/iff-demux | 32 2 files changed, 35 insertions(+) create mode 100644 tests/ref/fate/iff-demux diff --git a/tests/fate/demux.mak b/tests/fate/demux.mak

Re: [FFmpeg-devel] [PATCH] avcodec: uninit hwaccel in case of software decoder

2024-12-10 Thread Anton Khirnov
Hi, Quoting Thomas Guillem via ffmpeg-devel (2024-11-29 11:44:21) > avcodec_get_hw_frames_parameters(), called by the user from get_format, > is allocating ctx->internal->hwaccel_priv_data. But the hardware > decoding setup may fail on the user side and it may fallback to software > decoding. In th

Re: [FFmpeg-devel] [PATCH v3 1/2] checkasm/rv40dsp: cover more cases

2024-12-10 Thread Ronald S. Bultje
Hi, On Thu, Dec 5, 2024 at 8:49 AM Ronald S. Bultje wrote: > Hi, > > On Thu, Dec 5, 2024 at 8:41 AM wrote: > >> From: sunyuechi >> >> Co-Authored-By: Ronald S. Bultje >> --- >> tests/checkasm/rv40dsp.c | 10 +- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/tes

Re: [FFmpeg-devel] [PATCH v3 2/2] lavc/rv40dsp: fix RISC-V chroma_mc

2024-12-10 Thread Ronald S. Bultje
Hi, On Fri, Dec 6, 2024 at 2:24 PM Rémi Denis-Courmont wrote: > > > Le 6 décembre 2024 13:19:29 GMT+01:00, Niklas Haas a > écrit : > >On Thu, 05 Dec 2024 21:41:51 +0800 uk7b-at-foxmail@ffmpeg.org wrote: > >> From: sunyuechi > >> > >> --- > >> libavcodec/riscv/rv40dsp_rvv.S | 116 +

Re: [FFmpeg-devel] [PATCH v2 1/6] Update R-V V vvc_mc vset to support more lengths

2024-12-10 Thread Nuo Mi
Hi Yuechi, The performance is good. There are many similar .if blocks in vsetvlstatic8, vsetvlstatic16, and vsetvlstatic32. Could we define an intermediate macro, vsetvlstatic, and use it to implement the above macros? like: .macro vsetvlstatic8 w, vlen vsetvlstatic 8, w, vlen, mf8, m

Re: [FFmpeg-devel] [PATCH v2 1/6] Update R-V V vvc_mc vset to support more lengths

2024-12-10 Thread flow gg
Thank you, this approach can indeed address similar if else scenarios. vsetvlstatic \w, \vlen, e8, mf8, mf4, mf2, m1, m2, m4 vsetvlstatic \w, \vlen, e16, mf4, mf2, m1, m2, m4, m8 vsetvlstatic \w, \vlen, e32, mf2, m1, m2, m4, m8, m8 I plan to submit it after this patch set gets merged. Nuo Mi 于2

Re: [FFmpeg-devel] [PATCH] essim patch

2024-12-10 Thread Michael Niedermayer
Hi Andrea I havnt really followed your gsoc work so in case some of my comments below differs from your mentor(s), please point that out to me. also maybe your mentors can do a full review (in CC) as it seems noone else has reviewed your patch. thx On Thu, Dec 05, 2024 at 06:59:29PM +0100, Andr

Re: [FFmpeg-devel] [PATCH 4/6] lavc/vvc: Fix scaling matrix DC coef derivation

2024-12-10 Thread Nuo Mi
Hi Frank, Thank you for the detail Applied. On Sat, Nov 30, 2024 at 6:11 PM Frank Plowman wrote: > Hi, > > Thank you very much for the review. Responses inline. > > On 30/11/2024 06:39, Nuo Mi wrote: > > Hi Frank, > > Thank you for the patch set; I will apply it except for this one > > > > On F

[FFmpeg-devel] [PATCH 1/2] avformat/hevc: add support for writing alpha layer

2024-12-10 Thread Timo Rothenpieler
--- libavformat/hevc.c | 138 - 1 file changed, 123 insertions(+), 15 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 7cf0b0ffb2..50e7f91bd2 100644 --- a/libavformat/hevc.c +++ b/libavformat/hevc.c @@ -82,6 +82,8 @@ typedef struc

[FFmpeg-devel] [PATCH 2/2] avcodec/libx265: add alpha layer encoding support

2024-12-10 Thread Timo Rothenpieler
--- libavcodec/libx265.c | 51 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c index 63cc497f83..1bf2068f36 100644 --- a/libavcodec/libx265.c +++ b/libavcodec/libx265.c @@ -42,6 +42,14 @@ #inc

Re: [FFmpeg-devel] [PATCH 1/2] avformat/hevc: add support for writing alpha layer

2024-12-10 Thread James Almer
On 12/10/2024 4:16 PM, Timo Rothenpieler wrote: --- libavformat/hevc.c | 138 - 1 file changed, 123 insertions(+), 15 deletions(-) diff --git a/libavformat/hevc.c b/libavformat/hevc.c index 7cf0b0ffb2..50e7f91bd2 100644 --- a/libavformat/hevc.c +++

[FFmpeg-devel] [PATCH 4/5] avformat/iamf_writer: add support for expanded channel layouts

2024-12-10 Thread James Almer
Defined in Immersive Audio Model and Formats 1.1.0, sections 3.6.2 and 3.7.3 Signed-off-by: James Almer --- libavformat/iamf_writer.c | 21 + 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/libavformat/iamf_writer.c b/libavformat/iamf_writer.c index 7703729e07.

[FFmpeg-devel] [PATCH 3/5] avformat/iamf_parse: add support for expanded channel layouts

2024-12-10 Thread James Almer
Defined in Immersive Audio Model and Formats 1.1.0, sections 3.6.2 and 3.7.3 Signed-off-by: James Almer --- libavformat/iamf.c | 62 +++- libavformat/iamf.h | 4 ++- libavformat/iamf_parse.c | 7 - 3 files changed, 70 insertions(+), 3 deletio

[FFmpeg-devel] [PATCH 2/5] avutil/channel_layout: simplify the 22.2 layout definition

2024-12-10 Thread James Almer
Signed-off-by: James Almer --- libavutil/channel_layout.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h index 4e0be7bed2..5ec09f10b1 100644 --- a/libavutil/channel_layout.h +++ b/libavutil/channel_layout.h @@ -252,7 +25

[FFmpeg-devel] [PATCH 5/5] fate/iamf: add a test for expanded layouts

2024-12-10 Thread James Almer
Signed-off-by: James Almer --- tests/fate/iamf.mak | 10 + tests/filtergraphs/iamf_9_1_6 | 9 + tests/ref/fate/iamf-9_1_6 | 635 ++ tests/streamgroups/audio_element-9_1_6| 3 + tests/streamgroups/mix_presentation-9_1_6

Re: [FFmpeg-devel] [PATCH v2] checkasm: vvc: Use checkasm_check for printing failing output

2024-12-10 Thread Martin Storsjö
On Mon, 9 Dec 2024, Ronald S. Bultje wrote: On Mon, Dec 9, 2024 at 5:02 PM Martin Storsjö wrote: Share the checkasm_check_pixel macro from hevc_pel in checkasm.h, to allow other tests to use the same. (To use it in other tests, those tests need to have a similar setup fo

Re: [FFmpeg-devel] [PATCH 1/2] aarch64/vvc: Fix clip in alf

2024-12-10 Thread Nuo Mi
On Tue, Dec 10, 2024 at 3:35 PM Martin Storsjö wrote: > On Tue, 10 Dec 2024, Zhao Zhili wrote: > > > From: Zhao Zhili > > > > Fix test failure: > > ./tests/checkasm/checkasm --test=vvc_alf 3607569773 > > --- > > libavcodec/aarch64/vvc/alf.S | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletio

Re: [FFmpeg-devel] [PATCH v2 09/16] avfilter/vf_scale: add colorspace and transfer property options

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:08PM +0100, Niklas Haas wrote: > From: Niklas Haas > > In the long run, it would be ideal if we could add these to the avfilter > negotiation as well, but for now, this is a good start. > --- > doc/filters.texi | 56 +++ > libav

Re: [FFmpeg-devel] [PATCH v2 13/16] swscale/lut3d: add 3DLUT dispatch system

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:12PM +0100, Niklas Haas wrote: > From: Niklas Haas > > This is a lightweight wrapper around the underlying color management system, > whose job it is merely to manage the 3DLUT state and apply them to the frame > data. This is where we might add platform-specific

Re: [FFmpeg-devel] [PATCH v2 14/16] swscale/graph: add color mapping pass

2024-12-10 Thread Michael Niedermayer
Hi On Fri, Dec 06, 2024 at 03:32:13PM +0100, Niklas Haas wrote: > From: Niklas Haas > > This leverages the previously introduced color management subsystem in order > to adapt between transfer functions and color spaces, as well as for HDR tone > mapping. > > Take special care to handle graysca

Re: [FFmpeg-devel] [PATCH] libavcodec/mpegaudio_parser.c: differentiate MPEG audio dual mono

2024-12-10 Thread Scott Theisen
On 12/9/24 02:31, Anton Khirnov wrote: Quoting Scott Theisen (2024-11-30 08:38:54) On 11/25/24 00:42, Anton Khirnov wrote: Quoting Scott Theisen (2024-11-14 05:37:49) @@ -85,7 +85,13 @@ static int mpegaudio_parse(AVCodecParserContext *s1, if (s->header_count > header_thr

Re: [FFmpeg-devel] [PATCH 5/7] avformat/mpegts: add s337m support

2024-12-10 Thread Martin Storsjö
On Tue, 10 Dec 2024, Scott Theisen wrote: ff_* symbols are not exported and are internal to each library. Some of the other libraries `#include "libavutil/reverse.c"` in a file.  Should ff_reverse be renamed avpriv_reverse so that is not necessary? No, this is intentionally done this way. If

[FFmpeg-devel] [PATCH v2] avformat/mov: don't reallocate extradata when converting dvdsub palette

2024-12-10 Thread Marth64
After introduction of ff_dvdclut_palette_extradata_cat() to convert DVD subtitle palettes from YUV to RGB, a leak is introduced because of the call to ff_alloc_extradata(). This is not necessary, instead we should free the extradata because ff_bprint_to_codecpar_extradata() will finalize the bprint

Re: [FFmpeg-devel] [PATCH] libavcodec/mpegaudio_parser.c: differentiate MPEG audio dual mono

2024-12-10 Thread Scott Theisen
On 12/9/24 02:30, Anton Khirnov wrote: Quoting James Almer (2024-11-30 14:41:20) On 11/14/2024 1:37 AM, Scott Theisen wrote: When attempting to upstream this MythTV change in September 2022, it was recommended to use AV_CHANNEL_ORDER_CUSTOM with two AV_CHAN_FRONT_CENTER channels. See https://p

Re: [FFmpeg-devel] [PATCH] avcodec: uninit hwaccel in case of software decoder

2024-12-10 Thread Thomas Guillem via ffmpeg-devel
Hi, On Tue, Dec 10, 2024, at 19:29, Anton Khirnov wrote: > Hi, > Quoting Thomas Guillem via ffmpeg-devel (2024-11-29 11:44:21) >> avcodec_get_hw_frames_parameters(), called by the user from get_format, >> is allocating ctx->internal->hwaccel_priv_data. But the hardware >> decoding setup may fail o