Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-29 Thread Rémi Denis-Courmont
Hi, Le 30 mai 2024 01:13:14 GMT+03:00, "Tomas Härdin" a écrit : >The entire patchset passes FATE Is the version in riscv/intmath.h safe? It looks to me that the GCC codegen for not only RV64 but also AArch{32,64} and x86-64 is better than this. ___ ff

[FFmpeg-devel] [PATCH v5 10/10] fate: add tests for xHE-AAC

2024-05-29 Thread Lynne via ffmpeg-devel
Starting off small with a few features. Samples and reference decoded files copied from the official ISO reference suite. FATE files: https://files.lynne.ee/xhe_refs/ --- tests/fate/aac.mak | 8 1 file changed, 8 insertions(+) diff --git a/tests/fate/aac.mak b/tests/fate/aac.mak index 8

[FFmpeg-devel] [PATCH v5 07/10] aactab: add tables for the new USAC arithmetic coder

2024-05-29 Thread Lynne via ffmpeg-devel
--- libavcodec/aactab.c | 376 libavcodec/aactab.h | 6 + 2 files changed, 382 insertions(+) diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index 8ce5e43974..dfb2dfd98d 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -1193,6 +11

[FFmpeg-devel] [PATCH v5 09/10] aacdec: add a decoder for AAC USAC (xHE-AAC)

2024-05-29 Thread Lynne via ffmpeg-devel
This commit adds a decoder for the frequency-domain part of USAC. What works: - Mono - Stereo (no prediction) - Stereo (mid/side coding) - Stereo (complex prediction) What's left: - Speech coding Known issues: - Desync with certain sequences - Preroll crossover missing (shouldn't matter,

[FFmpeg-devel] [PATCH v5 08/10] aactab: add new scalefactor offset tables for 96/768pt windows

2024-05-29 Thread Lynne via ffmpeg-devel
--- libavcodec/aactab.c | 117 libavcodec/aactab.h | 4 ++ 2 files changed, 121 insertions(+) diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index dfb2dfd98d..18afa69bad 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -154,6 +15

[FFmpeg-devel] [PATCH v5 06/10] aactab: add deemphasis tables for USAC

2024-05-29 Thread Lynne via ffmpeg-devel
--- libavcodec/aactab.c | 25 + libavcodec/aactab.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/libavcodec/aactab.c b/libavcodec/aactab.c index 3718b81a07..8ce5e43974 100644 --- a/libavcodec/aactab.c +++ b/libavcodec/aactab.c @@ -3377,3 +3377,28 @@ const DECLAR

[FFmpeg-devel] [PATCH v5 05/10] aacdec_dsp: implement 768-point transform and windowing

2024-05-29 Thread Lynne via ffmpeg-devel
Required for USAC --- libavcodec/aac/aacdec.c | 4 ++ libavcodec/aac/aacdec.h | 5 +++ libavcodec/aac/aacdec_dsp_template.c | 67 libavcodec/aac/aacdec_fixed.c| 2 + libavcodec/aac/aacdec_float.c| 4 ++ libavcodec/sinewin_f

[FFmpeg-devel] [PATCH v5 04/10] aacdec: expose decode_tns

2024-05-29 Thread Lynne via ffmpeg-devel
USAC has the same syntax, with one minor change we can check for. --- libavcodec/aac/aacdec.c | 6 +++--- libavcodec/aac/aacdec.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 40554ff9e4..a7e5b2a369 100644 --- a/liba

[FFmpeg-devel] [PATCH v5 03/10] aacdec: expose channel layout related functions

2024-05-29 Thread Lynne via ffmpeg-devel
--- libavcodec/aac/aacdec.c | 73 - libavcodec/aac/aacdec.h | 19 +-- 2 files changed, 51 insertions(+), 41 deletions(-) diff --git a/libavcodec/aac/aacdec.c b/libavcodec/aac/aacdec.c index 35722f9b9b..40554ff9e4 100644 --- a/libavcodec/aac/aacdec.c

[FFmpeg-devel] [PATCH v5 02/10] aacdec: move from scalefactor ranged arrays to flat arrays

2024-05-29 Thread Lynne via ffmpeg-devel
AAC uses an unconventional system to send scalefactors (the volume+quantization value for each band). Each window is split into either 1 or 8 blocks (long vs short), and transformed separately from one another, with the coefficients for each being also completely independent. The scalefactors sligh

[FFmpeg-devel] [PATCH v5 01/10] channel_layout: add new channel positions supported by xHE-AAC

2024-05-29 Thread Lynne via ffmpeg-devel
apichanges will be updated upon merging, as well as a version bump. --- libavutil/channel_layout.c | 4 libavutil/channel_layout.h | 8 2 files changed, 12 insertions(+) diff --git a/libavutil/channel_layout.c b/libavutil/channel_layout.c index 98839b7250..2d6963b6df 100644 --- a/li

[FFmpeg-devel] [PATCH v5 00/10] aacdec: add a native xHE-AAC decoder

2024-05-29 Thread Lynne via ffmpeg-devel
This commit adds a decoder for the frequency-domain part of USAC. Changes over version 4: - Actually reset entropy decoding upon configuration. - Support for LFE channels. Lynne (10): channel_layout: add new channel positions supported by xHE-AAC aacdec: move from scalefactor ranged arrays

