Re: [FFmpeg-devel] [PATCHv5 00/31] RISC-V CPU extensions

2022-09-26 Thread Lynne
Sep 25, 2022, 16:25 by r...@remlab.net: > Hello, > > Changes since version version 5: > - Use shifted-add instructions where applicable (pointer arithmetic) to > minimise scalar operations to the absolute minimum. > - Add AAC PS DSP stereo interpolation [0]. > > The following changes since commit

[FFmpeg-devel] [PATCH] lavc/cbs_av1: restore CodedBitstreamAV1Context when AVERROR(ENOSPC)

2022-09-26 Thread Xiang, Haihao
From: Haihao Xiang The current pbc might be small for an obu frame, so a new pbc is required then parse this obu frame again. Because CodedBitstreamAV1Context has already been updated for this obu frame, we need to restore CodedBitstreamAV1Context, otherwise CodedBitstreamAV1Context doesn't match

Re: [FFmpeg-devel] [PATCH v4] libavcodec/cbs_av1: Add size check before parse obu

2022-09-26 Thread Xiang, Haihao
On Wed, 2022-09-21 at 17:41 +0800, Wenbin Chen wrote: > cbs_av1_write_obu() check pbc size after parsing obu frame, and return > AVERROR(ENOSPC) if pbc is small. pbc will be reallocated and this obu > frame will be parsed again, but this may cause error because > CodedBitstreamAV1Context has alread

Re: [FFmpeg-devel] Bug on Bayer conversions

