Re: [FFmpeg-devel] [PATCH v1 3/3] swscale/la: Add output_lasx.c file.

2022-09-20 Thread Shiyou Yin
> 2022年9月11日 10:06,Shiyou Yin 写道: > > > >> 2022年9月9日 21:11,Andreas Rheinhardt > > 写道: >> >> Shiyou Yin: >>> >>> 2022年9月6日 16:12,Shiyou Yin >>> > 写道: > > 2022年8月29日 20:30,Andreas Rheinhardt

[FFmpeg-devel] [PATCH 2/2] avfilter/avfilter: Make ff_command_queue_pop() static

2022-09-20 Thread Andreas Rheinhardt
Only used here. Signed-off-by: Andreas Rheinhardt --- libavfilter/avfilter.c | 6 +++--- libavfilter/internal.h | 2 -- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index f34204e650..cc5505e65b 100644 --- a/libavfilter/avfilter.c

[FFmpeg-devel] [PATCH 1/2] avfilter/internal: Remove declaration of inexistent function

2022-09-20 Thread Andreas Rheinhardt
ff_get_ref_perms_string() has been removed in 7e350379f87e7f74420b4813170fe808e2313911. Signed-off-by: Andreas Rheinhardt --- libavfilter/internal.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 0128820be0..36969c442e 100644 ---

[FFmpeg-devel] [PATCH 5/5] avformat/internal: Don't include avcodec.h

2022-09-20 Thread Andreas Rheinhardt
The general demuxing API uses parsers and decoders. Therefore FFStream contains pointers to AVCodecContexts and AVCodecParserContext and lavf/internal.h includes lavc/avcodec.h. Yet actually only a few files files really use these; and it is best when this number stays small. Therefore this

[FFmpeg-devel] [PATCH 4/5] avcodec/avcodec: Deprecate lavc chroma pos API functions

2022-09-20 Thread Andreas Rheinhardt
avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum() deal with enum AVChromaLocation which is defined in lavu. These functions are therefore replaced by av_chroma_location_enum_to_pos() and av_chroma_location_pos_to_enum(). This commit provides the necessary deprecations. Also already

[FFmpeg-devel] [PATCH 3/5] avformat/matroska*: Use av_chroma_location_(pos_to_enum|enum_to_pos)

2022-09-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/matroskadec.c | 5 +++-- libavformat/matroskaenc.c | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 16a3e93611..aa59f73d00 100644 --- a/libavformat/matroskadec.c

[FFmpeg-devel] [PATCH 2/5] avutil/pixdesc: Add av_chroma_location_(enum_to_pos|pos_to_enum)