[FFmpeg-devel] [PATCH v3 3/3] avutil/hwcontext_videotoolbox: Set CVBuffer CGColorSpace

2024-05-29 Thread Marvin Scholz
In addition to the other properties, try to obtain the right CGColorSpace and set it as well, else it could lead to a CVBuffer tagged as BT.2020 but with a CGColorSpace indicating BT.709. Therefore it is essential for consistency to set a colorspace according to the other values, or if none can be

[FFmpeg-devel] [PATCH v3 2/3] avutil/hwcontext_videotoolbox: Update documentation

2024-05-29 Thread Marvin Scholz
The documentation was not clear at all what specifically the function does, so it was left unspecified if it will unset or not touch attachments it could not map from the AVFrame. The documentation of the return value was wrong as well. --- libavutil/hwcontext_videotoolbox.h | 11 +-- 1

[FFmpeg-devel] [PATCH v3 1/3] avutil/hwcontext_videotoolbox: Unset undefined values

2024-05-29 Thread Marvin Scholz
When mapping AVFrame properties to the CVBuffer attachments, it is necessary to properly delete undefined attachments, else we can leave incorrect values in there guessed from VideoToolbox for example, leading to inconsistent results where the AVFrame and CVBuffer differ in metadata. Ref #10884 --

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/packet: add a decoded frame cropping side data type

2024-05-29 Thread James Almer
On 5/29/2024 10:02 PM, Lynne via ffmpeg-devel wrote: On 29/05/2024 23:46, James Almer wrote: Signed-off-by: James Almer ---   libavcodec/packet.h | 14 ++   1 file changed, 14 insertions(+) diff --git a/libavcodec/packet.h b/libavcodec/packet.h index a9a41576da..9dee035690 100644 --

Re: [FFmpeg-devel] git problems