2022-09-26 Thread Anton Khirnov
Quoting Chema Gonzalez (2022-09-25 17:54:16) > Hi, > > I found an issue while playing with Bayer pixel format conversions. > > ``` > $ echo -ne > '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xff\xff\xff\xff\xff\

Re: [FFmpeg-devel] [PATCH 05/31] lavu/cpu: CPU flags for the RISC-V Vector extension

2022-09-26 Thread Andreas Rheinhardt
Lynne: > Sep 25, 2022, 16:25 by r...@remlab.net: > >> From: Rémi Denis-Courmont >> -if ((flags & AV_CPU_FLAG_RVD) && !(flags & AV_CPU_FLAG_RVF)) { >> +if ((flags & AV_CPU_FLAG_RV_ZVE64D) && !(flags & >> AV_CPU_FLAG_RV_ZVE64X)) { >> +av_log(NULL, AV_LOG_WARNING, "RV%s implied by s

Re: [FFmpeg-devel] [PATCH v4] libavcodec/cbs_av1: Add size check before parse obu

2022-09-26 Thread Chen, Wenbin
> On Wed, 2022-09-21 at 17:41 +0800, Wenbin Chen wrote: > > cbs_av1_write_obu() check pbc size after parsing obu frame, and return > > AVERROR(ENOSPC) if pbc is small. pbc will be reallocated and this obu > > frame will be parsed again, but this may cause error because > > CodedBitstreamAV1Context

Re: [FFmpeg-devel] [PATCH] avcodec/mjpegdec: check that component index is positive

2022-09-26 Thread Anton Khirnov
Quoting Paul B Mahol (2022-09-25 19:16:43) > Patch attached > > From 0a28ae573654d05ef56cafbb169674b1829f0c6f Mon Sep 17 00:00:00 2001 > From: Paul B Mahol > Date: Sun, 25 Sep 2022 19:17:25 +0200 > Subject: [PATCH] avcodec/mjpegdec: check that index is not negative > > Signed-off-by: Paul B Maho

Re: [FFmpeg-devel] [PATCH] libavcodec/qsvenc: fixy typo for min/max qp reset

2022-09-26 Thread Xiang, Haihao
On Mon, 2022-09-26 at 01:51 +, Chen, Wenbin wrote: > > Fixes: 005c7a4 ("libavcodec/qsvenc: Add max/min qp reset support in > > qsvenc") > > CC: Wenbin Chen > > Signed-off-by: Dmitry Rogozhkin > > --- > > libavcodec/qsvenc.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > >

[FFmpeg-devel] [PATCH 1/2] libavcodec/qsvenc: Let runtime to set default parameter.

2022-09-26 Thread Wenbin Chen
Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide these parameters, so that it can choose the best parameter and ffmpeg-qsv can keep up with runtime's update. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc_h264.c | 4 ++-- libavcodec/qsvenc_hevc.c | 2 +- 2 files changed, 3

[FFmpeg-devel] [PATCH 2/2] libavcodec/qsvenc: Let runtime to decide targetUsage

2022-09-26 Thread Wenbin Chen
Set preset default value to MFX_TARGETUSAGE_UNKNOWN. Let runtime to decide the targetUsage, so that ffmpeg-qsv can keep up with runtime's update. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.h b/libavcode

Re: [FFmpeg-devel] [PATCH v5] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI

2022-09-26 Thread Wang, Bin
-Original Message- From: Wang, Bin Sent: Tuesday, September 20, 2022 6:33 PM To: ffmpeg-devel@ffmpeg.org Cc: Wang, Bin Subject: [FFmpeg-devel] [PATCH v5] libavfilter/x86/vf_convolution: add sobel filter optimization and unit test with intel AVX512 VNNI From: bwang30 This commit enabl

Re: [FFmpeg-devel] [PATCH 1/2] libavcodec/qsvenc: Let runtime to set default parameter.

2022-09-26 Thread Andreas Rheinhardt
Wenbin Chen: > Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide > these parameters, so that it can choose the best parameter and ffmpeg-qsv > can keep up with runtime's update. > > Signed-off-by: Wenbin Chen > --- > libavcodec/qsvenc_h264.c | 4 ++-- > libavcodec/qsvenc_hevc

Re: [FFmpeg-devel] [PATCH 1/2] libavcodec/qsvenc: Let runtime to set default parameter.

2022-09-26 Thread Chen, Wenbin
> Wenbin Chen: > > Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide > > these parameters, so that it can choose the best parameter and ffmpeg-qsv > > can keep up with runtime's update. > > > > Signed-off-by: Wenbin Chen > > --- > > libavcodec/qsvenc_h264.c | 4 ++-- > > libav

[FFmpeg-devel] [PATCH 1/4] lavc/aarch64: Add neon implementation for pix_abs8 functions.

2022-09-26 Thread Grzegorz Bernacki
Provide optimized implementation of pix_abs8 function for arm64. Performance comparison tests are shown below: pix_abs_1_1_c: 162.5 pix_abs_1_1_neon: 27.0 pix_abs_1_2_c: 174.0 pix_abs_1_2_neon: 23.5 pix_abs_1_3_c: 203.2 pix_abs_1_3_neon: 34.7 Benchmarks and tests are run with checkasm tool on AWS

[FFmpeg-devel] [PATCH 2/4] lavc/aarch64: Provide neon implementation of nsse8

2022-09-26 Thread Grzegorz Bernacki
Add vectorized implementation of nsse8 function. Performance comparison tests are shown below. - nsse_1_c: 256.0 - nsse_1_neon: 82.7 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Grzegorz Bernacki --- libavcodec/aarch64/me_cmp_init_aarch64.c | 15 libavcode

[FFmpeg-devel] [PATCH 3/4] lavc/aarch64: Provide optimized implementation of vsse8 for arm64.

2022-09-26 Thread Grzegorz Bernacki
Provide optimized implementation of vsse8 for arm64. Performance comparison tests are shown below. - vsse_1_c: 141.5 - vsse_1_neon: 32.5 Benchmarks and tests are run with checkasm tool on AWS Graviton 3. Signed-off-by: Grzegorz Bernacki --- libavcodec/aarch64/me_cmp_init_aarch64.c | 5 ++ lib

[FFmpeg-devel] [PATCH 4/4] lavc/aarch64: Add neon implementation for vsse_intra8

2022-09-26 Thread Grzegorz Bernacki
Provide optimized implementation for vsse_intra8 for arm64. Performance tests are shown below. - vsse_5_c: 87.7 - vsse_5_neon: 26.2 Benchmarks and tests are run with checkasm tool on AWS Graviton 3. --- libavcodec/aarch64/me_cmp_init_aarch64.c | 4 ++ libavcodec/aarch64/me_cmp_neon.S |

[FFmpeg-devel] [PATCH v2] lavc/hevc_ps: fix process failed when SPS before VPS in hvcC

2022-09-26 Thread 1035567130
From: Wang Yaqiang In some videos, SPS will be stored before VPS in hvcC box, parse SPS does not depend on VPS, so the video is expected to be processed normally. Added "parsed_vps" parameter to indicate whether VPS have been parsed. Only VPS have been parsed can be verified during SPS parsing.

Re: [FFmpeg-devel] [PATCH 05/31] lavu/cpu: CPU flags for the RISC-V Vector extension

2022-09-26 Thread Rémi Denis-Courmont
Le 26 septembre 2022 09:51:43 GMT+03:00, Lynne a écrit : >Sep 25, 2022, 16:25 by r...@remlab.net: > >> From: Rémi Denis-Courmont >> -if ((flags & AV_CPU_FLAG_RVD) && !(flags & AV_CPU_FLAG_RVF)) { >> +if ((flags & AV_CPU_FLAG_RV_ZVE64D) && !(flags & >> AV_CPU_FLAG_RV_ZVE64X)) { >> +

[FFmpeg-devel] [PATCH v2 2/2] libavcodec/qsvenc: Let runtime to decide targetUsage

2022-09-26 Thread Wenbin Chen
Set preset default value to MFX_TARGETUSAGE_UNKNOWN. Let runtime to decide the targetUsage, so that ffmpeg-qsv can keep up with runtime's update. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/qsvenc.h b/libavcode

[FFmpeg-devel] [PATCH v2 1/2] libavcodec/qsvenc: Let runtime to set default parameter.

2022-09-26 Thread Wenbin Chen
Unset qsv_h264 and qsv_hevc's default settings. Let runtime to decide these parameters, so that it can choose the best parameter and ffmpeg-qsv can keep up with runtime's update. Signed-off-by: Wenbin Chen --- libavcodec/qsvenc_h264.c | 5 ++--- libavcodec/qsvenc_hevc.c | 3 +-- 2 files changed,

Re: [FFmpeg-devel] [PATCH 09/31] lavu/floatdsp: RISC-V V vector_dmul_scalar

2022-09-26 Thread Rémi Denis-Courmont
Le 26 septembre 2022 09:53:19 GMT+03:00, Lynne a écrit : >Sep 25, 2022, 16:25 by r...@remlab.net: > >> From: Rémi Denis-Courmont >> >> --- >> libavutil/riscv/float_dsp_init.c | 9 - >> libavutil/riscv/float_dsp_rvv.S | 17 + >> 2 files changed, 25 insertions(+), 1 delet

[FFmpeg-devel] [PATCH] configure: Remove dcbzl check for e500v1 and e500v2 architectures

2022-09-26 Thread Peter Krefting
The DCBZL instruction is not available for the e500v1 and e500v2 architectures, but may still be recognized by the toolchain, so we need to remove the test for it explicitly for these architectures. References: PowerPC™ e500 Core Family Reference Manual (Freescale) Found-by: Ståle Kristoffersen

Re: [FFmpeg-devel] [PATCH] configure: Remove dcbzl check for e500v1 and e500v2 architectures

2022-09-26 Thread Rémi Denis-Courmont
Le 26 septembre 2022 13:51:44 GMT+03:00, Peter Krefting a écrit : >The DCBZL instruction is not available for the e500v1 and e500v2 >architectures, but may still be recognized by the toolchain, so we need to >remove the test for it explicitly for these architectures. Isn't this the sort of thing

Re: [FFmpeg-devel] [PATCH 1/8] avutil/mem: Handle fast allocations near UINT_MAX properly

2022-09-26 Thread Tomas Härdin
tis 2022-07-05 klockan 22:09 +0200 skrev Andreas Rheinhardt: > av_fast_realloc and av_fast_mallocz? store the size of > the objects they allocate in an unsigned. Yet they overallocate > and currently they can allocate more than UINT_MAX bytes > in case a user has requested a size of about UINT_MAX

[FFmpeg-devel] [PATCH] avformat/avio: Schedule AVIODirContext to become an opaque type

2022-09-26 Thread Andreas Rheinhardt
Users can't make anything with its content. Making it opaque might allow us to avoid one level of indirection. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ libavformat/avio.c | 6 ++ libavformat/avio.h | 4 libavformat/version_major.h | 1

Re: [FFmpeg-devel] [PATCHv5 00/31] RISC-V CPU extensions

2022-09-26 Thread Rémi Denis-Courmont
Le 26 septembre 2022 10:05:23 GMT+03:00, Lynne a écrit : >Sep 25, 2022, 16:25 by r...@remlab.net: > >> Hello, >> >> Changes since version version 5: >> - Use shifted-add instructions where applicable (pointer arithmetic) to >> minimise scalar operations to the absolute minimum. >> - Add AAC PS DS

Re: [FFmpeg-devel] [PATCH 3/8] avutil/mem: Add av_fast_realloc_array()

2022-09-26 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2022-07-14 14:51:07) >> Anton Khirnov: >>> Quoting Andreas Rheinhardt (2022-07-12 16:12:16) Anton really dislikes the av_fast_* naming and instead wants this to be called av_realloc_array_reuse(). I don't care either way. Any more opinions

[FFmpeg-devel] Patchwork issues

2022-09-26 Thread Marvin Scholz
As I am not sure who else to email about this, I'll just post it here. I tried to register for Patchwork, however I got an error when registering. I tried again and was told the account already exists, I tried to reset the password for the account but did not get any email for that, so it seems so

Re: [FFmpeg-devel] Patchwork issues

2022-09-26 Thread Martin Storsjö
On Mon, 26 Sep 2022, Marvin Scholz wrote: As I am not sure who else to email about this, I'll just post it here. I tried to register for Patchwork, however I got an error when registering. I tried again and was told the account already exists, I tried to reset the password for the account but d

[FFmpeg-devel] [PATCH] avcodec/ac3dsp: Remove unused parameter

2022-09-26 Thread Andreas Rheinhardt
Forgotten in fd98594a8831ce037a495b6d7e090bd8f81e83a1. Signed-off-by: Andreas Rheinhardt --- libavcodec/ac3dec.c | 2 +- libavcodec/ac3dsp.c | 8 libavcodec/ac3dsp.h | 8 libavcodec/ac3enc.c | 2 +- libavcodec/arm/ac3dsp_init_

[FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Tomas Härdin
Fixed the ABI break in the previous version of this patch, updated all internal uses of related APIs. Tested with both ./configure and ./configure --disable-pthreads Also using a new email for mailing list purposes. /Tomas From 265f1095fb85b1eba18ed1b89fe71531ee09fe9b Mon Sep 17 00:00:00 2001 Fr

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Andreas Rheinhardt
Tomas Härdin: > diff --git a/doc/APIchanges b/doc/APIchanges > index b0a41c9e37..240e549a2f 100644 > --- a/doc/APIchanges > +++ b/doc/APIchanges > @@ -14,6 +14,10 @@ libavutil: 2021-04-27 > > API changes, most recent first: > > +2022-09-26 - xx - lavu 57.38.100 - slicethread.h > +

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread James Almer
On 9/26/2022 10:50 AM, Andreas Rheinhardt wrote: Tomas Härdin: diff --git a/doc/APIchanges b/doc/APIchanges index b0a41c9e37..240e549a2f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,6 +14,10 @@ libavutil: 2021-04-27 API changes, most recent first: +2022-09-26 - xx

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Andreas Rheinhardt
Tomas Härdin: > diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h > index abeebbb002..50e73c86fa 100644 > --- a/libswscale/swscale_internal.h > +++ b/libswscale/swscale_internal.h > @@ -306,7 +306,7 @@ typedef struct SwsContext { > > AVSliceThread *slicethread;

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Tomas Härdin: >> diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h >> index abeebbb002..50e73c86fa 100644 >> --- a/libswscale/swscale_internal.h >> +++ b/libswscale/swscale_internal.h >> @@ -306,7 +306,7 @@ typedef struct SwsContext { >> >> AVSl

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Tomas Härdin
mån 2022-09-26 klockan 15:58 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > diff --git a/libswscale/swscale_internal.h > > b/libswscale/swscale_internal.h > > index abeebbb002..50e73c86fa 100644 > > --- a/libswscale/swscale_internal.h > > +++ b/libswscale/swscale_internal.h > > @@ -306,7 +306,

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Tomas Härdin
mån 2022-09-26 klockan 10:54 -0300 skrev James Almer: > On 9/26/2022 10:50 AM, Andreas Rheinhardt wrote: > > Tomas Härdin: > > > diff --git a/doc/APIchanges b/doc/APIchanges > > > index b0a41c9e37..240e549a2f 100644 > > > --- a/doc/APIchanges > > > +++ b/doc/APIchanges > > > @@ -14,6 +14,10 @@ liba

Re: [FFmpeg-devel] [PATCH 3/8] avutil/mem: Add av_fast_realloc_array()

2022-09-26 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Anton Khirnov: >> Quoting Andreas Rheinhardt (2022-07-14 14:51:07) >>> Anton Khirnov: Quoting Andreas Rheinhardt (2022-07-12 16:12:16) > Anton really dislikes the av_fast_* naming and instead wants this to be > called av_realloc_array_reuse(). I don't care either

Re: [FFmpeg-devel] [PATCH] libavformat\matroskadec.c: crop support for matroska demuxer.

2022-09-26 Thread Dmitrii Ovchinnikov
Hi Andreas, Thanks for your quick and direct feedback about the patch. Your feedback about the displayWidth, displayHeight and the display aspect ratio shows that you have deep thinking in this area. I have several questions and comments about your feedback. 1. Yes, i will get this change, and p

Re: [FFmpeg-devel] [PATCH 3/8] avutil/mem: Add av_fast_realloc_array()

2022-09-26 Thread Tomas Härdin
mån 2022-09-26 klockan 14:25 +0200 skrev Andreas Rheinhardt: > Anton Khirnov: > > Quoting Andreas Rheinhardt (2022-07-14 14:51:07) > > > Anton Khirnov: > > > > Quoting Andreas Rheinhardt (2022-07-12 16:12:16) > > > > > Anton really dislikes the av_fast_* naming and instead wants > > > > > this to b

Re: [FFmpeg-devel] Patchwork issues

2022-09-26 Thread Andriy Gelman
On Mon, 26. Sep 14:46, Marvin Scholz wrote: > As I am not sure who else to email about this, I'll just post it here. > > I tried to register for Patchwork, however I got an error when registering. > I tried again and was told the account already exists, I tried to reset the > password for the acco

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Andreas Rheinhardt
Tomas Härdin: > mån 2022-09-26 klockan 15:58 +0200 skrev Andreas Rheinhardt: >> Tomas Härdin: >>> diff --git a/libswscale/swscale_internal.h >>> b/libswscale/swscale_internal.h >>> index abeebbb002..50e73c86fa 100644 >>> --- a/libswscale/swscale_internal.h >>> +++ b/libswscale/swscale_internal.h >>

Re: [FFmpeg-devel] [PATCH v3] Add avpriv_slicethread_create2() and avpriv_slicethread_execute2(), make execute() and execute2() return FFMIN() of thread return codes

2022-09-26 Thread Tomas Härdin
mån 2022-09-26 klockan 16:28 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > mån 2022-09-26 klockan 15:58 +0200 skrev Andreas Rheinhardt: > > > Tomas Härdin: > > > > diff --git a/libswscale/swscale_internal.h > > > > b/libswscale/swscale_internal.h > > > > index abeebbb002..50e73c86fa 100644 >

[FFmpeg-devel] [PATCHv6 00/31] initial RISC-V CPU extensions

2022-09-26 Thread Rémi Denis-Courmont
Hi, This should address all comments from the previous version. Changes since version 5: - No longer nest CPU glag checks. - Remove all forced flags stuff (redundant after previous point). - Rename CPU flags to make them more legible. - Simplify/optimise AAC PS stereo interleave using 2-s

[FFmpeg-devel] [PATCH 01/31] lavu/cpu: detect RISC-V base extensions

2022-09-26 Thread remi
From: Rémi Denis-Courmont This introduces compile-time and run-time CPU detection on RISC-V. In practice, I doubt that FFmpeg will ever see a RISC-V CPU without all of I, F and D extensions, and if it does, it probably won't have run-time detection. So the flags are essentially always set. But a

[FFmpeg-devel] [PATCH 02/31] lavu/riscv: initial common header for assembler macros

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/asm.S | 77 +++ 1 file changed, 77 insertions(+) create mode 100644 libavutil/riscv/asm.S diff --git a/libavutil/riscv/asm.S b/libavutil/riscv/asm.S new file mode 100644 index 00..dbd97f40a4 --- /dev/

[FFmpeg-devel] [PATCH 03/31] lavc/audiodsp: RISC-V F vector_clipf

2022-09-26 Thread remi
From: Rémi Denis-Courmont RV64G supports MIN & MAX instructions natively only on floating point registers, not general purpose ones. The later would require the Zbb extension. Due to that, it is actually faster to perform the clipping "properly" in FPU. Benchmarks on SiFive U74-MC (courtesy of S

[FFmpeg-devel] [PATCH 09/31] lavu/floatdsp: RISC-V V vector_dmul_scalar

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 6 ++ libavutil/riscv/float_dsp_rvv.S | 17 + 2 files changed, 23 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index f4299049b0..3386139d49 100644 --- a/libav

[FFmpeg-devel] [PATCH 04/31] lavc/pixblockdsp: RISC-V I get_pixels

2022-09-26 Thread remi
From: Rémi Denis-Courmont Benchmarks on SiFive U74-MC (courtesy of Shanghai StarFive Tech): get_pixels_c: 180.0 get_pixels_rvi: 136.7 --- libavcodec/pixblockdsp.c| 2 + libavcodec/pixblockdsp.h| 2 + libavcodec/riscv/Makefile | 2 + libavcodec/riscv/pixblockd

[FFmpeg-devel] [PATCH 10/31] lavu/floatdsp: RISC-V V vector_fmul

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 6 +- libavutil/riscv/float_dsp_rvv.S | 17 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 3386139d49..2482094ab4 100

[FFmpeg-devel] [PATCH 11/31] lavu/floatdsp: RISC-V V vector_dmul

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 6 +- libavutil/riscv/float_dsp_rvv.S | 17 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 2482094ab4..29114dfb82 100

[FFmpeg-devel] [PATCH 12/31] lavu/floatdsp: RISC-V V vector_fmac_scalar

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 19 +++ 2 files changed, 22 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 29114dfb82..9e19413d5d 100644 --- a/libavu

[FFmpeg-devel] [PATCH 13/31] lavu/floatdsp: RISC-V V vector_dmac_scalar

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 18 ++ 2 files changed, 21 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 9e19413d5d..a559bbb32b 100644 --- a/libavut

[FFmpeg-devel] [PATCH 16/31] lavu/floatdsp: RISC-V V vector_fmul_reverse

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 21 + 2 files changed, 24 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index a1cd180cdc..b99e3080c9 100644 --- a/liba

[FFmpeg-devel] [PATCH 17/31] lavu/floatdsp: RISC-V V vector_fmul_window

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 33 2 files changed, 36 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index b99e3080c9..44a505308d 100644

[FFmpeg-devel] [PATCH 05/31] lavu/cpu: CPU flags for the RISC-V Vector extension

2022-09-26 Thread remi
From: Rémi Denis-Courmont RVV defines a total of 12 different extensions, including: - 5 different instruction subsets: - Zve32x: 8-, 16- and 32-bit integers, - Zve32f: Zve32x plus single precision floats, - Zve64x: Zve32x plus 64-bit integers, - Zve64f: Zve32f plus Zve64x, - Zve64d: Z

[FFmpeg-devel] [PATCH 18/31] lavu/floatdsp: RISC-V V scalarproduct_float

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 2 ++ libavutil/riscv/float_dsp_rvv.S | 20 2 files changed, 22 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 44a505308d..e61f887862 100644 --- a/libavu

[FFmpeg-devel] [PATCH 20/31] lavc/audiodsp: RISC-V V vector_clip_int32

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/Makefile| 1 + libavcodec/riscv/audiodsp_init.c | 9 libavcodec/riscv/audiodsp_rvv.S | 36 3 files changed, 46 insertions(+) create mode 100644 libavcodec/riscv/audiodsp_rvv.S diff --git a/libav

[FFmpeg-devel] [PATCH 14/31] lavu/floatdsp: RISC-V V vector_fmul_add

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 19 +++ 2 files changed, 22 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index a559bbb32b..8982436647 100644 --- a/libavu

[FFmpeg-devel] [PATCH 15/31] lavu/floatdsp: RISC-V V butterflies_float

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 2 ++ libavutil/riscv/float_dsp_rvv.S | 18 ++ 2 files changed, 20 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 8982436647..a1cd180cdc 100644 --- a/libavuti

[FFmpeg-devel] [PATCH 19/31] lavu/fixeddsp: RISC-V V butterflies_fixed

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavutil/fixed_dsp.c| 4 +++- libavutil/fixed_dsp.h| 1 + libavutil/riscv/Makefile | 4 +++- libavutil/riscv/fixed_dsp_init.c | 38 ++ libavutil/riscv/fixed_dsp_rvv.S | 40 +

[FFmpeg-devel] [PATCH 24/31] lavc/fmtconvert: RISC-V V int32_to_float_fmul_array8

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/fmtconvert_init.c | 7 ++- libavcodec/riscv/fmtconvert_rvv.S | 28 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/fmtconvert_init.c b/libavcodec/riscv/fmtconvert_init.c index b2c24

[FFmpeg-devel] [PATCH 22/31] lavc/audiodsp: RISC-V V scalarproduct_int16

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/audiodsp_init.c | 5 - libavcodec/riscv/audiodsp_rvv.S | 19 +++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/audiodsp_init.c b/libavcodec/riscv/audiodsp_init.c index 9c9265531d..32c3c6794d 10

[FFmpeg-devel] [PATCH 25/31] lavc/vorbisdsp: RISC-V V inverse_coupling

2022-09-26 Thread remi
From: Rémi Denis-Courmont This uses the following vectorisation: for (i = 0; i < blocksize; i++) { ang[i] = mag[i] - copysignf(fmaxf(ang[i], 0.f), mag[i]); mag[i] = mag[i] - copysignf(fminf(ang[i], 0.f), mag[i]); } --- libavcodec/riscv/Makefile | 2 ++ libavcode

[FFmpeg-devel] [PATCH 21/31] lavc/audiodsp: RISC-V V vector_clipf

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/audiodsp_init.c | 3 +++ libavcodec/riscv/audiodsp_rvv.S | 17 + 2 files changed, 20 insertions(+) diff --git a/libavcodec/riscv/audiodsp_init.c b/libavcodec/riscv/audiodsp_init.c index ac06848a82..9c9265531d 100644 --- a/libavcod

[FFmpeg-devel] [PATCH 26/31] lavc/aacpsdsp: RISC-V V add_squares

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/aacpsdsp.h| 1 + libavcodec/aacpsdsp_template.c | 2 ++ libavcodec/riscv/Makefile| 2 ++ libavcodec/riscv/aacpsdsp_init.c | 37 libavcodec/riscv/aacpsdsp_rvv.S | 37 +++

[FFmpeg-devel] [PATCH 23/31] lavc/fmtconvert: RISC-V V int32_to_float_fmul_scalar

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/fmtconvert.c| 2 ++ libavcodec/fmtconvert.h| 1 + libavcodec/riscv/Makefile | 2 ++ libavcodec/riscv/fmtconvert_init.c | 39 ++ libavcodec/riscv/fmtconvert_rvv.S | 39 +++

[FFmpeg-devel] [PATCH 30/31] lavc/aacpsdsp: RISC-V V hybrid_synthesis_deint

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/aacpsdsp_init.c | 6 +- libavcodec/riscv/aacpsdsp_rvv.S | 35 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/aacpsdsp_init.c b/libavcodec/riscv/aacpsdsp_init.c index 1d36f89f6e.

[FFmpeg-devel] [PATCH 27/31] lavc/aacpsdsp: RISC-V V mul_pair_single

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/aacpsdsp_init.c | 6 +- libavcodec/riscv/aacpsdsp_rvv.S | 17 + 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/aacpsdsp_init.c b/libavcodec/riscv/aacpsdsp_init.c index 83f6d9b16b..21fd5b8470 100

[FFmpeg-devel] [PATCH 28/31] lavc/aacpsdsp: RISC-V V hybrid_analysis

2022-09-26 Thread remi
From: Rémi Denis-Courmont This starts with one-time initialisation of the 26 constant factors like 08edacc248bce3f8946d75e97188d189c74a6de6. That is done with the scalar instruction set. While the formula can readily be vectored, the gains would (probably) be more than lost in transfering the re

[FFmpeg-devel] [PATCH 29/31] lavc/aacpsdsp: RISC-V V hybrid_analysis_ileave

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/aacpsdsp_init.c | 5 + libavcodec/riscv/aacpsdsp_rvv.S | 35 2 files changed, 40 insertions(+) diff --git a/libavcodec/riscv/aacpsdsp_init.c b/libavcodec/riscv/aacpsdsp_init.c index 09f16f1041..1d36f89f6e 1006

[FFmpeg-devel] [PATCH 31/31] lavc/aacpsdsp: RISC-V V stereo_interpolate[0]

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/aacpsdsp_init.c | 4 +++ libavcodec/riscv/aacpsdsp_rvv.S | 56 2 files changed, 60 insertions(+) diff --git a/libavcodec/riscv/aacpsdsp_init.c b/libavcodec/riscv/aacpsdsp_init.c index c2201ffb6a..f42baf4251 100644

[FFmpeg-devel] [PATCH 08/31] lavu/floatdsp: RISC-V V vector_fmul_scalar

2022-09-26 Thread remi
From: Rémi Denis-Courmont This is based on existing code from the VLC git tree with two minor changes to account for the different function prototypes. --- libavutil/float_dsp.c| 2 ++ libavutil/float_dsp.h| 1 + libavutil/riscv/Makefile | 4 +++- libavutil/ris

[FFmpeg-devel] [PATCH 07/31] lavu/riscv: fallback macros for SH{1, 2, 3}ADD

2022-09-26 Thread remi
From: Rémi Denis-Courmont Those mnemonics require the very latest binutils release at the time of writing. These macros provide seamless backward compatibility. --- libavutil/riscv/asm.S | 19 +++ 1 file changed, 19 insertions(+) diff --git a/libavutil/riscv/asm.S b/libavutil/ri

[FFmpeg-devel] [PATCH 06/31] configure: probe RISC-V Vector extension

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- Makefile | 2 +- configure| 15 +++ ffbuild/arch.mak | 2 ++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 61f79e27ae..1fb742f390 100644 --- a/Makefile +++ b/Makefile @@ -91,7 +91,7 @@ ffbuild/

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/tiff: Remove commented-out code

2022-09-26 Thread Rémi Denis-Courmont
Yes, please. -- 雷米‧德尼-库尔蒙 http://www.remlab.net/ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe

[FFmpeg-devel] [PATCH] checkasm: test packed YUYV to planar YUV 4:2:2

2022-09-26 Thread remi
From: Rémi Denis-Courmont --- tests/checkasm/sw_rgb.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/checkasm/sw_rgb.c b/tests/checkasm/sw_rgb.c index 7cd815e5be..da401e8201 100644 --- a/tests/checkasm/sw_rgb.c +++ b/tests/checkasm/sw_rgb.c @@ -68,7 +68,7 @@ st

[FFmpeg-devel] [PATCH 1/1] libswscale: force a minimum size of the slide for bayer sources

2022-09-26 Thread Chema Gonzalez
Bayer sources are read in groups of 2 lines (e.g. for a BGGR flavor, the first row contains only B and G samples, while the second row contains only G and R samples). They need to be read as a whole. Tested: `` $ echo -ne '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\

Re: [FFmpeg-devel] Bug on Bayer conversions

2022-09-26 Thread Chema Gonzalez
Yeah, it does. Will send a patch. Thanks! -Chema On Mon, Sep 26, 2022 at 12:58 AM Anton Khirnov wrote: > > Quoting Chema Gonzalez (2022-09-25 17:54:16) > > Hi, > > > > I found an issue while playing with Bayer pixel format conversions. > > > > ``` > > $ echo -ne > > '\x00\x00\x00\x00\x00\x00\