2022-09-20 Thread Andreas Rheinhardt
They are intended as replacements for avcodec_enum_to_chroma_pos() and avcodec_chroma_pos_to_enum(). Signed-off-by: Andreas Rheinhardt --- Will add version bump upon applying. (Honestly, I am not sure whether there is a need for a replacement given that Matroska seems to be the only user of

[FFmpeg-devel] [PATCH 1/5] avcodec/avcodec: Move AV_ER_* and FF_COMPLIANCE_* to defs.h

2022-09-20 Thread Andreas Rheinhardt
They are also frequently used in libavformat. This change does not cause any breakage as avcodec.h includes defs.h. Signed-off-by: Andreas Rheinhardt --- doc/APIchanges | 3 +++ libavcodec/avcodec.h | 25 +++-- libavcodec/defs.h| 22 ++

Re: [FFmpeg-devel] [PATCH] lavc: add detection of forced subtitles

2022-09-20 Thread Scott Theisen
On 9/19/22 16:58, Hendrik Leppkes wrote: On Mon, Sep 19, 2022 at 10:53 PM Andreas Rheinhardt wrote: Scott Theisen: This is from the following MythTV commits: libavcodec: add support for detecting forced subtitle segments.

Re: [FFmpeg-devel] [PATCH] libavformat/fitsdec: use correct type for assert

2022-09-20 Thread Johannes Kauffmann
Now with correct formatting. Patch attached. On 21/09/2022 01:22, Johannes Kauffmann wrote: Since avbuf.len is of type unsigned and not int64_t, compare to UINT_MAX instead of INT64_MAX. This fixes the following warning on clang: src/libavformat/fitsdec.c:177:26: warning: result of comparison

[FFmpeg-devel] [PATCH] libavformat/fitsdec: use correct type for assert

2022-09-20 Thread Johannes Kauffmann
Since avbuf.len is of type unsigned and not int64_t, compare to UINT_MAX instead of INT64_MAX. This fixes the following warning on clang: src/libavformat/fitsdec.c:177:26: warning: result of comparison of constant 9223372036854775807 with expression of type 'unsigned int' is always true

Re: [FFmpeg-devel] [PATCH 03/17] avcodec/avcodec: Check for more invalid channel layouts

2022-09-20 Thread James Almer
On 9/18/2022 5:27 PM, Andreas Rheinhardt wrote: In particular, check the provided channel layout for encoders without AVCodec.ch_layouts set. This fixes an infinite loop in the WavPack encoder (and maybe other issues in other encoders as well) in case the channel count is zero. Signed-off-by:

[FFmpeg-devel] [PATCH] avcodec/h264_slice: Remove always-false check

2022-09-20 Thread Andreas Rheinhardt
The H.264 decoder, the only codec with which this code is ever called, does not set AVCodec.pix_fmts. Signed-off-by: Andreas Rheinhardt --- libavcodec/h264_slice.c | 14 +- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/libavcodec/h264_slice.c

Re: [FFmpeg-devel] [PATCH 01/17] avcodec/avcodec: Uninitialize AVChannelLayout before overwriting it

2022-09-20 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Otherwise, there might be leaks. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/avcodec.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/libavcodec/avcodec.c b/libavcodec/avcodec.c > index 29643199be..a165cdea95 100644 > --- a/libavcodec/avcodec.c >

Re: [FFmpeg-devel] [PATCH] libavformat/flac_picture: Don't return AVERROR_INVALIDDATA for errors with flac picture mimetype

2022-09-20 Thread Will Cassella
Sorry for the delay, didn't see your reply! The issue is that we do want to error out most of the time on invalid input, but for our needs the mime-type of the attached picture being empty or unknown isn't really relevant. Could there be a way to classify this error differently so that it could

Re: [FFmpeg-devel] [PATCH] libavformat/riffec: Zero-initialize `channels` in `ff_get_wav_header`

2022-09-20 Thread James Almer
On 9/9/2022 7:50 PM, Will Cassella wrote: Clang's static analyzer complains that leaving the `channels` variable uninitialized could lead to a code path where the uninitialized value is written to `par->ch_layout.nb_channels` at the end of this function. This patch simply zero-initializes that

Re: [FFmpeg-devel] [PATCH] libavformat/riffec: Zero-initialize `channels` in `ff_get_wav_header`

2022-09-20 Thread Will Cassella
Pinging on this! On Fri, Sep 9, 2022 at 3:50 PM Will Cassella wrote: > > Clang's static analyzer complains that leaving the `channels` variable > uninitialized could lead to a code path where the uninitialized value is > written to `par->ch_layout.nb_channels` at the end of this function. > This

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Write auxi box for animated AVIF with alpha

2022-09-20 Thread Vignesh Venkatasubramanian
On Tue, Sep 20, 2022 at 12:38 PM James Zern wrote: > > On Mon, Sep 19, 2022 at 4:03 PM Vignesh Venkatasubramanian > wrote: > > > > According to the HEIF specification Section 7.5.3.1, tracks with > > It might be worth adding ISO/IEC 23008-12 for added precision. > Done. > > handler_type 'auxv'

[FFmpeg-devel] [PATCH] avformat/movenc: Write auxi box for animated AVIF with alpha

2022-09-20 Thread Vignesh Venkatasubramanian
According to the HEIF specification (ISO/IEC 23008-12) Section 7.5.3.1, tracks with handler_type 'auxv' must contain a 'auxi' box in its SampleEntry to notify the nature of the auxiliary track to the decoder. The content is the same as the 'auxC' box. So parameterize and re-use the existing

[FFmpeg-devel] [PATCH 2/2] avformat/dashdec: Reindent after the previous commit

2022-09-20 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index 2ca91bea8b..29d4680c68 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -961,15

[FFmpeg-devel] [PATCH 1/2] avformat/dashdec: Fix crash on invalid input/ENOMEM, fix leak

2022-09-20 Thread Andreas Rheinhardt
In case a SupplementalProperty node exists in an adaptationset, it is searched for a "schemeIdUri" property via xmlGetProp(). Whatever xmlGetProp() returns is then compared via av_strcasecmp() to a string literal. xmlGetProp() can return NULL, namely in case no "schemeIdUri" exists and (given that

Re: [FFmpeg-devel] [PATCH] avformat/movenc: Write auxi box for animated AVIF with alpha

2022-09-20 Thread James Zern
On Mon, Sep 19, 2022 at 4:03 PM Vignesh Venkatasubramanian wrote: > > According to the HEIF specification Section 7.5.3.1, tracks with It might be worth adding ISO/IEC 23008-12 for added precision. > handler_type 'auxv' must contain a 'auxi' box in its > SampleEntry to notify the nature of the

[FFmpeg-devel] [PATCH 2/2] x86/aacpsdsp: add ps_hybrid_analysis_fma3

2022-09-20 Thread James Almer
This replace the sse3 version, which was not faster than the sse one. Signed-off-by: James Almer --- libavcodec/x86/aacpsdsp.asm| 38 +++--- libavcodec/x86/aacpsdsp_init.c | 6 -- 2 files changed, 21 insertions(+), 23 deletions(-) diff --git

[FFmpeg-devel] [PATCH 1/2] x86/aacpsdsp: precompute constant factors

2022-09-20 Thread James Almer
Inspired by the optimization done to the C version by Rémi Denis-Courmont. Signed-off-by: James Almer --- libavcodec/x86/aacpsdsp.asm | 42 + 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/libavcodec/x86/aacpsdsp.asm

[FFmpeg-devel] [PATCH 7/7] lavfi/vf_scale: set sws job count using ff_filter_get_nb_jobs

2022-09-20 Thread rcombs
This mirrors the existing handling for thread count. --- libavfilter/vf_scale.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 2b12cf283c..db984725bd 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -544,6 +544,7 @@

[FFmpeg-devel] [PATCH 6/7] lavfi/vf_unsharp: use ff_filter_get_nb_jobs

2022-09-20 Thread rcombs
Improves performance by roughly 15% on M1 Max --- libavfilter/unsharp.h| 2 +- libavfilter/vf_unsharp.c | 20 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/libavfilter/unsharp.h b/libavfilter/unsharp.h index 0da6f05036..7af32b0467 100644 ---

[FFmpeg-devel] [PATCH 5/7] ffplay: add filter_jobs arg

2022-09-20 Thread rcombs
This is similar to filter_threads, but controls job count. --- doc/ffplay.texi | 5 + fftools/ffplay.c | 4 2 files changed, 9 insertions(+) diff --git a/doc/ffplay.texi b/doc/ffplay.texi index 5dd860b846..abc857013f 100644 --- a/doc/ffplay.texi +++ b/doc/ffplay.texi @@ -196,6 +196,11

[FFmpeg-devel] [PATCH 4/7] ffmpeg: add filter_jobs and filter_complex_jobs args

2022-09-20 Thread rcombs
These are similar to filter_threads and filter_complex_threads, but control job count. --- doc/ffmpeg.texi | 12 fftools/ffmpeg.c| 1 + fftools/ffmpeg.h| 2 ++ fftools/ffmpeg_filter.c | 7 +++ fftools/ffmpeg_opt.c| 13 + 5 files changed,

[FFmpeg-devel] [PATCH 3/7] lavfi: add jobs args

2022-09-20 Thread rcombs
This allows tuning the number of tasks that frames are sliced into independently from the number of execution pool threads, which can improve performance significantly on asymmetric-multiprocessing systems. --- doc/APIchanges | 3 +++ libavfilter/avfilter.c | 9 +

[FFmpeg-devel] [PATCH 2/7] sws: add jobs option, distinct from threads

2022-09-20 Thread rcombs
This allows for more efficient use of asymmetric-multiprocessing systems. --- libswscale/options.c | 2 ++ libswscale/swscale_internal.h | 1 + libswscale/utils.c| 9 ++--- libswscale/version.h | 2 +- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git

[FFmpeg-devel] [PATCH 1/7] lavu/cpu: add av_cpu_job_count()

2022-09-20 Thread rcombs
This estimates an appropriate number of jobs for a task to be broken up into. This may be higher than the core count in a heterogeneous system. Currently implemented only on Apple platforms; otherwise, we assume homogeneity. --- doc/APIchanges | 3 +++ libavutil/cpu.c | 37

[FFmpeg-devel] [PATCH] lavfi: make job count configurable separately from thread count

2022-09-20 Thread rcombs
Slicing frames into a larger number of jobs can improve performance significantly on asymmetric-multiprocessing systems. On my M1 Max, performance on the two filters transitioned to the new model in this patchset (vf_scale and vf_unsharp, chosen somewhat arbitrarily as reasonable test cases)

[FFmpeg-devel] [PATCH] lavc/aacpsdsp: precompute constant factors

2022-09-20 Thread remi
From: Rémi Denis-Courmont The input complex factors are constant for each iterations. This substitudes 4 loads, 2 additions and 2 subtractions per iteration of the inner-loop with another 4 loads. Thus effectively 4 arithmetic operations per iteration of the inner loop are avoided, i.e. 24

Re: [FFmpeg-devel] [PATCH] fate/cbs: Add tests for h264_redundant_pps BSF

2022-09-20 Thread Andreas Rheinhardt
Andreas Rheinhardt: > This also tests writing slice data in the unaligned mode > (some of these files use CAVLC) as well as updating > side data as well as parsing ISOBMFF avcc extradata. > > Signed-off-by: Andreas Rheinhardt > --- > tests/fate/cbs.mak | 43 ++- >

[FFmpeg-devel] [PATCH v2 4/4] fate/cbs: Add tests for h264_redundant_pps BSF

2022-09-20 Thread Andreas Rheinhardt
This also tests writing slice data in the unaligned mode (some of these files use CAVLC) as well as updating side data as well as parsing ISOBMFF avcc extradata. Signed-off-by: Andreas Rheinhardt --- I mistakenly sent only this commit earlier, but it is intended to be applied on top of the other

[FFmpeg-devel] [PATCH v2 3/4] avformat/nutdec: Don't shrink packet size manually

2022-09-20 Thread Andreas Rheinhardt
It is unnecessary because an av_shrink_packet() a few lines below will set the size; furthermore, it is actually harmful, because av_shrink_packet() does nothing in case the size already matches, so that the packet's padding is not correctly zeroed. Signed-off-by: Andreas Rheinhardt --- I was

[FFmpeg-devel] [PATCH v2 2/4] avcodec/cbs: Only write extradata if there is something to write

2022-09-20 Thread Andreas Rheinhardt
It is e.g. legal for an ISOBMFF avcc to contain zero parameter sets. In this case the annex B that we produce would be empty and therefore useless. This happens e.g. with mov/frag_overlap.mp4 from the FATE-suite. Signed-off-by: Andreas Rheinhardt --- Maybe check for the number of units to write

[FFmpeg-devel] [PATCH v2 1/4] avcodec/h264_redundant_pps_bsf: Don't remove PPS

2022-09-20 Thread Andreas Rheinhardt
There is no check for whether these supposedly redundant PPS are actually redundant. One could check via memcmp which would work in practice* (because all content buffers are initially zero-allocated), but this is not portable as compilers may trash padding inside structures as they wish. In case

[FFmpeg-devel] [PATCH] fate/cbs: Add tests for h264_redundant_pps BSF

2022-09-20 Thread Andreas Rheinhardt
This also tests writing slice data in the unaligned mode (some of these files use CAVLC) as well as updating side data as well as parsing ISOBMFF avcc extradata. Signed-off-by: Andreas Rheinhardt --- tests/fate/cbs.mak | 43 ++-

Re: [FFmpeg-devel] [PATCH 22/26] lavc/fmtconvert: RISC-V V int32_to_float_fmul_scalar

2022-09-20 Thread Rémi Denis-Courmont
Le tiistaina 20. syyskuuta 2022, 18.00.09 EEST Andreas Rheinhardt a écrit : > r...@remlab.net: > > From: Rémi Denis-Courmont > > > > --- > > > > libavcodec/fmtconvert.c| 2 ++ > > libavcodec/fmtconvert.h| 1 + > > libavcodec/riscv/Makefile | 2 ++ > >

[FFmpeg-devel] [PATCH] avcodec/ac3dec: downmix for 7.1 eac3

2022-09-20 Thread Paul B Mahol
Patch attached. From 3f33e226b36a0a186e070d743d2c5686c5995a0e Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Tue, 20 Sep 2022 17:07:15 +0200 Subject: [PATCH] avcodec/ac3dec: add downmix support for mono and stereo for eac3 7.1 Signed-off-by: Paul B Mahol --- libavcodec/ac3dec.c | 55

Re: [FFmpeg-devel] [PATCH 22/26] lavc/fmtconvert: RISC-V V int32_to_float_fmul_scalar

2022-09-20 Thread Andreas Rheinhardt
r...@remlab.net: > From: Rémi Denis-Courmont > > --- > libavcodec/fmtconvert.c| 2 ++ > libavcodec/fmtconvert.h| 1 + > libavcodec/riscv/Makefile | 2 ++ > libavcodec/riscv/fmtconvert_init.c | 41 ++ >

[FFmpeg-devel] [PATCH 08/26] lavu/floatdsp: RISC-V V vector_dmul_scalar

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

[FFmpeg-devel] [PATCH 07/26] lavu/floatdsp: RISC-V V vector_fmul_scalar

2022-09-20 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 +++-

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

2022-09-20 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 @@

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

2022-09-20 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/aacpsdsp_init.c | 6 +- libavcodec/riscv/aacpsdsp_rvv.S | 19 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/aacpsdsp_init.c b/libavcodec/riscv/aacpsdsp_init.c index 525fc9aa38..90c9c501c3

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

2022-09-20 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 | 39

[FFmpeg-devel] [PATCH 21/26] lavc/audiodsp: RISC-V V scalarproduct_int16

2022-09-20 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/audiodsp_init.c | 2 ++ libavcodec/riscv/audiodsp_rvv.S | 20 2 files changed, 22 insertions(+) diff --git a/libavcodec/riscv/audiodsp_init.c b/libavcodec/riscv/audiodsp_init.c index ddd561484f..6f38b7bc83 100644 ---

[FFmpeg-devel] [PATCH 20/26] lavc/audiodsp: RISC-V V vector_clipf

2022-09-20 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/audiodsp_init.c | 7 ++- libavcodec/riscv/audiodsp_rvv.S | 18 ++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/audiodsp_init.c b/libavcodec/riscv/audiodsp_init.c index ce8b60ee52..ddd561484f

[FFmpeg-devel] [PATCH 24/26] lavc/vorbisdsp: RISC-V V inverse_coupling

2022-09-20 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 ++

[FFmpeg-devel] [PATCH 22/26] lavc/fmtconvert: RISC-V V int32_to_float_fmul_scalar

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

[FFmpeg-devel] [PATCH 23/26] lavc/fmtconvert: RISC-V V int32_to_float_fmul_array8

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

[FFmpeg-devel] [PATCH 19/26] lavc/audiodsp: RISC-V V vector_clip_int32

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

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

2022-09-20 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:

[FFmpeg-devel] [PATCH 17/26] lavu/floatdsp: RISC-V V scalarproduct_float

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

[FFmpeg-devel] [PATCH 15/26] lavu/floatdsp: RISC-V V vector_fmul_reversed

2022-09-20 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 22 ++ 2 files changed, 25 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index f164b1308f..9b8fd9942b 100644 ---

[FFmpeg-devel] [PATCH 16/26] lavu/floatdsp: RISC-V V vector_fmul_window

2022-09-20 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 3 +++ libavutil/riscv/float_dsp_rvv.S | 35 2 files changed, 38 insertions(+) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 9b8fd9942b..dacd81c08b

[FFmpeg-devel] [PATCH 18/26] lavu/fixeddsp: RISC-V V butterflies_fixed

2022-09-20 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 | 41

[FFmpeg-devel] [PATCH 14/26] lavu/floatdsp: RISC-V V butterflies_float

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

[FFmpeg-devel] [PATCH 13/26] lavu/floatdsp: RISC-V V vector_fmul_add

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

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

2022-09-20 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 +

[FFmpeg-devel] [PATCH 11/26] lavu/floatdsp: RISC-V V vector_fmac_scalar

2022-09-20 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 6027a67b46..c2d93e0cd7 100644 ---

[FFmpeg-devel] [PATCH 10/26] lavu/floatdsp: RISC-V V vector_dmul

2022-09-20 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/float_dsp_init.c | 6 +- libavutil/riscv/float_dsp_rvv.S | 18 ++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/libavutil/riscv/float_dsp_init.c b/libavutil/riscv/float_dsp_init.c index 60b79bd59e..6027a67b46

[FFmpeg-devel] [PATCH 12/26] lavu/floatdsp: RISC-V V vector_dmac_scalar

2022-09-20 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 c2d93e0cd7..d17d0f66c5 100644 ---

[FFmpeg-devel] [PATCH 09/26] lavu/floatdsp: RISC-V V vector_fmul

2022-09-20 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 b829c0f736..60b79bd59e 100644 ---

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

2022-09-20 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

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

2022-09-20 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 ---

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

2022-09-20 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

[FFmpeg-devel] [PATCHv3 00/26] RISC-V CPU extensions

2022-09-20 Thread Rémi Denis-Courmont
Hello, This supersedes the previous RISC-V sets. Patches 01-04 support scalar "extensions", including benchmarks on SiFive U74. Patches 05-06 provide vector support detection. Patches 07-26 are initial vector optimisations validated with checkasm. Detection of the vector length and

Re: [FFmpeg-devel] [PATCH v5 00/25] Subtitle Filtering 2022

2022-09-20 Thread Soft Works
> -Original Message- > From: ffmpeg-devel On Behalf Of > Soft Works > Sent: Wednesday, August 31, 2022 6:02 AM > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Subject: Re: [FFmpeg-devel] [PATCH v5 00/25] Subtitle Filtering 2022 > > > > > -Original

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpeg2000: Add support for High-Throughput JPEG 2000 (HTJ2K) decoding.

2022-09-20 Thread Tomas Härdin
tor 2022-09-08 klockan 23:49 +0300 skrev etemesica...@gmail.com: > > --- a/libavcodec/j2kenc.c > +++ b/libavcodec/j2kenc.c > @@ -106,7 +106,7 @@ static const int dwt_norms[2][4][10] = { // > [dwt_type][band][rlevel] (multiplied >  typedef struct { >     Jpeg2000Component *comp; >     double

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

2022-09-20 Thread Wang, Bin
Thanks for the review, based on the comments, patch v5 is sent out: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20220920103305.7902-1-bin.w...@intel.com/ Changes: 1. Remove redundant zero-initializations in asm code 2. Pass depth and nb_planes as parameters to ff_sobel_init_x86()

Re: [FFmpeg-devel] [PATCH 02/13] avformat/mxfdec: Check run_in to fit in int and be valid

2022-09-20 Thread Tomas Härdin
tis 2022-09-20 klockan 13:07 +0200 skrev Tomas Härdin: > sön 2022-09-18 klockan 19:13 +0200 skrev Michael Niedermayer: > > Fixes: signed integer overflow: 9223372036854775807 - -2146905566 > > cannot be represented in type 'long' > > Fixes:

Re: [FFmpeg-devel] [PATCH 1/5] avformat/mxfdec: Avoid some redundant writing to tables in mxf_compute_ptses_fake_index()

2022-09-20 Thread Tomas Härdin
sön 2022-09-11 klockan 16:27 +0200 skrev Michael Niedermayer: > Signed-off-by: Michael Niedermayer > --- >  libavformat/mxfdec.c | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > index e63e803aa56..4ceb6cf672f 100644 > ---

Re: [FFmpeg-devel] [PATCH 02/13] avformat/mxfdec: Check run_in to fit in int and be valid

2022-09-20 Thread Tomas Härdin
sön 2022-09-18 klockan 19:13 +0200 skrev Michael Niedermayer: > Fixes: signed integer overflow: 9223372036854775807 - -2146905566 > cannot be represented in type 'long' > Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer- > 6570996594769920 > > Found-by: continuous fuzzing process

[FFmpeg-devel] [PATCH 3/3] lavc/aarch64: Add neon implementation for pix_median_abs8

2022-09-20 Thread Hubert Mazur
Provide optimized implementation for pix_median_abs8 function. Performance comparison tests are shown below. - median_sad_1_c: 277.0 - median_sad_1_neon: 82.0 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur ---

[FFmpeg-devel] [PATCH 2/3] lavc/aarch64: Add neon implementation for vsad8_intra

2022-09-20 Thread Hubert Mazur
Provide optimized implementation for vsad8_intra function. Performance comparison tests are shown below. - vsad_5_c: 94.7 - vsad_5_neon: 20.7 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur --- libavcodec/aarch64/me_cmp_init_aarch64.c | 3 ++

[FFmpeg-devel] [PATCH 1/3] lavc/aarch64: Add neon implementation for pix_median_abs16

2022-09-20 Thread Hubert Mazur
Provide optimized implementation for pix_median_abs16 function. Performance comparison tests are shown below. - median_sad_0_c: 720.5 - median_sad_0_neon: 127.2 Benchmarks and tests run with checkasm tool on AWS Graviton 3. Signed-off-by: Hubert Mazur ---

[FFmpeg-devel] [PATCH 0/3] Provide neon implementations

2022-09-20 Thread Hubert Mazur
This fixes issues addressed in previous patchset: - move sub instruction in vsad8_intra, - remove unnecessary mov instructions, - remove single lane extraction in loop and place it at the end. Removing mov instructions from pix_median_abs functions significantly increased peformance for both.

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

2022-09-20 Thread bin . wang-at-intel . com
From: bwang30 This commit enabled assembly code with intel AVX512 VNNI and added unit test for sobel filter sobel_c: 4537 sobel_avx512icl 2136 Signed-off-by: bwang30 --- libavfilter/convolution.h | 74 + libavfilter/vf_convolution.c | 91 +++-

Re: [FFmpeg-devel] [PATCH 2/2] MAINTAINERS: remove the project leader section

2022-09-20 Thread Anton Khirnov
Quoting Paul B Mahol (2022-09-20 10:52:10) > On 9/20/22, Anton Khirnov wrote: > > The position does not exist anymore. > > --- > > MAINTAINERS | 6 -- > > 1 file changed, 6 deletions(-) > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 4f94d662db..eebfa5cfb7 100644 > > ---

Re: [FFmpeg-devel] [PATCH v4 0/6] Add display_matrix option

2022-09-20 Thread Anton Khirnov
Quoting Nicolas George (2022-09-20 11:05:59) > Anton Khirnov (12022-09-20): > > I still see no convincing arguments in favor of adding all this > > complexity just so that we can stuff multiple options into one and get a > > WORSE user interface. > > > > Just add multiple options. > > We agree,

Re: [FFmpeg-devel] [PATCH 2/2] fate/mxf: Add ProRes remux test

2022-09-20 Thread Tomas Härdin
ons 2022-09-07 klockan 17:03 +0200 skrev Andreas Rheinhardt: > Also covers writing mastering display metadata. > > Signed-off-by: Andreas Rheinhardt > --- > This is an updated version of > https://ffmpeg.org/pipermail/ffmpeg-devel/2021-November/287641.html > >  tests/fate/mxf.mak   

Re: [FFmpeg-devel] [PATCH v4 0/6] Add display_matrix option

2022-09-20 Thread Nicolas George
Anton Khirnov (12022-09-20): > I still see no convincing arguments in favor of adding all this > complexity just so that we can stuff multiple options into one and get a > WORSE user interface. > > Just add multiple options. We agree, except on the last point. All user-visible FFmpeg types

Re: [FFmpeg-devel] [PATCH 2/2] MAINTAINERS: remove the project leader section

2022-09-20 Thread Paul B Mahol
On 9/20/22, Anton Khirnov wrote: > The position does not exist anymore. > --- > MAINTAINERS | 6 -- > 1 file changed, 6 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 4f94d662db..eebfa5cfb7 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -11,12 +11,6 @@ A (CC ) after the

[FFmpeg-devel] [PATCH 2/2] MAINTAINERS: remove the project leader section

2022-09-20 Thread Anton Khirnov
The position does not exist anymore. --- MAINTAINERS | 6 -- 1 file changed, 6 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 4f94d662db..eebfa5cfb7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11,12 +11,6 @@ A (CC ) after the name means that the maintainer prefers to be CC-ed

[FFmpeg-devel] [PATCH 1/2] MAINTAINERS: add myself as a ffmpeg.c maintainer

2022-09-20 Thread Anton Khirnov
Michael has not been doing much work on it in the last few years and I have by far the most commits. --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index ed2ec0b90c..4f94d662db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -21,7 +21,7

Re: [FFmpeg-devel] [PATCH v4 0/6] Add display_matrix option

2022-09-20 Thread Anton Khirnov
I still see no convincing arguments in favor of adding all this complexity just so that we can stuff multiple options into one and get a WORSE user interface. Just add multiple options. -- Anton Khirnov ___ ffmpeg-devel mailing list

[FFmpeg-devel] [PATCH] x86/lpc: write a new Welch windowing function

2022-09-20 Thread Lynne
Old one was written with the assumption only even inputs would be given. This very messy replacement supports even and odd inputs, and supports AVX2 for extra speed. The buffers given are usually quite big (4k samples), so the speedup is worth it. The new SSE version is still faster than the old