[FFmpeg-devel] [PATCH] avformat/mpegtsenc: correct bitstream check

2024-03-15 Thread Gyan Doshi
8559cce3c3 made the bitstream check generic using a LUT. However, one of the comparisons which involves a bitwise AND and equality check is faulty due to operator precedence. First reported and analysed at https://github.com/streamlink/streamlink/issues/5876 Fixes #10908 ---

[FFmpeg-devel] [PATCH 3/3] swscale: [LA] Optimize swscale funcs in input.c

2024-03-15 Thread Shiyou Yin
Optimized 7 funcs with LSX and LASX: 1. yuy2ToUV_c 2. yvy2ToUV_c 3. uyvyToUV_c 4. nv12ToUV_c 5. nv21ToUV_c 6. abgrToA_c 7. rgbaToA_c --- libswscale/loongarch/Makefile | 1 + libswscale/loongarch/input.S | 495 ++ libswscale/loongarch/input_lasx.c

[FFmpeg-devel] [PATCH 2/3] swscale: [LA] Optimize yuv2plane1_8_c.

2024-03-15 Thread Shiyou Yin
--- libswscale/loongarch/output.S | 254 +- libswscale/loongarch/output_lasx.c| 23 +- libswscale/loongarch/output_lsx.c | 22 +- libswscale/loongarch/swscale_init_loongarch.c | 12 +- libswscale/loongarch/swscale_loongarch.h | 29

[FFmpeg-devel] Add optimization in swscale for LA.

2024-03-15 Thread Shiyou Yin
[PATCH 1/3] swscale: [LA] Optimize range convert for yuvj420p. [PATCH 2/3] swscale: [LA] Optimize yuv2plane1_8_c. [PATCH 3/3] swscale: [LA] Optimize swscale funcs in input.c ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH 1/3] swscale: [LA] Optimize range convert for yuvj420p.

2024-03-15 Thread Shiyou Yin
--- libswscale/loongarch/swscale.S| 368 ++ libswscale/loongarch/swscale_init_loongarch.c | 33 ++ libswscale/loongarch/swscale_loongarch.h | 11 + libswscale/swscale_internal.h | 1 + libswscale/utils.c| 6 +-