Re: [FFmpeg-devel] [PATCH] avformat/mov: Speed up finding MOVFragmentIndexItem

2022-09-26 Thread Zhao Zhili
> -Original Message- > From: ffmpeg-devel-boun...@ffmpeg.org On > Behalf Of Andreas Rheinhardt > Sent: 2022年9月25日 7:21 > To: ffmpeg-devel@ffmpeg.org > Cc: Andreas Rheinhardt > Subject: [FFmpeg-devel] [PATCH] avformat/mov: Speed up finding > MOVFragmentIndexItem > > The MOVFragmentInd

[FFmpeg-devel] [PATCH] avfilter/scale_eval: Reduce rounding error.

2022-09-26 Thread Tristan Schmelcher
When force_original_aspect_ratio and force_divisible_by are both used, dimensions are now rounded to the nearest allowed multiple of force_divisible_by rather than first rounding to the nearest integer and then rounding in a static direction. This results in less distortion of the aspect ratio. Re

Re: [FFmpeg-devel] Patchwork issues

2022-09-26 Thread Michael Niedermayer
On Mon, Sep 26, 2022 at 10:26:45AM -0400, Andriy Gelman wrote: > On Mon, 26. Sep 14:46, Marvin Scholz wrote: > > As I am not sure who else to email about this, I'll just post it here. > > > > I tried to register for Patchwork, however I got an error when registering. > > I tried again and was told

