Re: [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension

2022-09-03 Thread Rémi Denis-Courmont
Le sunnuntaina 4. syyskuuta 2022, 0.38.32 EEST Lynne a écrit : > I need to know the length in C, not assembly. There may be some corner cases where that makes sense, but typically it doesn't. Even if you're dealing in fixed-size macro blocks, you should leverage the larger vectors to unroll and

[FFmpeg-devel] [PATCH] checkasm/tx: add checkasm support for the iMDCT

2022-09-03 Thread Lynne
Patch attached. Just adds supports for inverse transforms and in particular an iMDCT. >From 91cb5b3c3357d46d00b6fe46449942a84c7e4bd4 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sun, 4 Sep 2022 02:40:07 +0200 Subject: [PATCH] checkasm/tx: add checkasm support for the iMDCT ---

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/cfhddata: Reduce stack usage

2022-09-03 Thread Andreas Rheinhardt
Paul B Mahol: > The FATE does not cover 9 (old) codebook, so make sure it is still working. > It's CRC checksum didn't change in patches 2-5. - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

Re: [FFmpeg-devel] [PATCH 5/5] avcodec/cfhddata: Reduce stack usage

2022-09-03 Thread Paul B Mahol
The FATE does not cover 9 (old) codebook, so make sure it is still working. ___ 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

[FFmpeg-devel] [PATCH] avcodec: flac x86 asm fix

2022-09-03 Thread Paul B Mahol
Patch attached. From 0f220489eb6402c6be3bc1d897c95fa9bc10431c Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 3 Sep 2022 23:41:38 +0200 Subject: [PATCH] avcodec/x86/flacdsp: fix bug in decorrelation Fixes #9297 Signed-off-by: Paul B Mahol --- libavcodec/x86/flacdsp.asm| 23

Re: [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension

2022-09-03 Thread Lynne
Sep 3, 2022, 21:59 by r...@remlab.net: > Le lauantaina 3. syyskuuta 2022, 22.20.20 EEST Lynne a écrit : > >> Sep 3, 2022, 21:01 by r...@remlab.net: >> > From: Rémi Denis-Courmont >> > >> > RVV defines a total of 12 different extensions: V, Zvl32b, Zvl64b, >> > Zvl128b, Zvl256b, Zvl512b,

Re: [FFmpeg-devel] [PATCH 2/2] x86/tx_float: implement inverse MDCT AVX2 assembly

2022-09-03 Thread Lynne
Sep 3, 2022, 22:55 by mich...@niedermayer.cc: > On Sat, Sep 03, 2022 at 03:42:36AM +0200, Lynne wrote: > >> This commit implements an iMDCT in pure assembly. >> >> This is capable of processing any mod-8 transforms, rather than just >> power of two, but since power of two is all we have assembly

Re: [FFmpeg-devel] [PATCH]lavfi/rotate: Fix undefined behaviour

2022-09-03 Thread Carl Eugen Hoyos
Am Fr., 2. Sept. 2022 um 09:04 Uhr schrieb Anton Khirnov : > > Quoting Carl Eugen Hoyos (2022-09-01 21:28:08) > > Hi! > > > > Attached patch fixes ticket #9799. > > > > Please comment, Carl Eugen > > > > From 2cce687961c3b56a92d88184269bf9fa075ae297 Mon Sep 17 00:00:00 2001 > > From: Carl Eugen

Re: [FFmpeg-devel] [PATCH 2/2] x86/tx_float: implement inverse MDCT AVX2 assembly

2022-09-03 Thread Michael Niedermayer
On Sat, Sep 03, 2022 at 03:42:36AM +0200, Lynne wrote: > This commit implements an iMDCT in pure assembly. > > This is capable of processing any mod-8 transforms, rather than just > power of two, but since power of two is all we have assembly for > currently, that's what's supported. > It would

[FFmpeg-devel] [PATCH 5/5] avcodec/cfhddata: Reduce stack usage

2022-09-03 Thread Andreas Rheinhardt
Creating CFHD RL VLC tables works by first extending the codes by the sign, followed by creating a VLC, followed by deriving the RL VLC from this VLC (which is then discarded). Extending the codes uses stack arrays. The tables used to initialize the VLC are already sorted from left-to-right in

[FFmpeg-devel] [PATCH 4/5] avcodec/cfhd, cfhddata: Free VLC as soon as it is not needed

2022-09-03 Thread Andreas Rheinhardt
The VLC is only used to initialize RL VLC. Signed-off-by: Andreas Rheinhardt --- libavcodec/cfhd.c | 3 --- libavcodec/cfhd.h | 4 libavcodec/cfhddata.c | 17 ++--- 3 files changed, 10 insertions(+), 14 deletions(-) diff --git a/libavcodec/cfhd.c b/libavcodec/cfhd.c

[FFmpeg-devel] [PATCH 3/5] avcodec/cfhddata: Avoid code duplication when creating codebooks

2022-09-03 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/cfhddata.c | 94 ++- 1 file changed, 39 insertions(+), 55 deletions(-) diff --git a/libavcodec/cfhddata.c b/libavcodec/cfhddata.c index 7c4b1454f3..017eb9375c 100644 --- a/libavcodec/cfhddata.c +++

[FFmpeg-devel] [PATCH 2/5] avcodec/cfhddata: Avoid code tables

2022-09-03 Thread Andreas Rheinhardt
cfhddata.c initializes a RL VLC table via code tables and corresponding tables for length, run and level. code and length tables are used to initialize a VLC, no symbol table is used. Afterwards the symbols of said VLC are just the indices of the corresponding entries in the code and length table

[FFmpeg-devel] [PATCH 1/5] avcodec/cfhd, cfhddata: Simplify check for escape

2022-09-03 Thread Andreas Rheinhardt
cfhd.c checked for level being equal to a certain codebook- dependent constant and to run being two. The first check is actually redundant, as all codebooks contain only one (real) entry with run == 2 (as is usual with VLCs, this one real entry has several corresponding entries in the table). But

Re: [FFmpeg-devel] [PATCH 2/2] arm: relax byte-swap assembler constraints

2022-09-03 Thread Martin Storsjö
On Sat, 3 Sep 2022, r...@remlab.net wrote: From: Rémi Denis-Courmont There are no particular reasons to force the compiler to use the same register as output and input operand. This forces an extra MOV instruction if the input value needs to be reused after the swap. In most cases, this

Re: [FFmpeg-devel] [PATCH 3/3] riscv: add float vector-scalar multiplication

2022-09-03 Thread Rémi Denis-Courmont
Le lauantaina 3. syyskuuta 2022, 22.48.45 EEST Lynne a écrit : > Sep 3, 2022, 21:34 by r...@remlab.net: > > Le lauantaina 3. syyskuuta 2022, 22.11.26 EEST Lynne a écrit : > >> > diff --git a/libavutil/riscv/float_dsp_rvv.S > >> > b/libavutil/riscv/float_dsp_rvv.S new file mode 100644 > >> > index

Re: [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension

2022-09-03 Thread Rémi Denis-Courmont
Le lauantaina 3. syyskuuta 2022, 22.20.20 EEST Lynne a écrit : > Sep 3, 2022, 21:01 by r...@remlab.net: > > From: Rémi Denis-Courmont > > > > RVV defines a total of 12 different extensions: V, Zvl32b, Zvl64b, > > Zvl128b, Zvl256b, Zvl512b, Zvl1024b, Zve32x, Zve32f, Zve64x, Zve64f and > > Zve64d.

Re: [FFmpeg-devel] [PATCH 3/3] riscv: add float vector-scalar multiplication

2022-09-03 Thread Lynne
Sep 3, 2022, 21:34 by r...@remlab.net: > Le lauantaina 3. syyskuuta 2022, 22.11.26 EEST Lynne a écrit : > >> > diff --git a/libavutil/riscv/float_dsp_rvv.S >> > b/libavutil/riscv/float_dsp_rvv.S new file mode 100644 >> > index 00..54ea1d9d6d >> > --- /dev/null >> > +++

Re: [FFmpeg-devel] [PATCH 3/3] riscv: add float vector-scalar multiplication

2022-09-03 Thread Rémi Denis-Courmont
Le lauantaina 3. syyskuuta 2022, 22.11.26 EEST Lynne a écrit : > > diff --git a/libavutil/riscv/float_dsp_rvv.S > > b/libavutil/riscv/float_dsp_rvv.S new file mode 100644 > > index 00..54ea1d9d6d > > --- /dev/null > > +++ b/libavutil/riscv/float_dsp_rvv.S > > @@ -0,0 +1,60 @@ > > +/* > > +

Re: [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension

2022-09-03 Thread Lynne
Sep 3, 2022, 21:01 by r...@remlab.net: > From: Rémi Denis-Courmont > > RVV defines a total of 12 different extensions: V, Zvl32b, Zvl64b, > Zvl128b, Zvl256b, Zvl512b, Zvl1024b, Zve32x, Zve32f, Zve64x, Zve64f and > Zve64d. > > At this stage, we don't care about the vector length extensions Zvl*,

Re: [FFmpeg-devel] [PATCH 3/3] riscv: add float vector-scalar multiplication

2022-09-03 Thread Lynne
Sep 3, 2022, 21:01 by r...@remlab.net: > From: Rémi Denis-Courmont > > This is based on existing code from the VLC git tree, though the size > and scalar arguments are swapped. > --- > libavutil/float_dsp.c| 2 ++ > libavutil/float_dsp.h| 1 + >

Re: [FFmpeg-devel] [PATCH] avcodec/mathops: Set hidden visibility where advantageous

2022-09-03 Thread Martin Storsjö
On Sat, 3 Sep 2022, Andreas Rheinhardt wrote: It is advantageous for ff_crop_tab, as the base pointer used to access this table is not the first element of it. But the real base pointer is still at a constant offset from the code/the GOT and can therefore be accessed relative to the instruction

Re: [FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension

2022-09-03 Thread Rémi Denis-Courmont
Le lauantaina 3. syyskuuta 2022, 22.01.45 EEST r...@remlab.net a écrit : > +#define ZVE_UP_TO(cap) ((2 * (cap)) - 1) Stray code. Ignore. -- Rémi Denis-Courmont http://www.remlab.net/ ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org

[FFmpeg-devel] [PATCH 3/3] riscv: add float vector-scalar multiplication

2022-09-03 Thread remi
From: Rémi Denis-Courmont This is based on existing code from the VLC git tree, though the size and scalar arguments are swapped. --- libavutil/float_dsp.c| 2 ++ libavutil/float_dsp.h| 1 + libavutil/riscv/Makefile | 4 ++- libavutil/riscv/float_dsp_init.c |

[FFmpeg-devel] [PATCH 1/3] riscv: add CPU flags for the RISC-V Vector extension

2022-09-03 Thread remi
From: Rémi Denis-Courmont RVV defines a total of 12 different extensions: V, Zvl32b, Zvl64b, Zvl128b, Zvl256b, Zvl512b, Zvl1024b, Zve32x, Zve32f, Zve64x, Zve64f and Zve64d. At this stage, we don't care about the vector length extensions Zvl*, as most or all optimisations will be running in a

[FFmpeg-devel] [PATCH 2/3] riscv: initial common header for assembler macros

2022-09-03 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/asm.h | 33 + 1 file changed, 33 insertions(+) create mode 100644 libavutil/riscv/asm.h diff --git a/libavutil/riscv/asm.h b/libavutil/riscv/asm.h new file mode 100644 index 00..31001b8bdb --- /dev/null +++

[FFmpeg-devel] [PATCHv1 0/3] Float DSP for RISC-V Vector extension - part I

2022-09-03 Thread Rémi Denis-Courmont
The following changes since commit e4ac156b7c47725327dff78bb83f5eecbaee3add: libavcodec: Set hidden visibility on global symbols accessed from AArch64 assembly (2022-09-02 23:13:29 +0300) are available down-thread for you to bash up to: riscv: add float vector-scalar multiplication

[FFmpeg-devel] [PATCH 2/2] lavc/pthread_frame: avoid leaving stale hwaccel state in worker threads

2022-09-03 Thread Anton Khirnov
This state is not refcounted, so make sure it always has a well-defined owner. Remove the block added in 091341f2ab5bd35ca1a2aae90503adc74f8d3523, as this commit also solves that issue in a more general way. --- libavcodec/pthread_frame.c | 47 -- 1 file

[FFmpeg-devel] [PATCH 1/2] lavc: fix and extend AVCodecContext.hwaccel_context doxy

2022-09-03 Thread Anton Khirnov
Mention: - that it is legacy and optional (every hwaccel that uses it can also work with hwcontext, though some optional information can only be signalled throught hwaccel_context) - that it can be used for encoders (only qsvenc currently) - ownership and lifetime --- libavcodec/avcodec.h |

Re: [FFmpeg-devel] [PATCH v1] avformat/mxf: set stream frame rates for ST 422 essence containers

2022-09-03 Thread Tomas Härdin
sön 2022-08-28 klockan 08:31 -0700 skrev p...@sandflow.com: > From: Pierre-Anthony Lemieux > > The MXF demuxer does not currently set AVStream::avg_frame_rate and > ::r_frame_rate > when J2K essence is wrapped according to SMPTE ST 422. > > --- >  libavformat/mxfdec.c | 25

Re: [FFmpeg-devel] [PATCH] lavc/pthread_frame: avoid leaving stale hwaccel state in worker threads

2022-09-03 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2022-09-02 23:12:12) > Does this allow to revert 091341f2ab5bd35ca1a2aae90503adc74f8d3523? Yes, just tested that with the commandline from 091341f2ab5bd35ca1a2aae90503adc74f8d3523, asan - reports no issues with current master - reports heap-use-after-free if the commit

[FFmpeg-devel] [PATCH] speexdec fix

2022-09-03 Thread Paul B Mahol
Patch attached. From 6a90e5d582ba2fc3a08fb08fb1b5f3f38d315b3f Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 3 Sep 2022 18:17:23 +0200 Subject: [PATCH] avcodec/speexdec: improve support for speex in non-ogg Signed-off-by: Paul B Mahol --- libavcodec/speexdec.c | 16 +++- 1

[FFmpeg-devel] [PATCH 1/2] aarch64: relax byte-swap assembler constraints

2022-09-03 Thread remi
From: Rémi Denis-Courmont There are no particular reasons to force the compiler to use the same register as output and input operand. This forces an extra MOV instruction if the input value needs to be reused after the swap. In most cases, this makes no differences, as the compiler will seleect

[FFmpeg-devel] [PATCH 2/2] arm: relax byte-swap assembler constraints

2022-09-03 Thread remi
From: Rémi Denis-Courmont There are no particular reasons to force the compiler to use the same register as output and input operand. This forces an extra MOV instruction if the input value needs to be reused after the swap. In most cases, this makes no differences, as the compiler will seleect

[FFmpeg-devel] [PATCH] riscv: add av_bswap{16,32,64} with Zbb

2022-09-03 Thread remi
From: Rémi Denis-Courmont If the target supports the Basic bit-manipulation (Zbb) extension, then REV8 is available to reverse byte order. Note that this instruction only exists at the "XLEN" register size (available as __riscv_xlen). --- libavutil/bswap.h | 2 ++ libavutil/riscv/bswap.h

Re: [FFmpeg-devel] [PATCH v2] avfilter: add bilateral_cuda filter

2022-09-03 Thread Timo Rothenpieler
On 30.08.2022 21:13, Mohamed Khaled Mohamed wrote: avfilter: add bilateral_cuda filter GSoC'22 libavfilter/vf_bilateral_cuda.cu:the CUDA kernel for the filter libavfilter/vf_bilateral_cuda.c: the C side that calls the kernel and gets user input libavfilter/allfilters.c: added the filter to it

[FFmpeg-devel] [PATCH] riscv: detect fast CLZ from Zbb extension

2022-09-03 Thread remi
From: Rémi Denis-Courmont RISC-V defines the CLZ instruction as part of the Zbb subset of the bit mapulation extension (B). We can detect it from the __riscv_zbb predefined constant. It will be non-zero if supported, zero if enabled in the compiler flags but not supported by the compiler, and

[FFmpeg-devel] [PATCH] riscv: detect fast CLZ from Zbb extension

2022-09-03 Thread remi
From: Rémi Denis-Courmont RISC-V defines the CLZ instruction as part of the Zbb subset of the bit mapulation extension (B). We can detect it from the __riscv_zbb predefined constant. It will be non-zero if supported, zero if enabled in the compiler flags but not supported by the compiler, and

Re: [FFmpeg-devel] [PATCH v2 1/3] swscale/la: Optimize hscale functions with lasx.

2022-09-03 Thread Andreas Rheinhardt
Hao Chen: > ffmpeg -i 1_h264_1080p_30fps_3Mbps.mp4 -f rawvideo -s 640x480 -y /dev/null -an > before: 101fps > after: 138fps > > Signed-off-by: Hao Chen > --- > libswscale/loongarch/Makefile | 3 + > libswscale/loongarch/input_lasx.c | 202 >

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-03 Thread Ronald S. Bultje
Hi Chema, On Fri, Sep 2, 2022 at 11:12 AM Chema Gonzalez wrote: > So is there a filter that already dumps this information? > Yes, it's called codecview. We can help understand how it works if you ask more specific questions, but something like "git grep EXPORT_DATA_MVS ../libavcodec/mpeg*.c"

Re: [FFmpeg-devel] [PATCH] cfhd decoder fixes for old codebook

2022-09-03 Thread Kieran Kunhya
On Sat, 3 Sept 2022 at 11:06, Paul B Mahol wrote: > Attached. > Ok ___ 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

Re: [FFmpeg-devel] [PATCH] avfilter: add 3D scope multimedia filter

2022-09-03 Thread Paul B Mahol
will apply soon ___ 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 v4 2/2] libavcodec/flacenc: Implement encoding of 32 bit-per-sample PCM

2022-09-03 Thread Martijn van Beurden
Add encoding of 32 bit-per-sample PCM to FLAC files to libavcodec. Coding to this format is at this point considered experimental and -strict -2 is needed to get ffmpeg to encode such files. --- libavcodec/flacenc.c| 519 libavcodec/put_bits.h | 7

[FFmpeg-devel] [PATCH v4 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM

2022-09-03 Thread Martijn van Beurden
Add decoding of FLAC files coding for 32 bit-per-sample PCM to libavcodec. --- libavcodec/flac.c | 4 +- libavcodec/flacdec.c | 248 ++ libavcodec/get_bits.h | 12 ++ libavcodec/mathops.h | 9 ++ 4 files changed, 250 insertions(+), 23

[FFmpeg-devel] [PATCH v4 0/2] 32bps FLAC patches

2022-09-03 Thread Martijn van Beurden
Recently libFLAC gained the ability (not in any released version yet though) to create FLAC files containing 32-bit int PCM samples. To keep complexity reasonable, the choice was made to limit residuals to 32-bit integers, which the encoder must make sure of. In case the encoder cannot find any

Re: [FFmpeg-devel] [PATCH 1/1] avcodec/mpegutils: add motion_vec debug mode

2022-09-03 Thread Paul B Mahol
On Sat, Sep 3, 2022 at 2:46 AM Chema Gonzalez wrote: > Hi again, > > On Fri, Sep 2, 2022 at 2:05 PM Paul B Mahol wrote: > > > > > So is there a filter that already dumps this information? > > > > Not in text but in visual, note that you can write own code that uses > > > > library to dump MV as

[FFmpeg-devel] [PATCH] cfhd decoder fixes for old codebook

2022-09-03 Thread Paul B Mahol
Attached. From 485600a2bd216a92b7035caaa1992dd5a9438848 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sat, 3 Sep 2022 09:23:39 +0200 Subject: [PATCH 1/2] avcodec/cfhddata: remove unused defines Signed-off-by: Paul B Mahol --- libavcodec/cfhddata.c | 8 1 file changed, 8