Re: [FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: force experimental flag for decoders that need it

2024-03-15 Thread Michael Niedermayer
On Fri, Mar 15, 2024 at 08:56:53AM -0300, James Almer wrote: > Otherwise they will not even open. > > Signed-off-by: James Almer > --- > tools/target_dec_fuzzer.c | 2 ++ > 1 file changed, 2 insertions(+) should be ok if it works thx [...] -- Michael GnuPG fingerprint:

[FFmpeg-devel] duplicate symbol '_dec_init' in: fftools/ffmpeg_dec.o

2024-03-15 Thread Helmut K. C. Tessarek
Hello, It's me again - the dude who compiles ffmpeg for macOS... ;-) I haven't updated the referenced libbluray, but only compiled ffmpeg the way I always do. The last time was about 3 days ago and all was good. This is the git hash of ffmpeg I tried to compile: b47abd5737 duplicate symbol

[FFmpeg-devel] [PATCH] libavfilter: add PipeWire-based grab

2024-03-15 Thread François-Simon Fauteux-Chapleau
This is a revised version of the "pipewiregrab" patch submitted by Abhishek Ojha a few months ago: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20231227162504.690730-1-abhishek.o...@savoirfairelinux.com/

[FFmpeg-devel] [PATCH 3/3] fate/atrac: Add atrac->aea, atrac->matroska remux tests

2024-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- tests/fate/atrac.mak| 12 +++- tests/ref/fate/atrac-aea-remux | 94 + tests/ref/fate/atrac-matroska-remux | 94 + 3 files changed, 198 insertions(+), 2 deletions(-) create mode

[FFmpeg-devel] [PATCH 2/3] avformat/aeadec: Use sample rate as time base

2024-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/aeadec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavformat/aeadec.c b/libavformat/aeadec.c index 20170a89b3..be18e7b725 100644 --- a/libavformat/aeadec.c +++ b/libavformat/aeadec.c @@ -25,6 +25,7 @@ #include "avformat.h"

[FFmpeg-devel] [PATCH 1/3] avformat/aeadec: Export title

2024-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/aeadec.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavformat/aeadec.c b/libavformat/aeadec.c index 4cb2da6639..20170a89b3 100644 --- a/libavformat/aeadec.c +++ b/libavformat/aeadec.c @@ -23,6 +23,7 @@

Re: [FFmpeg-devel] [PATCH] avformat: enable UDP IPv6 multicast interface selection

2024-03-15 Thread Rémi Denis-Courmont
Le jeudi 14 mars 2024, 11:22:40 EET Ignjatović, Lazar (RS) a écrit : > avformat: enable UDP IPv6 multicast interface selection > > localaddr option now properly works with IPv6 addresses. Properly resolved > interface index in places where default 0 interface index is used (marked > with TODO:

Re: [FFmpeg-devel] [PATCH] vvcdec: Mark as experimental

2024-03-15 Thread Andreas Rheinhardt
Frank Plowman: > On 15/03/2024 10:22, Kieran Kunhya wrote: >> On Thu, 14 Mar 2024, 22:54 Michael Niedermayer, >> wrote: >> >>> On Wed, Feb 07, 2024 at 10:55:18PM +, Kieran Kunhya wrote: On Wed, 7 Feb 2024 at 22:06, Paul B Mahol wrote: > On Wed, Feb 7, 2024 at 10:13 PM Kieran

Re: [FFmpeg-devel] [PATCH] vvcdec: Mark as experimental

2024-03-15 Thread Frank Plowman
On 15/03/2024 10:22, Kieran Kunhya wrote: > On Thu, 14 Mar 2024, 22:54 Michael Niedermayer, > wrote: > >> On Wed, Feb 07, 2024 at 10:55:18PM +, Kieran Kunhya wrote: >>> On Wed, 7 Feb 2024 at 22:06, Paul B Mahol wrote: >>> On Wed, Feb 7, 2024 at 10:13 PM Kieran Kunhya wrote: >

Re: [FFmpeg-devel] [PATCH 05/26] fate/amrnb: add missing aresample filter dependency

2024-03-15 Thread Andreas Rheinhardt
James Almer: > Signed-off-by: James Almer > --- > tests/fate/amrnb.mak | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/tests/fate/amrnb.mak b/tests/fate/amrnb.mak > index 6f5ed413e3..3eb8b324f3 100644 > --- a/tests/fate/amrnb.mak > +++ b/tests/fate/amrnb.mak > @@

[FFmpeg-devel] [PATCH] avformat/crypto: Avoid cast, use proper printf specifier

2024-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/crypto.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/crypto.c b/libavformat/crypto.c index 75b00020bc..4393fb6399 100644 --- a/libavformat/crypto.c +++ b/libavformat/crypto.c @@ -254,7 +254,7 @@ static int64_t

[FFmpeg-devel] [PATCH] avformat/aeaenc: Fix printf-specifier

2024-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/aeaenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/aeaenc.c b/libavformat/aeaenc.c index 65d018c844..495e98c6a2 100644 --- a/libavformat/aeaenc.c +++ b/libavformat/aeaenc.c @@ -91,7 +91,7 @@ static int

Re: [FFmpeg-devel] [PATCH] avcodec/tests/snowenc: Fix mixed declaration and code

2024-03-15 Thread Sean McGovern
Hi, On Fri, Mar 15, 2024, 10:24 Andreas Rheinhardt < andreas.rheinha...@outlook.com> wrote: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/tests/snowenc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/tests/snowenc.c b/libavcodec/tests/snowenc.c >

[FFmpeg-devel] [PATCH] avcodec/tests/snowenc: Fix mixed declaration and code

2024-03-15 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/tests/snowenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tests/snowenc.c b/libavcodec/tests/snowenc.c index 37198cd4e3..3dad07d3a5 100644 --- a/libavcodec/tests/snowenc.c +++ b/libavcodec/tests/snowenc.c @@

Re: [FFmpeg-devel] [PATCH 01/26] fate/aac: add missing aresample filter dependency

2024-03-15 Thread James Almer
On 3/14/2024 8:00 PM, James Almer wrote: Signed-off-by: James Almer --- tests/fate/aac.mak | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 4f8d1cdcea..817944773d 100644 --- a/tests/fate/aac.mak +++

Re: [FFmpeg-devel] [PATCH v3 2/9] avcodec/av1dec: initialize AFGS1 VSC metadata

2024-03-15 Thread Niklas Haas
On Fri, 15 Mar 2024 09:20:04 -0300 James Almer wrote: > On 3/15/2024 8:58 AM, Niklas Haas wrote: > > From: Niklas Haas > > > > Unused by AV1, but should still be set properly. > > The doxy for av_film_grain_params_alloc() says "Allocate an > AVFilmGrainParams structure and set its fields to

Re: [FFmpeg-devel] [PATCH v3 5/9] avutil/film_grain_params: add av_film_grain_params_select()

2024-03-15 Thread Niklas Haas
On Fri, 15 Mar 2024 12:58:58 +0100 Niklas Haas wrote: > From: Niklas Haas > > Common utility function that can be used by all codecs to select the > right (any valid) film grain parameter set. In particular, this is > useful for AFGS1, which has support for multiple parameters. > > However, it

[FFmpeg-devel] [PATCH v3 9/9] avcodec/hevcdec: apply AOM film grain synthesis

2024-03-15 Thread Niklas Haas
From: Niklas Haas Following the usual logic for H.274 film grain. --- libavcodec/Makefile | 2 +- libavcodec/hevcdec.c | 29 ++--- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 824845276ae..7ef2e03ca6a

[FFmpeg-devel] [PATCH v3 8/9] avcodec/h2645_sei: decode AFGS1 T.35 SEI

2024-03-15 Thread Niklas Haas
From: Niklas Haas I restricted this SEI to HEVC for now, until I see a H.264 sample. --- libavcodec/Makefile| 2 +- libavcodec/h2645_sei.c | 25 + libavcodec/h2645_sei.h | 3 +++ 3 files changed, 29 insertions(+), 1 deletion(-) diff --git a/libavcodec/Makefile

[FFmpeg-devel] [PATCH v3 7/9] avcodec/aom_film_grain: implement AFGS1 parsing

2024-03-15 Thread Niklas Haas
From: Niklas Haas Based on the AOMedia Film Grain Synthesis 1 (AFGS1) spec: https://aomediacodec.github.io/afgs1-spec/ The parsing has been changed substantially relative to the AV1 film grain OBU. In particular: 1. There is the possibility of maintaining multiple independent film grain

[FFmpeg-devel] [PATCH v3 6/9] avcodec/aom_film_grain: add AOM film grain synthesis

2024-03-15 Thread Niklas Haas
From: Niklas Haas Implementation copied wholesale from dav1d, sans SIMD, under permissive license. This implementation was extensively verified to be bit-exact, so it serves as a much better starting point than trying to re-engineer this from scratch for no reason. (I also authored the original

[FFmpeg-devel] [PATCH v3 5/9] avutil/film_grain_params: add av_film_grain_params_select()

2024-03-15 Thread Niklas Haas
From: Niklas Haas Common utility function that can be used by all codecs to select the right (any valid) film grain parameter set. In particular, this is useful for AFGS1, which has support for multiple parameters. However, it also performs parameter validation for H274. --- doc/APIchanges

[FFmpeg-devel] [PATCH v3 4/9] avutil/frame: clarify AV_FRAME_DATA_FILM_GRAIN_PARAMS usage

2024-03-15 Thread Niklas Haas
From: Niklas Haas To allow for AFGS1 usage, which can expose multiple parameter sets for a single frame. --- libavutil/frame.h | 4 1 file changed, 4 insertions(+) diff --git a/libavutil/frame.h b/libavutil/frame.h index b94687941db..7f616488be8 100644 --- a/libavutil/frame.h +++

[FFmpeg-devel] [PATCH v3 3/9] avcodec/libdav1d: initialize AFGS1 VSC metadata

2024-03-15 Thread Niklas Haas
From: Niklas Haas Unused by AV1, but should still be set properly. --- libavcodec/libdav1d.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c index 1aa2d1f3436..6251ea79ba8 100644 --- a/libavcodec/libdav1d.c +++ b/libavcodec/libdav1d.c @@

[FFmpeg-devel] [PATCH v3 2/9] avcodec/av1dec: initialize AFGS1 VSC metadata

2024-03-15 Thread Niklas Haas
From: Niklas Haas Unused by AV1, but should still be set properly. --- libavcodec/av1dec.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index e6346b51dbe..8a5796c757f 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -1124,6

[FFmpeg-devel] [PATCH v3 1/9] avutil/film_grain_params: add extra AFGS1 metadata

2024-03-15 Thread Niklas Haas
From: Niklas Haas In hindsight, it may have been better for this to be part of the common film grain struct, to avoid duplication of these fields between it and H274 (and to allow initialization by av_film_grain_params_alloc), but I can't add new fields before the union without breaking ABI, and

[FFmpeg-devel] [PATCH v3 0/9] AFGS1 film grain support

2024-03-15 Thread Niklas Haas
Changes from v2: - Expose the AFGS1-exclusive parameters publicly (as part of AVFilmGrainAOMParams) - Slightly change the AFGS1 parsing code as a result - Properly clear whole struct on error, to avoid leaking bad state - Attach all parameter sets (as separate side data instances), rather

[FFmpeg-devel] [PATCH] tools/target_dec_fuzzer: force experimental flag for decoders that need it

2024-03-15 Thread James Almer
Otherwise they will not even open. Signed-off-by: James Almer --- tools/target_dec_fuzzer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 84b646b7f4..a7642057f3 100644 --- a/tools/target_dec_fuzzer.c +++

[FFmpeg-devel] [PATCH] avcodec/ccaption_dec: Use static_assert instead of _Static_assert

2024-03-15 Thread Andreas Rheinhardt
The latter is not supported by MSVC 19.27. Signed-off-by: Andreas Rheinhardt --- libavcodec/ccaption_dec.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/ccaption_dec.c b/libavcodec/ccaption_dec.c index faf058ce97..d8b992bb94 100644 ---

Re: [FFmpeg-devel] [PATCH] configure: Remove av_restrict

2024-03-15 Thread Andreas Rheinhardt
Martin Storsjö: > On Sun, 10 Mar 2024, Andreas Rheinhardt wrote: > >> All versions of MSVC that support C11 (namely >= v19.27) >> also support the restrict keyword, therefore av_restrict >> is no longer necessary since 75697836b1db3e0f0a3b7061be6be28d00c675a0. >> >> Signed-off-by: Andreas

Re: [FFmpeg-devel] [PATCH] vvcdec: Mark as experimental

2024-03-15 Thread Kieran Kunhya
On Thu, 14 Mar 2024, 22:54 Michael Niedermayer, wrote: > On Wed, Feb 07, 2024 at 10:55:18PM +, Kieran Kunhya wrote: > > On Wed, 7 Feb 2024 at 22:06, Paul B Mahol wrote: > > > > > On Wed, Feb 7, 2024 at 10:13 PM Kieran Kunhya wrote: > > > > > > > $subj > > > > > > > > As discussed at

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

2024-03-15 Thread Niklas Haas
> This should be It is probably the reason for Michael's segfault. > Apart from that: It is easier if you simply used 0..2 for *iter (1== > returned sws_get_class, 2 returned ff_framesync_child_class_iterate). Changed this function to: static const AVClass *child_class_iterate(void **iter) {

Re: [FFmpeg-devel] [PATCH v2 1/4] avcodec/aom_film_grain: add AOM film grain synthesis

2024-03-15 Thread Niklas Haas
Tested and validated against official reference files. Any objection to merging this as-is? I would rather submit a separate series for adding a new public API, as well as for exposing multiple film grain parameter sets, both of which are incremental additions on top of the parsing and synthesis

Re: [FFmpeg-devel] [PATCH] configure: Remove av_restrict

2024-03-15 Thread Martin Storsjö
On Sun, 10 Mar 2024, Andreas Rheinhardt wrote: All versions of MSVC that support C11 (namely >= v19.27) also support the restrict keyword, therefore av_restrict is no longer necessary since 75697836b1db3e0f0a3b7061be6be28d00c675a0. Signed-off-by: Andreas Rheinhardt --- Untested except via

[FFmpeg-devel] [PATCH] tests/audiogen: Fix total RIFF chunk size

2024-03-15 Thread Tobias Rapp
The "RIFF" identifier and chunk size fields should not be included within the size value. --- tests/audiogen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/audiogen.c b/tests/audiogen.c index c43bb70..df1dea6 100644 --- a/tests/audiogen.c +++ b/tests/audiogen.c @@

Re: [FFmpeg-devel] [PATCH v6] libavfi/dnn: add LibTorch as one of DNN backend

2024-03-15 Thread Guo, Yejun
> -Original Message- > From: ffmpeg-devel On Behalf Of Jean- > Baptiste Kempf > Sent: Friday, March 15, 2024 3:05 PM > To: wenbin.chen-at-intel@ffmpeg.org; ffmpeg-devel de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v6] libavfi/dnn: add LibTorch as one of > DNN backend >

Re: [FFmpeg-devel] [PATCH v2 9/9] avformat/pcm: decrease target audio frame per sec to 10

2024-03-15 Thread Tobias Rapp
On 14/03/2024 23:04, Marton Balint wrote: On Thu, 14 Mar 2024, Tobias Rapp wrote: On 08/03/2024 01:53, Marton Balint wrote:  This makes the wav and pcm demuxer demux bigger packets, which is more  efficient. [...]  +0, 136000, 136000, 2000,    24000,  

Re: [FFmpeg-devel] [PATCH] avcodec/mips/aaccoder_mips: Remove MIPS-specific aaccoder

2024-03-15 Thread Jean-Baptiste Kempf
On Fri, 15 Mar 2024, at 02:20, Andreas Rheinhardt wrote: > ff_aac_coder_init_mips() modifies a static const structure of > function pointers. This will crash if the binary uses relro > and is a data race in any case. > > Furthermore it points to a maintainability issue: The >

Re: [FFmpeg-devel] [PATCH v6] libavfi/dnn: add LibTorch as one of DNN backend

2024-03-15 Thread Jean-Baptiste Kempf
On Fri, 15 Mar 2024, at 05:42, wenbin.chen-at-intel@ffmpeg.org wrote: > From: Wenbin Chen > > PyTorch is an open source machine learning framework that accelerates > the path from research prototyping to production deployment. Official > website: https://pytorch.org/. We call the C++ library