Re: [FFmpeg-devel] Patchwork issues

2022-09-26 Thread Timo Rothenpieler
On 26.09.2022 16:26, Andriy Gelman wrote: On Mon, 26. Sep 14:46, Marvin Scholz wrote: As I am not sure who else to email about this, I'll just post it here. I tried to register for Patchwork, however I got an error when registering. I tried again and was told the account already exists, I tried

[FFmpeg-devel] [PATCH 1/5] avutil/pixdesc: Remove always-false checks

2022-09-26 Thread Andreas Rheinhardt
ff_check_pixfmt_descriptors() was added in commit 20e99a9c10cdbe9ad659dce5bdec569d744f8219. At this time, the values of enum AVPixelFormat were not contiguous; instead there was a jump from 111 to 291 (or from 115 to 295 depending upon AV_PIX_FMT_ABI_GIT_MASTER). ff_check_pixfmt_descriptors() accou

[FFmpeg-devel] [PATCH 2/5] avutil/pixdesc: Avoid direct access to pix fmt desc array

2022-09-26 Thread Andreas Rheinhardt
Instead use av_pix_fmt_desc_next(). It is still possible to check its return values by comparing it with the (currently) expected values and the code does so. Signed-off-by: Andreas Rheinhardt --- libavutil/pixdesc.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff

[FFmpeg-devel] [PATCH 3/5] avutil/pixdesc: Move ff_check_pixfmt_descriptors() to its only user

2022-09-26 Thread Andreas Rheinhardt
Namely to lavu/tests/pixelutils.c. This way, this function will not be included into actual binaries any more. Signed-off-by: Andreas Rheinhardt --- libavutil/internal.h | 2 -- libavutil/pixdesc.c | 48 - libavutil/tests/pixelutils.c | 52 ++

[FFmpeg-devel] [PATCH 4/5] avutil/tests/pixelutils: Use av_assert0 instead for test tools

2022-09-26 Thread Andreas Rheinhardt
These are test tools, so they should be picky. Signed-off-by: Andreas Rheinhardt --- libavutil/tests/pixelutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/tests/pixelutils.c b/libavutil/tests/pixelutils.c index 6e5e8cf738..2d9c4edc47 100644 --- a/libavutil/te

[FFmpeg-devel] [PATCH 5/5] avutil/tests/pixelutils: Test that all non-hw pix fmts have components

2022-09-26 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavutil/tests/pixelutils.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavutil/tests/pixelutils.c b/libavutil/tests/pixelutils.c index 2d9c4edc47..548ecb8801 100644 --- a/libavutil/tests/pixelutils.c +++ b/libavutil/tests/pixelutils.c @@ -47,6 +47