2024-05-29 Thread Michael Niedermayer
On Thu, May 30, 2024 at 01:30:09AM +0200, Michael Niedermayer wrote: > Hi all > > It seems the security update (https://ubuntu.com/security/notices/USN-6793-1) > broke public git > > We use gitolite that runs under its own user and serve git through apache > which runs under a different user. > A

Re: [FFmpeg-devel] [PATCH 5/6] fftools/ffmpeg: support applying container level cropping

2024-05-29 Thread James Almer
On 5/29/2024 10:01 PM, Lynne via ffmpeg-devel wrote: On 29/05/2024 23:46, James Almer wrote: Signed-off-by: James Almer ---   fftools/ffmpeg.h    |  7 +++   fftools/ffmpeg_demux.c  | 16   fftools/ffmpeg_filter.c | 11 +++   fftools/ffmpeg_opt.c    |  3 +++   4 fi

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/packet: add a decoded frame cropping side data type

2024-05-29 Thread Lynne via ffmpeg-devel
On 29/05/2024 23:46, James Almer wrote: Signed-off-by: James Almer --- libavcodec/packet.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/packet.h b/libavcodec/packet.h index a9a41576da..9dee035690 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -

Re: [FFmpeg-devel] [PATCH 5/6] fftools/ffmpeg: support applying container level cropping

2024-05-29 Thread Lynne via ffmpeg-devel
On 29/05/2024 23:46, James Almer wrote: Signed-off-by: James Almer --- fftools/ffmpeg.h| 7 +++ fftools/ffmpeg_demux.c | 16 fftools/ffmpeg_filter.c | 11 +++ fftools/ffmpeg_opt.c| 3 +++ 4 files changed, 37 insertions(+) diff --git a/fftools/ff

Re: [FFmpeg-devel] [PATCH v3] avformat/nutdec: Don't create inconsistent side data

2024-05-29 Thread James Almer
On 5/29/2024 9:14 PM, Andreas Rheinhardt wrote: Forgotten in 65ddc74988245a01421a63c5cffa4d900c47117c. Signed-off-by: Andreas Rheinhardt --- libavformat/nutdec.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c in

[FFmpeg-devel] [PATCH v3] avformat/nutdec: Don't create inconsistent side data

2024-05-29 Thread Andreas Rheinhardt
Forgotten in 65ddc74988245a01421a63c5cffa4d900c47117c. Signed-off-by: Andreas Rheinhardt --- libavformat/nutdec.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 0bb7f154db..34b7e3cb9a 100644 --- a/libavformat/

[FFmpeg-devel] [PATCH v2] avformat/nutdec: Don't create inconsistent side data

2024-05-29 Thread Andreas Rheinhardt
Forgotten in 65ddc74988245a01421a63c5cffa4d900c47117c. Signed-off-by: Andreas Rheinhardt --- libavformat/nutdec.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 0bb7f154db..a962576f06 100644 --- a/libavformat/nutdec.c ++

[FFmpeg-devel] [PATCH] avformat/nutdec: Don't create inconsistent side data

2024-05-29 Thread Andreas Rheinhardt
Forgotten in 65ddc74988245a01421a63c5cffa4d900c47117c. Signed-off-by: Andreas Rheinhardt --- libavformat/nutdec.c | 4 1 file changed, 4 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 0bb7f154db..94b49d3eba 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nu

[FFmpeg-devel] [PATCH] avcodec/packet: remove reference to old AV_SIDE_DATA_PARAM_CHANGE_ values

2024-05-29 Thread James Almer
They were forgotten in 65ddc74988245a01421a63c5cffa4d900c47117c. Signed-off-by: James Almer --- libavcodec/packet.h | 4 1 file changed, 4 deletions(-) diff --git a/libavcodec/packet.h b/libavcodec/packet.h index a9a41576da..f05deb7950 100644 --- a/libavcodec/packet.h +++ b/libavcodec/pack

[FFmpeg-devel] git problems

2024-05-29 Thread Michael Niedermayer
Hi all It seems the security update (https://ubuntu.com/security/notices/USN-6793-1) broke public git We use gitolite that runs under its own user and serve git through apache which runs under a different user. Apache has only read access to the repositories Since the security update that stoped

Re: [FFmpeg-devel] [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c()

2024-05-29 Thread Tomas Härdin
tor 2024-05-30 klockan 00:24 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > >  static av_always_inline av_const int av_clip_intp2_c(int a, int p) > >  { > > -    if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) > > +    if (((unsigned)a + (1U << p)) & ~((2U << p) - 1)) > > return (a >> 3

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-29 Thread Andreas Rheinhardt
Tomas Härdin: > */ > static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a) > { > -if ((a+0x8000u) & ~UINT64_C(0x)) return (int32_t)((a>>63) ^ > 0x7FFF); > -else return (int32_t)a; > +if ((a+UINT64_C(0x8000))

Re: [FFmpeg-devel] [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c()

2024-05-29 Thread Andreas Rheinhardt
Tomas Härdin: > static av_always_inline av_const int av_clip_intp2_c(int a, int p) > { > -if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) > +if (((unsigned)a + (1U << p)) & ~((2U << p) - 1)) > return (a >> 31) ^ ((1 << p) - 1); > else > return a; This will support

[FFmpeg-devel] [PATCH 5/5] lavu/mathematics: Return early if either a or b is zero

2024-05-29 Thread Tomas Härdin
This doesn't really fix anything, it just makes the value analysis easier. I don't feel strongly about it. /Tomas From cf9c56d7d4d7325d51ba6d99259431be7fca1f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Mon, 20 May 2024 14:46:01 +0200 Subject: [PATCH 5/5] lavu/mathematic

[FFmpeg-devel] [PATCH 4/5] lavu/intmath.h: Fix UB in ff_ctz_c() and ff_ctzll_c()

2024-05-29 Thread Tomas Härdin
From f9a12089bc98dde0ccc2487d1442ec6ddb7705f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 May 2024 18:10:58 +0200 Subject: [PATCH 4/5] lavu/intmath.h: Fix UB in ff_ctz_c() and ff_ctzll_c() Found by value analysis --- libavutil/intmath.h | 4 ++-- 1 file changed,

[FFmpeg-devel] [PATCH 3/5] lavu/common.h: Fix UB in av_clip_uintp2_c()

2024-05-29 Thread Tomas Härdin
From f81730f8facc54ef23df79ac8d33075403b4f76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 May 2024 16:37:58 +0200 Subject: [PATCH 3/5] lavu/common.h: Fix UB in av_clip_uintp2_c() Found by value analysis --- libavutil/common.h | 4 ++-- 1 file changed, 2 insertio

[FFmpeg-devel] [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c()

2024-05-29 Thread Tomas Härdin
From 7b18f24c0bedfeebcdfb23ea837cea8d4c35cf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 May 2024 16:33:44 +0200 Subject: [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c() Found by value analysis --- libavutil/common.h | 2 +- 1 file changed, 1 insertion(+

[FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-29 Thread Tomas Härdin
The entire patchset passes FATE /Tomas From c000b8a5e90883f28ce6c58960227e5825ac20d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Wed, 15 May 2024 21:03:47 +0200 Subject: [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c() Found by value analysis --- libavutil/common

[FFmpeg-devel] [PATCH 6/6] fftools/ffplay: support applying container level cropping

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- fftools/ffplay.c | 25 + 1 file changed, 25 insertions(+) diff --git a/fftools/ffplay.c b/fftools/ffplay.c index 1d0511b254..47e2865abb 100644 --- a/fftools/ffplay.c +++ b/fftools/ffplay.c @@ -32,6 +32,7 @@ #include "libavutil/avstring.h"

[FFmpeg-devel] [PATCH 5/6] fftools/ffmpeg: support applying container level cropping

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- fftools/ffmpeg.h| 7 +++ fftools/ffmpeg_demux.c | 16 fftools/ffmpeg_filter.c | 11 +++ fftools/ffmpeg_opt.c| 3 +++ 4 files changed, 37 insertions(+) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index fe75706afd..f90

[FFmpeg-devel] [PATCH 1/6] avcodec/packet: add a decoded frame cropping side data type

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- libavcodec/packet.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/libavcodec/packet.h b/libavcodec/packet.h index a9a41576da..9dee035690 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -330,6 +330,20 @@ enum AVPacketSideDataType {

[FFmpeg-devel] [PATCH 4/6] avformat/matroskaenc: support writing cropping values

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- libavformat/matroskaenc.c | 44 --- 1 file changed, 37 insertions(+), 7 deletions(-) diff --git a/libavformat/matroskaenc.c b/libavformat/matroskaenc.c index 76c542d50b..37a6a5b4f8 100644 --- a/libavformat/matroskaenc.c +++ b/lib

[FFmpeg-devel] [PATCH 3/6] avformat/matroskadec: export cropping values

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- libavformat/matroskadec.c | 53 +++ 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 2f07e11d87..a30bac786b 100644 --- a/libavformat/matroskadec.c +++ b/li

[FFmpeg-devel] [PATCH 2/6] avformat/dump: print Frame Cropping side data info

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- libavformat/dump.c | 21 + 1 file changed, 21 insertions(+) diff --git a/libavformat/dump.c b/libavformat/dump.c index 059fb84522..610965cf81 100644 --- a/libavformat/dump.c +++ b/libavformat/dump.c @@ -431,6 +431,23 @@ static void dump_s12m_tim

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow

2024-05-29 Thread Ronald S. Bultje
Hi, On Wed, May 29, 2024 at 3:44 PM Wu Jianhua wrote: > Ronald S. Bultje: > > On Wed, May 29, 2024 at 11:38 AM toq...@outlook.com>> wrote: > > +%else > > +vpunpcklqdq m11, m2, m2 > > +vpunpckhqdq m12, m2, m2 > > +vpunpcklwd m11, m11, m14 > > +vpunpcklwd m12

Re: [FFmpeg-devel] [PATCHv4] checkasm/lpc: test compute_autocorr

2024-05-29 Thread James Almer
On 5/29/2024 4:42 PM, Rémi Denis-Courmont wrote: Also restrict length to even values, matching real uses. This test is disabled, known broken, on x86. --- tests/checkasm/lpc.c | 57 +--- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/test

Re: [FFmpeg-devel] [PATCHv4] checkasm/lpc: test compute_autocorr

2024-05-29 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > Le keskiviikkona 29. toukokuuta 2024, 22.55.13 EEST Andreas Rheinhardt a > écrit > : >> It seems to me that the flac encoder can use odd values (namely if the >> user set an odd frame_size option or if it gets fed an odd number of >> samples in which case the last frame wil

Re: [FFmpeg-devel] [PATCHv4] checkasm/lpc: test compute_autocorr

2024-05-29 Thread Rémi Denis-Courmont
Le keskiviikkona 29. toukokuuta 2024, 22.55.13 EEST Andreas Rheinhardt a écrit : > It seems to me that the flac encoder can use odd values (namely if the > user set an odd frame_size option or if it gets fed an odd number of > samples in which case the last frame will have an odd number of samples

Re: [FFmpeg-devel] [PATCH v3 4/5] lavc/vp9dsp: R-V V mc tap h v

2024-05-29 Thread Rémi Denis-Courmont
Le keskiviikkona 29. toukokuuta 2024, 20.15.39 EEST u...@foxmail.com a écrit : > From: sunyuechi > > C908 X60 > vp9_avg_8tap_smooth_4h_8bpp_c : 13.0 11.2 > vp9_avg_8tap_smooth_4h_8bpp_rvv_i32:5.0

Re: [FFmpeg-devel] [PATCH v3 3/5] lavc/vp9dsp: R-V V mc bilin hv

2024-05-29 Thread Rémi Denis-Courmont
Le keskiviikkona 29. toukokuuta 2024, 20.15.38 EEST u...@foxmail.com a écrit : > From: sunyuechi > > C908: > vp9_avg_bilin_4hv_8bpp_c: 11.0 > vp9_avg_bilin_4hv_8bpp_rvv_i64: 3.7 > vp9_avg_bilin_8hv_8bpp_c: 38.7 > vp9_avg_bilin_8hv_8bpp_rvv_i64: 7.2 > vp9_avg_bilin_16hv_8bpp_c: 147.0 > vp9_avg_bil

Re: [FFmpeg-devel] [PATCHv4] checkasm/lpc: test compute_autocorr

2024-05-29 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > Also restrict length to even values, matching real uses. It seems to me that the flac encoder can use odd values (namely if the user set an odd frame_size option or if it gets fed an odd number of samples in which case the last frame will have an odd number of samples). > T

[FFmpeg-devel] 回复: [PATCH 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow

2024-05-29 Thread Wu Jianhua
Ronald S. Bultje: > 发件人: Ronald S. Bultje > 发送时间: 2024年5月29日 10:51 > 收件人: FFmpeg development discussions and patches > 抄送: James Almer; Wu Jianhua > 主题: Re: [FFmpeg-devel] [PATCH 1/3] avcodec/x86/vvc/vvc_alf: fix integer > overflow > > Hi, > > On Wed, May 29, 2024 at 11:38 AM > mailto:toq...@o

[FFmpeg-devel] [PATCHv4] checkasm/lpc: test compute_autocorr

2024-05-29 Thread Rémi Denis-Courmont
Also restrict length to even values, matching real uses. This test is disabled, known broken, on x86. --- tests/checkasm/lpc.c | 57 +--- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/lpc.c b/tests/checkasm/lpc.c index 592e34c

[FFmpeg-devel] [PATCH] checkasm/vc1dsp: add missing vc1_inv_trans_8x8 test

2024-05-29 Thread Rémi Denis-Courmont
--- tests/checkasm/vc1dsp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/checkasm/vc1dsp.c b/tests/checkasm/vc1dsp.c index f18f0f8251..440fad9b05 100644 --- a/tests/checkasm/vc1dsp.c +++ b/tests/checkasm/vc1dsp.c @@ -295,6 +295,7 @@ static void check_inv_trans_adding(void) VC1DSP

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow

2024-05-29 Thread Ronald S. Bultje
Hi, On Wed, May 29, 2024 at 11:38 AM wrote: > +%else > +vpunpcklqdq m11, m2, m2 > +vpunpckhqdq m12, m2, m2 > +vpunpcklwd m11, m11, m14 > +vpunpcklwd m12, m12, m14 > +paddd m0, m11 > +paddd m1, m12 > +packssdw m0,

Re: [FFmpeg-devel] [PATCH v3 4/5] lavc/vp9dsp: R-V V mc tap h v

2024-05-29 Thread flow gg
A portion has been modified according to the previous review, but there are still some parts that haven't been updated > Similarly, it > should be possible to share most of the horizontal and vertical code (maybe > also for bilinear. not just EPel) with separate load/store then inner > procedures.

[FFmpeg-devel] [PATCH v3 3/5] lavc/vp9dsp: R-V V mc bilin hv

2024-05-29 Thread uk7b
From: sunyuechi C908: vp9_avg_bilin_4hv_8bpp_c: 11.0 vp9_avg_bilin_4hv_8bpp_rvv_i64: 3.7 vp9_avg_bilin_8hv_8bpp_c: 38.7 vp9_avg_bilin_8hv_8bpp_rvv_i64: 7.2 vp9_avg_bilin_16hv_8bpp_c: 147.0 vp9_avg_bilin_16hv_8bpp_rvv_i64: 14.2 vp9_avg_bilin_32hv_8bpp_c: 574.5 vp9_avg_bilin_32hv_8bpp_rvv_i64: 42.7

[FFmpeg-devel] [PATCH v3 5/5] lavc/vp9dsp: R-V V mc tap hv

2024-05-29 Thread uk7b
From: sunyuechi C908 X60 vp9_avg_8tap_smooth_4hv_8bpp_c : 32.0 28.2 vp9_avg_8tap_smooth_4hv_8bpp_rvv_i32 : 15.0 13.2 vp9_avg_8tap_smooth_8hv_8bpp_c : 98.0 86.2 vp9_avg_8tap_smo

[FFmpeg-devel] [PATCH v3 1/5] lavc/vp9dsp: R-V V rename ff_avg to ff_vp9_avg

2024-05-29 Thread uk7b
From: sunyuechi Avoid potential naming conflicts --- libavcodec/riscv/vp9_mc_rvv.S | 4 ++-- libavcodec/riscv/vp9dsp.h | 4 ++-- libavcodec/riscv/vp9dsp_init.c | 8 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libavcodec/riscv/vp9_mc_rvv.S b/libavcodec/riscv/vp9_

[FFmpeg-devel] [PATCH v3 4/5] lavc/vp9dsp: R-V V mc tap h v

2024-05-29 Thread uk7b
From: sunyuechi C908 X60 vp9_avg_8tap_smooth_4h_8bpp_c : 13.0 11.2 vp9_avg_8tap_smooth_4h_8bpp_rvv_i32:5.04.2 vp9_avg_8tap_smooth_4v_8bpp_c : 13.7 12.5 vp9_avg_8tap_smo

[FFmpeg-devel] [PATCH v3 2/5] lavc/vp9dsp: R-V V mc bilin h v

2024-05-29 Thread uk7b
From: sunyuechi C908: vp9_avg_bilin_4h_8bpp_c: 5.2 vp9_avg_bilin_4h_8bpp_rvv_i64: 2.2 vp9_avg_bilin_4v_8bpp_c: 5.5 vp9_avg_bilin_4v_8bpp_rvv_i64: 2.2 vp9_avg_bilin_8h_8bpp_c: 20.0 vp9_avg_bilin_8h_8bpp_rvv_i64: 4.5 vp9_avg_bilin_8v_8bpp_c: 21.0 vp9_avg_bilin_8v_8bpp_rvv_i64: 4.2 vp9_avg_bilin_16h

[FFmpeg-devel] Empty arch/ directories

2024-05-29 Thread Sean McGovern
Hi, It is not likely we will get anyone to step up to do DSP work for arguably dead architectures like SPARC, Blackfin, etc. Maybe is it time to remove those directories that just contain a README now? Sean McGovern ___ ffmpeg-devel mailing list ffmpeg

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow

2024-05-29 Thread Andreas Rheinhardt
toq...@outlook.com: > From: Wu Jianhua > > Some tests fails with certain seeds > > tests/checkasm/checkasm 2325607578 --test=vvc_alf > checkasm: using random seed 2325607578 > AVX2: > vvc_alf_filter_luma_120x20_12_avx2 (vvc_alf.c:104) > vvc_alf_filter_luma_120x24_12_avx2 (vvc_alf.c:104)

Re: [FFmpeg-devel] [PATCH v4 1/4] doc: Explain what "context" means

2024-05-29 Thread Stefano Sabatini
On date Wednesday 2024-05-29 11:50:40 +0100, Andrew Sayers wrote: > Posting this separately, as these are practical "how does FFmpeg work" issues > vaguely inspired by recent discussions. > > > *How do namespaces work in FFmpeg?* > > We've talked a bit about function namespaces recently. One re

Re: [FFmpeg-devel] [PATCH 1/4] lavu/float_dsp: add double-precision scalar product

2024-05-29 Thread James Almer
On 5/29/2024 12:51 PM, Rémi Denis-Courmont wrote: Le keskiviikkona 29. toukokuuta 2024, 18.44.13 EEST Andreas Rheinhardt a écrit : +static double ff_scalarproduct_double_c(const double *v1, Don't use an ff_ prefix for a static function. I can see over 300 such identifiers in the code base (

Re: [FFmpeg-devel] [PATCH 4/4] lavc/float_dsp: R-V V scalarproduct_double

2024-05-29 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > C908: > scalarproduct_double_c: 39.2 > scalarproduct_double_rvv_f64: 10.5 > > X60: > scalarproduct_double_c: 35.0 > scalarproduct_double_rvv_f64: 5.2 > --- > libavutil/riscv/float_dsp_init.c | 3 +++ > libavutil/riscv/float_dsp_rvv.S | 21

Re: [FFmpeg-devel] [PATCH 2/4] lavf: get rid of bespoke double scalar products

2024-05-29 Thread Rémi Denis-Courmont
Le keskiviikkona 29. toukokuuta 2024, 18.46.05 EEST Andreas Rheinhardt a écrit : > 2. Do you intend to use this outside of lavfi? Yes. -- Rémi Denis-Courmont http://www.remlab.net/ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmp

Re: [FFmpeg-devel] [PATCH 1/4] lavu/float_dsp: add double-precision scalar product

2024-05-29 Thread Rémi Denis-Courmont
Le keskiviikkona 29. toukokuuta 2024, 18.44.13 EEST Andreas Rheinhardt a écrit : > > +static double ff_scalarproduct_double_c(const double *v1, > Don't use an ff_ prefix for a static function. I can see over 300 such identifiers in the code base (many but not all inline), and I don't see why th

Re: [FFmpeg-devel] [PATCH 2/4] lavf: get rid of bespoke double scalar products

2024-05-29 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > --- > libavfilter/aap_template.c | 14 +- > libavfilter/anlms_template.c | 16 ++-- > libavfilter/arls_template.c | 14 +- > 3 files changed, 4 insertions(+), 40 deletions(-) > > diff --git a/libavfilter/aap_template.c b/libavfilter/aa

Re: [FFmpeg-devel] [PATCH 1/4] lavu/float_dsp: add double-precision scalar product

2024-05-29 Thread Andreas Rheinhardt
Rémi Denis-Courmont: > The function pointer is appended to the structure for backward binary > compatibility. Fortunately, this is allocated by libavutil, not by the > user, so increasing the structure size is safe. > --- > doc/APIchanges| 3 +++ > libavutil/float_dsp.c | 12

[FFmpeg-devel] [PATCH] checkasm: add linear least square tests

2024-05-29 Thread Rémi Denis-Courmont
--- tests/checkasm/Makefile | 1 + tests/checkasm/checkasm.c | 1 + tests/checkasm/checkasm.h | 1 + tests/checkasm/lls.c | 101 ++ tests/fate/checkasm.mak | 1 + 5 files changed, 105 insertions(+) create mode 100644 tests/checkasm/lls.c diff

[FFmpeg-devel] [PATCH] lavu/lls: R-V V update_lls

2024-05-29 Thread Rémi Denis-Courmont
update_lls_8_c:7.5 update_lls_8_rvv_f64: 4.2 update_lls_12_c: 14.5 update_lls_12_rvv_f64: 5.7 --- libavutil/lls.c| 4 ++- libavutil/lls.h| 1 + libavutil/riscv/Makefile | 4 ++- libavutil/riscv/lls_init.c | 57 ++ libav

Re: [FFmpeg-devel] [PATCH] swscale: [loongarch] Fix undeclared functions prob.

2024-05-29 Thread Shiyou Yin
Ping. > 2024年5月15日 16:57,金波 写道: > > Look good to me. > > 2024-05-08 18:07:49 "yinshiyou-hf" 写道: >> Compile with '--disable-lasx', ‘lumRangeFromJpeg_lasx’ undeclared. >> --- >> libswscale/loongarch/swscale_init_loongarch.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/libswscale

[FFmpeg-devel] [PATCH 3/3] tests/checkasm/vvc_alf: change alf step size to 8

2024-05-29 Thread toqsxw
From: Wu Jianhua >From Benjamin Bross: > for ALF where functions are in increments of 4 while 8 should be sufficient > according to the spec. Signed-off-by: Wu Jianhua --- tests/checkasm/vvc_alf.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/checkasm/vvc_a

[FFmpeg-devel] [PATCH 2/3] avcodec/x86/vvc/vvc_alf: use xq to match ptrdiff_t

2024-05-29 Thread toqsxw
From: Wu Jianhua Signed-off-by: Wu Jianhua --- libavcodec/x86/vvc/vvc_alf.asm | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/x86/vvc/vvc_alf.asm b/libavcodec/x86/vvc/vvc_alf.asm index 91f158bac9..8bb698955c 100644 --- a/libavcodec/x86/vvc/vvc_alf.asm +++

[FFmpeg-devel] [PATCH 1/3] avcodec/x86/vvc/vvc_alf: fix integer overflow

2024-05-29 Thread toqsxw
From: Wu Jianhua Some tests fails with certain seeds tests/checkasm/checkasm 2325607578 --test=vvc_alf checkasm: using random seed 2325607578 AVX2: vvc_alf_filter_luma_120x20_12_avx2 (vvc_alf.c:104) vvc_alf_filter_luma_120x24_12_avx2 (vvc_alf.c:104) vvc_alf_filter_luma_120x28_12_avx2

[FFmpeg-devel] [PATCH 4/4] lavc/float_dsp: R-V V scalarproduct_double

2024-05-29 Thread Rémi Denis-Courmont
C908: scalarproduct_double_c: 39.2 scalarproduct_double_rvv_f64: 10.5 X60: scalarproduct_double_c: 35.0 scalarproduct_double_rvv_f64: 5.2 --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 21 + 2 files changed, 24 insertions(+) dif

[FFmpeg-devel] [PATCH 3/4] checkasm/float_dsp: add double-precision scalar product

2024-05-29 Thread Rémi Denis-Courmont
--- tests/checkasm/float_dsp.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/tests/checkasm/float_dsp.c b/tests/checkasm/float_dsp.c index cadfa65e2a..296db1cff9 100644 --- a/tests/checkasm/float_dsp.c +++ b/tests/checkasm/float_dsp.c @@ -278,6 +278,22 @@ static void tes

[FFmpeg-devel] [PATCH 2/4] lavf: get rid of bespoke double scalar products

2024-05-29 Thread Rémi Denis-Courmont
--- libavfilter/aap_template.c | 14 +- libavfilter/anlms_template.c | 16 ++-- libavfilter/arls_template.c | 14 +- 3 files changed, 4 insertions(+), 40 deletions(-) diff --git a/libavfilter/aap_template.c b/libavfilter/aap_template.c index ea9c815a89..0e05

[FFmpeg-devel] [PATCH 1/4] lavu/float_dsp: add double-precision scalar product

2024-05-29 Thread Rémi Denis-Courmont
The function pointer is appended to the structure for backward binary compatibility. Fortunately, this is allocated by libavutil, not by the user, so increasing the structure size is safe. --- doc/APIchanges| 3 +++ libavutil/float_dsp.c | 12 libavutil/float_dsp.h | 14 +

Re: [FFmpeg-devel] [PATCH v4 1/4] doc: Explain what "context" means

2024-05-29 Thread Andrew Sayers
On Wed, May 29, 2024 at 01:06:30PM +0200, Paul B Mahol wrote: > On Wed, May 29, 2024 at 12:50 PM Andrew Sayers > wrote: > [...] > > *Are AVOptions just command-line options?* > > > > I have trouble with statements like "AVOptions is a framework for options", > > both because it's circular and bec

[FFmpeg-devel] [PATCH 2/2] tests/checkasm/vvc_mc: don't zero the SAD buffers

2024-05-29 Thread James Almer
They will be filled immediately after. Signed-off-by: James Almer --- tests/checkasm/vvc_mc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/checkasm/vvc_mc.c b/tests/checkasm/vvc_mc.c index 40be837d68..bc6b580f42 100644 --- a/tests/checkasm/vvc_mc.c +++ b/tests/checkasm/vvc_mc.c @@

[FFmpeg-devel] [PATCH 1/2] tests/checkasm/vvc_mc: fix indentation

2024-05-29 Thread James Almer
Signed-off-by: James Almer --- tests/checkasm/vvc_mc.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/vvc_mc.c b/tests/checkasm/vvc_mc.c index 09cac82edb..40be837d68 100644 --- a/tests/checkasm/vvc_mc.c +++ b/tests/checkasm/vvc_mc.c @@ -341,8 +341,10 @@

Re: [FFmpeg-devel] [PATCH v1 2/2][GSoC 2024] tests/checkasm/vvc_mc: for SAD, only test valid subblock sizes

2024-05-29 Thread Nuo Mi
On Wed, May 29, 2024 at 3:10 AM Stone Chen wrote: > According to the VVC specification (section 8.5.1), the maximum > width/height of a subblock passed for DMVR SAD is 16. This along with > previous constraint requiring width * height >= 128 means that 8x16, 16x8, > and 16x16 are the only allowe

[FFmpeg-devel] [PATCH] libavfilter/signature_lookup: fix jaccard distance

2024-05-29 Thread Gerion Entrup
Actually, the jaccard distance is defined as D = 1 - intersect / union. Additionally, the distance value is compared against a constant that must be between 0 and 1, which is not the case here. Both facts together has led to the fact, that the function always returned a matching course signature. T

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodec: Add support of dynamic bitrate

2024-05-29 Thread Dmitrii Okunev
Thanks for the response. On Wed, 2024-05-29 at 12:19 +0800, Zhao Zhili wrote: > > 在 2024年5月29日,上午5:56,Dmitrii Okunev 写道: > > > > MediaCodec supports parameter "video-bitrate" to change the bitrate > > on fly. This commit adds capability to use it. > > > > It adds option -bitrate_ctrl_socket to

Re: [FFmpeg-devel] [PATCH v4 1/4] doc: Explain what "context" means

2024-05-29 Thread Paul B Mahol
On Wed, May 29, 2024 at 12:50 PM Andrew Sayers wrote: > Posting this separately, as these are practical "how does FFmpeg work" > issues > vaguely inspired by recent discussions. > > > *How do namespaces work in FFmpeg?* > > We've talked a bit about function namespaces recently. One reason I've >

[FFmpeg-devel] [PATCH v2 6/6] lavf/tls_mbedtls: add workaround for TLSv1.3 vs.

2024-05-29 Thread sfan5
From 98dd9aac129fbdf07f83da16b7307cb775ff8e66 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Fri, 17 May 2024 10:06:42 +0200 Subject: [PATCH v2 6/6] lavf/tls_mbedtls: add workaround for TLSv1.3 vs. verify=0 As of mbedTLS 3.6.0 TLSv1.3 is enabled by default and certificate verification is now mandato

[FFmpeg-devel] [PATCH v2 5/6] lavf/tls_mbedtls: handle session ticket error code as

2024-05-29 Thread sfan5
From 87bf4c7de225036b5e4458c9de2de4b941f8f9b6 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:29:10 +0200 Subject: [PATCH v2 5/6] lavf/tls_mbedtls: handle session ticket error code as no-op When TLSv1.3 and session tickets are enabled mbedtls_ssl_read() will return an error code t

[FFmpeg-devel] [PATCH v2 4/6] lavf/tls_mbedtls: fix handling of certification

2024-05-29 Thread sfan5
From d561732d7c05d820baeb9c8bff5e8a4b133fe624 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:27:17 +0200 Subject: [PATCH v2 4/6] lavf/tls_mbedtls: fix handling of certification validation failures We manually check the verification status after the handshake has completed using m

[FFmpeg-devel] [PATCH v2 3/6] lavf/tls_mbedtls: hook up debug message callback

2024-05-29 Thread sfan5
From f51387a129e93af13751237ec2c6e25ad07c8dc4 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:26:16 +0200 Subject: [PATCH v2 3/6] lavf/tls_mbedtls: hook up debug message callback Unfortunately this won't work out-of-the-box because mbedTLS only provides a global (not per-context) d

[FFmpeg-devel] [PATCH v2 2/6] lavf/tls_mbedtls: add missing call to psa_crypto_init

2024-05-29 Thread sfan5
From 18142d98aed9e48a78a37590341bf48f1fe2339e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:24:43 +0200 Subject: [PATCH v2 2/6] lavf/tls_mbedtls: add missing call to psa_crypto_init This is mandatory depending on configuration or at least with mbedTLS 3.6.0. Signed-off-by: sfan5

[FFmpeg-devel] [PATCH v2 1/6] lavf/tls_mbedtls: handle more error codes for

2024-05-29 Thread sfan5
From e8b5b6dee2d29690d1ae18090659120399b84e7c Mon Sep 17 00:00:00 2001 From: sfan5 Date: Mon, 13 May 2024 20:22:44 +0200 Subject: [PATCH v2 1/6] lavf/tls_mbedtls: handle more error codes for human-readable message Signed-off-by: sfan5 --- libavformat/tls_mbedtls.c | 6 ++ 1 file changed, 6

Re: [FFmpeg-devel] [PATCH v4 1/4] doc: Explain what "context" means

2024-05-29 Thread Andrew Sayers
Posting this separately, as these are practical "how does FFmpeg work" issues vaguely inspired by recent discussions. *How do namespaces work in FFmpeg?* We've talked a bit about function namespaces recently. One reason I've suggested they're a weak signal is because they aren't really addresse

Re: [FFmpeg-devel] [PATCH v4 1/4] doc: Explain what "context" means

2024-05-29 Thread Andrew Sayers
On Tue, May 28, 2024 at 07:24:55PM +0200, Stefano Sabatini wrote: > > I think we start with different assumptions: you assume that most of > the readers are familiar with OOP jargon, and that they will leverage > the OOP jargon to understand the FFmpeg API. I think this is Not exactly. I'm sayin

[FFmpeg-devel] [PATCH v2 09-10] lavc/hevc_ps: reduce the size of ShortTermRPS.used

2024-05-29 Thread Anton Khirnov
It is currently an array of 32 uint8_t, each storing a single flag. A single uint32_t is sufficient. Reduces sizeof(HEVCSPS) by 1792 bytes. --- libavcodec/hevc_ps.c | 33 +++-- libavcodec/hevc_ps.h | 2 +- libavcodec/hevc_refs.c | 6 +++--- libavcodec/vulka