[FFmpeg-devel] [PATCH] lavu/tx: stop using av_log(NULL, )

2024-07-25 Thread Lynne via ffmpeg-devel
Its not feasible to add an AVClass in the main context, as it would waste space, as the main context is recursive, and every bit of assembly would need to be changed. While its true that on paper av_log has access to the main context, that functionality is not used as no options are available for

Re: [FFmpeg-devel] [PATCH 1/6] lavu/riscv: implement floating point clips

2024-07-25 Thread Rémi Denis-Courmont
Le 25 juillet 2024 23:25:15 GMT+03:00, "Rémi Denis-Courmont" a écrit : >Unlike x86, fmin/fmax are single instructions, not function calls. They >are much much faster than doing a comparison, then branching based on its >results. With this, audiodsp.vector_clipf gets almost twice as fast, and >a

Re: [FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros

2024-07-25 Thread Rémi Denis-Courmont
Le 26 juillet 2024 05:15:32 GMT+03:00, James Almer a écrit : >Signed-off-by: James Almer >--- > doc/APIchanges | 3 +++ > libavutil/intreadwrite.h | 39 +++ > libavutil/version.h | 2 +- > 3 files changed, 43 insertions(+), 1 deletion(-) LGTM

Re: [FFmpeg-devel] [PATCH v2 2/2] lavc/qsvdec: Add VVC decoder

2024-07-25 Thread Xiang, Haihao
On Vr, 2024-06-14 at 16:28 +0800, fei.w.wang-at-intel@ffmpeg.org wrote: > From: Fei Wang > > Signed-off-by: Fei Wang > --- >  Changelog  | 1 + >  configure  | 1 + >  doc/decoders.texi  | 2 +- >  libavcodec/allcodecs.c | 1 + >  libavcodec/qsv.c   | 4 >  li

[FFmpeg-devel] [PATCH 4/4] avformat/mov: use AV_WL*A

2024-07-25 Thread James Almer
Signed-off-by: James Almer --- libavformat/mov.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index b74e43e214..a8e342dc4f 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1282,10 +1282,10 @@ static int

[FFmpeg-devel] [PATCH 3/4] avformat/matroskadec: use AV_WL32A

2024-07-25 Thread James Almer
Signed-off-by: James Almer --- libavformat/matroskadec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index aa28a37da4..c8741ff2af 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -4059,9 +40

[FFmpeg-devel] [PATCH 2/4] avcodec/amfenc_av1: use AV_WL32A

2024-07-25 Thread James Almer
Signed-off-by: James Almer --- libavcodec/amfenc_av1.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/amfenc_av1.c b/libavcodec/amfenc_av1.c index d984779063..97d1ea025c 100644 --- a/libavcodec/amfenc_av1.c +++ b/libavcodec/amfenc_av1.c @@ -535,10 +535,10 @

[FFmpeg-devel] [PATCH 1/4] avutil/intreadwrite: add missing aligned read/write macros

2024-07-25 Thread James Almer
Signed-off-by: James Almer --- doc/APIchanges | 3 +++ libavutil/intreadwrite.h | 39 +++ libavutil/version.h | 2 +- 3 files changed, 43 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index fb54c3fbc9..d26e05e0ff 10

Re: [FFmpeg-devel] [PATCH 3/3] checkasm: add tests for vvc dmvr

2024-07-25 Thread James Almer
On 7/25/2024 10:35 AM, Nuo Mi wrote: dmvr_8_12x20_c: 186.2 dmvr_8_12x20_avx2: 25.7 dmvr_8_20x12_c: 181.7 dmvr_8_20x12_avx2: 25.2 dmvr_8_20x20_c: 283.2 dmvr_8_20x20_avx2: 32.0 dmvr_10_12x20_c: 90.0 dmvr_10_12x20_avx2: 15.7 dmvr_10_20x12_c: 41.0 dmvr_10_20x12_avx2: 14.7 dmvr_10_20x20_c: 81.5 dmvr_1

[FFmpeg-devel] [PATCH 3/3] lavc/qsv: Use vendor id to create device

2024-07-25 Thread fei . w . wang-at-intel . com
From: Fei Wang New kernel driver "xe" will be supported from Lunar Lake instead of "i915". "xe" kernel driver: https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe Signed-off-by: Fei Wang --- libavcodec/qsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

[FFmpeg-devel] [PATCH 2/3] lavu/hwcontext_qsv: Use vendor id to create device

2024-07-25 Thread fei . w . wang-at-intel . com
From: Fei Wang New kernel driver "xe" will be supported from Lunar Lake instead of "i915". "xe" kernel driver: https://github.com/torvalds/linux/tree/master/drivers/gpu/drm/xe Signed-off-by: Fei Wang --- libavutil/hwcontext_qsv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[FFmpeg-devel] [PATCH 1/3] lavu/hwcontext_vaapi: Add option to allow to specify vendor id when init hw device

2024-07-25 Thread fei . w . wang-at-intel . com
From: Fei Wang Vendor id will help to select desired device in case of kernel driver is unknow or unsupported, for vendor may support different kernel driver on different platforms. Signed-off-by: Fei Wang --- doc/ffmpeg.texi | 8 libavutil/hwcontext_vaapi.c | 29

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-25 Thread Pierre-Anthony Lemieux
On Thu, Jul 25, 2024 at 2:17 AM Tomas Härdin wrote: > > sön 2024-07-21 klockan 14:07 +0900 skrev Pierre-Anthony Lemieux: > > On Sat, Jul 20, 2024 at 5:12 PM Tomas Härdin wrote: > > > > > > tor 2024-07-18 klockan 23:10 +0900 skrev Pierre-Anthony Lemieux: > > > > On Mon, Jul 15, 2024 at 10:33 PM To

Re: [FFmpeg-devel] [PATCH] lavc/pixblockdsp: specialise aligned 16-bit get_pixels

2024-07-25 Thread Rémi Denis-Courmont
Le torstaina 25. heinäkuuta 2024, 21.25.11 EEST James Almer a écrit : > On 7/25/2024 1:50 PM, Rémi Denis-Courmont wrote: > > Le torstaina 25. heinäkuuta 2024, 19.16.21 EEST James Almer a écrit : > >> On 7/25/2024 12:53 PM, Rémi Denis-Courmont wrote: > >>> The current code assumes that we have unali

[FFmpeg-devel] [PATCH 6/6] lavu/cpu: deprecate AV_CPU_FLAG_RV{F, D}

2024-07-25 Thread Rémi Denis-Courmont
--- doc/APIchanges | 3 +++ libavutil/cpu.h | 3 +++ libavutil/version.h | 1 + 3 files changed, 7 insertions(+) diff --git a/doc/APIchanges b/doc/APIchanges index fb54c3fbc9..16993d310e 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -2,6 +2,9 @@ The last version increases of all li

[FFmpeg-devel] [PATCH 5/6] lavc/riscv: drop probing for F & D extensions

2024-07-25 Thread Rémi Denis-Courmont
F and D extensions are included in all RISC-V application profiles ever made (so starting from RV64GC a.k.a. RVA20). Realistically they need to be selected at compilation time. Currently, there are no consumers for these two flags. If there is ever a need to reintroduce F- or D-specific optimisati

[FFmpeg-devel] [PATCH 4/6] lavc/audiodsp: drop R-V F vector_clipf

2024-07-25 Thread Rémi Denis-Courmont
This is now firmly slower than C. SiFive-U74 (cycles): audiodsp.vector_clipf_c: 31.2 audiodsp.vector_clipf_rvf: 39.5 --- libavcodec/riscv/Makefile| 1 - libavcodec/riscv/audiodsp_init.c | 8 + libavcodec/riscv/audiodsp_rvf.S | 50 3 files changed,

[FFmpeg-devel] [PATCH 3/6] lavc/audiodsp: drop opposite sign optimisation

2024-07-25 Thread Rémi Denis-Courmont
This was added along side the original SSE(one) DSP function in 0a68cd876e14f76a00df7bb8edbfeb350f8ef617 without rationale. This was presumably faster on x87, which is no longer relevant since we pretty much assume SSE2 or later on x86. Meanwhile this function is ~2.5x slower than the normal float

[FFmpeg-devel] [PATCH 1/6] lavu/riscv: implement floating point clips

2024-07-25 Thread Rémi Denis-Courmont
Unlike x86, fmin/fmax are single instructions, not function calls. They are much much faster than doing a comparison, then branching based on its results. With this, audiodsp.vector_clipf gets almost twice as fast, and a properly unrollled version of it gets 4-5x faster, on SiFive-U74. This is only

[FFmpeg-devel] [PATCH 2/6] lavc/audiodsp: properly unroll vector_clipf

2024-07-25 Thread Rémi Denis-Courmont
Given that source and destination can alias, the compiler was forced to perform each read-modify-write sequentially. We cannot use the `restrict` qualifier to avoid this here because the AC-3 encoder uses the function in-place. Instead this commit provides an explicit guarantee to the compiler that

Re: [FFmpeg-devel] [PATCH] lavc/pixblockdsp: specialise aligned 16-bit get_pixels

2024-07-25 Thread James Almer
On 7/25/2024 1:50 PM, Rémi Denis-Courmont wrote: Le torstaina 25. heinäkuuta 2024, 19.16.21 EEST James Almer a écrit : On 7/25/2024 12:53 PM, Rémi Denis-Courmont wrote: The current code assumes that we have unaligned rows, which hurts on platforms with slower unaligned accesses. (Also, this let

[FFmpeg-devel] [PATCH] lavc/h264dsp: use saturing add/sub for R-V V 8-bit DC add

2024-07-25 Thread Rémi Denis-Courmont
T-Head C908 (cycles): h264_idct4_dc_add_8bpp_c: 109.2 h264_idct4_dc_add_8bpp_rvv_i32: 34.5 (before) h264_idct4_dc_add_8bpp_rvv_i32: 25.5 (after) h264_idct8_dc_add_8bpp_c: 418.7 h264_idct8_dc_add_8bpp_rvv_i64: 69.5 (before) h264_idct8_dc_add_8bpp_rvv_i64: 33.5 (after) --- libavcodec/riscv

Re: [FFmpeg-devel] [PATCH] lavc/pixblockdsp: specialise aligned 16-bit get_pixels

2024-07-25 Thread Rémi Denis-Courmont
Le torstaina 25. heinäkuuta 2024, 19.16.21 EEST James Almer a écrit : > On 7/25/2024 12:53 PM, Rémi Denis-Courmont wrote: > > The current code assumes that we have unaligned rows, which hurts on > > platforms with slower unaligned accesses. (Also, this lets the compiler > > unroll manually, which i

[FFmpeg-devel] [PATCH] x86/intreadwrite: add SSE2 optimized AV_COPY128U

2024-07-25 Thread James Almer
Signed-off-by: James Almer --- libavutil/x86/intreadwrite.h | 7 +++ 1 file changed, 7 insertions(+) diff --git a/libavutil/x86/intreadwrite.h b/libavutil/x86/intreadwrite.h index 65cc6b39a1..c92b75ed12 100644 --- a/libavutil/x86/intreadwrite.h +++ b/libavutil/x86/intreadwrite.h @@ -37,6 +37

Re: [FFmpeg-devel] [PATCH] lavc/pixblockdsp: specialise aligned 16-bit get_pixels

2024-07-25 Thread James Almer
On 7/25/2024 12:53 PM, Rémi Denis-Courmont wrote: The current code assumes that we have unaligned rows, which hurts on platforms with slower unaligned accesses. (Also, this lets the compiler unroll manually, which it seems to do in practice.) --- libavcodec/pixblockdsp.c | 9 - 1 file

[FFmpeg-devel] [PATCH] lavc/pixblockdsp: specialise aligned 16-bit get_pixels

2024-07-25 Thread Rémi Denis-Courmont
The current code assumes that we have unaligned rows, which hurts on platforms with slower unaligned accesses. (Also, this lets the compiler unroll manually, which it seems to do in practice.) --- libavcodec/pixblockdsp.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/

Re: [FFmpeg-devel] [PATCH v3] avfilter: add XPSNR filter

2024-07-25 Thread Helmrich, Christian
ping Should anything be changed in this patch? Christian Helmrich Von: Helmrich, Christian Gesendet: Donnerstag, 4. Juli 2024 17:50 An: ffmpeg-devel@ffmpeg.org Betreff: [PATCH v3] avfilter: add XPSNR filter This is a continuation of last year's version of t

[FFmpeg-devel] [PATCH] lavc/vp8dsp: use saturating add/sub for R-V V DC add

2024-07-25 Thread Rémi Denis-Courmont
T-Head C908 (cycles): vp7_idct_dc_add_c: 108.5 vp7_idct_dc_add_rvv_i32: 56.2 (before) vp7_idct_dc_add_rvv_i32: 47.2 (after) vp8_idct_dc_add_c: 96.2 vp8_idct_dc_add_rvv_i32: 43.0 (before) vp8_idct_dc_add_rvv_i32: 34.0 (after) --- libavcodec/riscv/vp8dsp_rvv.S | 18

Re: [FFmpeg-devel] [WIP] False positives on Coverity

2024-07-25 Thread Michael Niedermayer
On Sat, Jul 13, 2024 at 01:20:23AM +0200, Michael Niedermayer wrote: > On Fri, Jul 12, 2024 at 01:55:42AM +0200, Michael Niedermayer wrote: > [...] > > Only 7 outstanding remain from prior may. and 19 total. So 99% of issues > > down to 3 outstanding prior may and 8 overall > > > [...] > > 16045

[FFmpeg-devel] [PATCH] lavc/riscv: don't set vxrm if unnecessary

2024-07-25 Thread Rémi Denis-Courmont
While narrowing clip is nominally a rounding operation, the rounding mode has no arithmetic consequence if the right shift is by zero bits. --- libavcodec/riscv/h263dsp_rvv.S | 5 ++--- libavcodec/riscv/vp8dsp_rvv.S | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/

[FFmpeg-devel] [PATCH 1/3] avcodec/vvcdec: Use av_image_copy_plane for DMVR 10-bit integer pixels

2024-07-25 Thread Nuo Mi
It's no need to shift and interpolate for 10-bit integer pixels, av_image_copy_plane is enough --- libavcodec/vvc/inter_template.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libavcodec/vvc/inter_template.c b/libavcodec/vvc/inter_template.c index 89eb8f..afcee2e3

[FFmpeg-devel] [PATCH 2/3] x86/vvcdec: add dmvr avx2 code

2024-07-25 Thread Nuo Mi
Decoder-Side Motion Vector Refinement is about 4~8% CPU usage for some clips here is the test result for one time clips | before| after | delta --|---|---|-- RitualDance_1920x1080_60_10_420_37_RA.266 | 338.7 |

[FFmpeg-devel] [PATCH 3/3] checkasm: add tests for vvc dmvr

2024-07-25 Thread Nuo Mi
dmvr_8_12x20_c: 186.2 dmvr_8_12x20_avx2: 25.7 dmvr_8_20x12_c: 181.7 dmvr_8_20x12_avx2: 25.2 dmvr_8_20x20_c: 283.2 dmvr_8_20x20_avx2: 32.0 dmvr_10_12x20_c: 90.0 dmvr_10_12x20_avx2: 15.7 dmvr_10_20x12_c: 41.0 dmvr_10_20x12_avx2: 14.7 dmvr_10_20x20_c: 81.5 dmvr_10_20x20_avx2: 26.7 dmvr_12_12x20_c: 190

Re: [FFmpeg-devel] [PATCH] avcodec/amf_enc: av1 cropping support

2024-07-25 Thread James Almer
On 7/25/2024 9:06 AM, Araz Iusubov wrote: --- libavcodec/amfenc.c | 6 libavcodec/amfenc.h | 3 ++ libavcodec/amfenc_av1.c | 64 - 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c i

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/vvc_parser: move avctx->has_b_frames initialization to dec

2024-07-25 Thread Nuo Mi
On Wed, Jul 24, 2024 at 2:56 AM wrote: > From: Wu Jianhua > > From Jun Zhao : > > Should we relocate this to the decoder? Other codecs typically set this > > parameter in the decoder. > Thank you, Jianhua. will apply next week. > > Signed-off-by: Wu Jianhua > --- > libavcodec/vvc/dec.c| 1

Re: [FFmpeg-devel] [PATCH] avcodec/amf_enc: av1 cropping support

2024-07-25 Thread Zhao Zhili
> On Jul 25, 2024, at 20:06, Araz Iusubov wrote: > > --- > libavcodec/amfenc.c | 6 > libavcodec/amfenc.h | 3 ++ > libavcodec/amfenc_av1.c | 64 - > 3 files changed, 72 insertions(+), 1 deletion(-) > > diff --git a/libavcodec/amfenc.c b/liba

[FFmpeg-devel] [PATCH] avcodec/amf_enc: av1 cropping support

2024-07-25 Thread Araz Iusubov
--- libavcodec/amfenc.c | 6 libavcodec/amfenc.h | 3 ++ libavcodec/amfenc_av1.c | 64 - 3 files changed, 72 insertions(+), 1 deletion(-) diff --git a/libavcodec/amfenc.c b/libavcodec/amfenc.c index 061859f85c..93925854e0 100644 --- a/libavco

Re: [FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-25 Thread Rémi Denis-Courmont
Le 25 juillet 2024 10:54:15 GMT+03:00, "Ronald S. Bultje" a écrit : >Hi, > >On Wed, Jul 24, 2024 at 8:41 PM Rémi Denis-Courmont wrote: > >> but then again, he de facto excluded himself by making a hostile fork. >> > >Forking is very much a part of the opensource spirit, and hostile is very >su

Re: [FFmpeg-devel] [PATCH] swscale: [loongarch] Fix checkasm-sw_yuv2rgb failure.

2024-07-25 Thread 陈昊
LGTM 本邮件及其附件含有龙芯中科的商业秘密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制或散发)本邮件及其附件中的信息。如果您错收本邮件,请您立即电话或邮件通知发件人并删除本邮件。 This email and its attachments contain confidential information from Loongson Technology , which is intended only for the person or entity whose address is listed above

[FFmpeg-devel] [PATCH] swscale: [loongarch] Fix checkasm-sw_yuv2rgb failure.

2024-07-25 Thread Shiyou Yin
--- libswscale/loongarch/swscale_init_loongarch.c | 104 +- libswscale/loongarch/yuv2rgb_lasx.c | 4 +- 2 files changed, 56 insertions(+), 52 deletions(-) diff --git a/libswscale/loongarch/swscale_init_loongarch.c b/libswscale/loongarch/swscale_init_loongarch.c index

Re: [FFmpeg-devel] [PATCH v4 1/3] avcodec/jpeg2000dec: Add support for CAP and CPF markers

2024-07-25 Thread Tomas Härdin
sön 2024-07-21 klockan 14:07 +0900 skrev Pierre-Anthony Lemieux: > On Sat, Jul 20, 2024 at 5:12 PM Tomas Härdin wrote: > > > > tor 2024-07-18 klockan 23:10 +0900 skrev Pierre-Anthony Lemieux: > > > On Mon, Jul 15, 2024 at 10:33 PM Tomas Härdin > > > wrote: > > > > > > > > fre 2024-07-12 klockan

[FFmpeg-devel] [GASPP PATCH] Omit the "-c" argument from the preprocessing command

2024-07-25 Thread Martin Storsjö
A command like "cc -c -E" is tautological; the -c is ignored, when we explicitly specify that we want to preprocess only. Since https://github.com/llvm/llvm-project/commit/6461e537815f7fa68cef06842505353cf5600e9c and https://github.com/llvm/llvm-project/pull/98607, Clang now warns about the unused

Re: [FFmpeg-devel] [PATCH v2] avfilter: fix data type for {Tile, Untile}Context's image size

2024-07-25 Thread Ronald S. Bultje
Hi, On Wed, Jul 24, 2024 at 8:41 PM Rémi Denis-Courmont wrote: > but then again, he de facto excluded himself by making a hostile fork. > Forking is very much a part of the opensource spirit, and hostile is very subjective. Such a precedent would be abused over and over. (I agree with some oth