Re: [FFmpeg-devel] [PATCH v2] lavc/hevc_ps: fix process failed when SPS before VPS in hvcC

2022-09-26 Thread Michael Niedermayer
On Mon, Sep 26, 2022 at 05:38:14PM +0800, 1035567...@qq.com wrote: > From: Wang Yaqiang > > In some videos, SPS will be stored before VPS in hvcC box, > parse SPS does not depend on VPS, so the video is expected to be processed > normally. > Added "parsed_vps" parameter to indicate whether VPS h

Re: [FFmpeg-devel] [PATCH] avfilter/scale_eval: Reduce rounding error.

2022-09-26 Thread Michael Niedermayer
On Mon, Sep 26, 2022 at 05:14:09PM +, Tristan Schmelcher wrote: > When force_original_aspect_ratio and force_divisible_by are both > used, dimensions are now rounded to the nearest allowed multiple of > force_divisible_by rather than first rounding to the nearest integer and > then rounding in

[FFmpeg-devel] [PATCH] avcodec/jpeg2000dwt: Fix left shift of negative number

2022-09-26 Thread Andreas Rheinhardt
Fixes the j2k-dwt FATE-test; also fixes #9945. (I don't know whether the multiplication can overflow.) Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeg2000dwt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000dwt.c b/libavcodec/jpeg2000dwt.c index f2da

[FFmpeg-devel] [PATCH] avocdec/snowenc: Fix left shift of negative number

2022-09-26 Thread Andreas Rheinhardt
Fixes the vsynth(1|2|_lena)-snow-ll FATE-tests. Signed-off-by: Andreas Rheinhardt --- libavcodec/snowenc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/snowenc.c b/libavcodec/snowenc.c index b647fc9016..c5ff50639e 100644 --- a/libavcodec/snowenc.c +++ b/libavcod

[FFmpeg-devel] [PATCH] avcodec/jpeg2000dsp: Use unsigned to avoid overflow

2022-09-26 Thread Andreas Rheinhardt
Affected the jpeg2000dsp checkasm test. Signed-off-by: Andreas Rheinhardt --- libavcodec/jpeg2000dsp.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/libavcodec/jpeg2000dsp.c b/libavcodec/jpeg2000dsp.c index b61be3b72f..b1bff6d5b1 100644 --- a/libavcodec/jpeg2000dsp

Re: [FFmpeg-devel] [PATCH] lavc/cbs_av1: restore CodedBitstreamAV1Context when AVERROR(ENOSPC)

2022-09-26 Thread Chen, Wenbin
> From: Haihao Xiang > > The current pbc might be small for an obu frame, so a new pbc is > required then parse this obu frame again. Because > CodedBitstreamAV1Context has already been updated for this obu frame, > we > need to restore CodedBitstreamAV1Context, otherwise > CodedBitstreamAV1Conte

Re: [FFmpeg-devel] [PATCH] lavc/cbs_av1: restore CodedBitstreamAV1Context when AVERROR(ENOSPC)

2022-09-26 Thread James Almer
On 9/26/2022 4:23 AM, Xiang, Haihao wrote: From: Haihao Xiang The current pbc might be small for an obu frame, so a new pbc is required then parse this obu frame again. Because CodedBitstreamAV1Context has already been updated for this obu frame, we need to restore CodedBitstreamAV1Context, oth

Re: [FFmpeg-devel] [PATCH 1/3] libavcodec/qsvenc: Add framerate reset support to qsv

2022-09-26 Thread Xiang, Haihao
On Fri, 2022-09-23 at 10:44 +0800, Wenbin Chen wrote: > Signed-off-by: Wenbin Chen > --- > doc/encoders.texi | 3 +++ > libavcodec/qsvenc.c | 26 ++ > libavcodec/qsvenc.h | 2 ++ > 3 files changed, 31 insertions(+) > > diff --git a/doc/encoders.texi b/doc/encoders.tex

Re: [FFmpeg-devel] [PATCH] lavc/cbs_av1: restore CodedBitstreamAV1Context when AVERROR(ENOSPC)

2022-09-26 Thread Xiang, Haihao
On Tue, 2022-09-27 at 00:31 -0300, James Almer wrote: > On 9/26/2022 4:23 AM, Xiang, Haihao wrote: > > From: Haihao Xiang > > > > The current pbc might be small for an obu frame, so a new pbc is > > required then parse this obu frame again. Because > > CodedBitstreamAV1Context has already been up