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

2022-09-27 Thread Tomas Härdin
tis 2022-09-27 klockan 01:11 +0200 skrev Andreas Rheinhardt: > Fixes the j2k-dwt FATE-test; also fixes #9945. > (I don't know whether the multiplication can overflow.) The 5/3 transform is used in lossless mode and therefore shouldn't overflow for normal use cases. But someone can of course craft

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

2022-09-27 Thread Tomas Härdin
tis 2022-09-27 klockan 03:47 +0200 skrev 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/j

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

2022-09-27 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-09-27 klockan 03:47 +0200 skrev 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/jpeg20

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

2022-09-27 Thread Tomas Härdin
tis 2022-09-27 klockan 13:20 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2022-09-27 klockan 03:47 +0200 skrev Andreas Rheinhardt: > > > Affected the jpeg2000dsp checkasm test. > > > > > > Signed-off-by: Andreas Rheinhardt > > > > > > --- > > >  libavcodec/jpeg2000dsp.c | 9 - >

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

2022-09-27 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-09-27 klockan 01:11 +0200 skrev Andreas Rheinhardt: >> Fixes the j2k-dwt FATE-test; also fixes #9945. >> (I don't know whether the multiplication can overflow.) > > The 5/3 transform is used in lossless mode and therefore shouldn't > overflow for normal use cases. But some

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

2022-09-27 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-09-27 klockan 13:20 +0200 skrev Andreas Rheinhardt: >> Tomas Härdin: >>> tis 2022-09-27 klockan 03:47 +0200 skrev Andreas Rheinhardt: Affected the jpeg2000dsp checkasm test. Signed-off-by: Andreas Rheinhardt ---  libavcodec/jpeg2000dsp.c | 9 +

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

2022-09-27 Thread Lynne
Sep 26, 2022, 16:52 by r...@remlab.net: > 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. > - Sim

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

2022-09-27 Thread Tomas Härdin
tis 2022-09-27 klockan 13:40 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2022-09-27 klockan 01:11 +0200 skrev Andreas Rheinhardt: > > > Fixes the j2k-dwt FATE-test; also fixes #9945. > > > (I don't know whether the multiplication can overflow.) > > > > The 5/3 transform is used in loss

Re: [FFmpeg-devel] [PATCH v2] format/imfdec: improve error handling when selecting tracks for playback

2022-09-27 Thread Zane van Iperen
lgtm, will apply On 20/9/22 01:26, p...@sandflow.com wrote: From: Pierre-Anthony Lemieux --- libavformat/imfdec.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavformat/imfdec.c b/libavformat/imfdec.c index 5bbe7a53f8..9ba8b6de8b 100644 --- a/libavf

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

2022-09-27 Thread wangyaqiang
> 2022年9月27日 04:21,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.

Re: [FFmpeg-devel] [PATCH] avformat/mov: parse the last moof box when mp4 segment format

2022-09-27 Thread wangyaqiang
ping > 2022年9月1日 18:22,1035567...@qq.com 写道: > > From: Wang Yaqiang > > In the format of mp4 segment, the bitrate calculation of > stream depends on the sample_size in moof->traf->trun box. > In the original logic, when the last sidx box is read, > it is not parsed backwards, and the total samp

[FFmpeg-devel] [PATCH] avformat/mpegtsenc: add pcr_at_keyframe flag

2022-09-27 Thread Zhao Zhili
From: Zhao Zhili Add PCR at keyframe can be undesirable when -pcr_period is specified. Add an flag to disable this behavior. Signed-off-by: Zhao Zhili --- doc/muxers.texi | 2 ++ libavformat/mpegtsenc.c | 8 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/mu

Re: [FFmpeg-devel] [PATCH v1 1/2] avformat/imfdec: use CPL start timecode if available

2022-09-27 Thread Zane van Iperen
Looks mostly ok from a cursory glance, just one minor nit. On 23/8/22 15:10, p...@sandflow.com wrote: +static int ff_imf_xml_read_boolean(xmlNodePtr element, int *value) +{ +xmlChar *element_text = NULL; +int ret = 0; + +element_text = xmlNodeListGetString(element->doc, element->xm

[FFmpeg-devel] [PATCH] avocdec/cavsdsp: Fix undefined pointer arithmetic

2022-09-27 Thread Andreas Rheinhardt
src2 is used in CAVS_SUBPIX_HV iff FULL is true (it is exactly for the egpr functions); otherwise it might be NULL. So check for FULL before doing pointer arithmetic. Fixes a "src/libavcodec/cavsdsp.c:524:1: runtime error: applying non-zero offset 8 to null pointer" from UBSan. Signed-off-by: Andr

[FFmpeg-devel] [PATCH] avcodec/vc2enc_dwt: Fix left shifts of negative numbers

2022-09-27 Thread Andreas Rheinhardt
Fixes the vsynth(1|2|_lena)-vc2-(thaar|t5_3) FATE tests. Signed-off-by: Andreas Rheinhardt --- libavcodec/vc2enc_dwt.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavcodec/vc2enc_dwt.c b/libavcodec/vc2enc_dwt.c index 441af040ec..809f938e1b 100644 --- a/libavcodec

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

2022-09-27 Thread Tomas Härdin
mån 2022-09-26 klockan 16:24 +0200 skrev 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

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

2022-09-27 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-09-27 klockan 13:40 +0200 skrev Andreas Rheinhardt: >> Tomas Härdin: >>> tis 2022-09-27 klockan 01:11 +0200 skrev Andreas Rheinhardt: Fixes the j2k-dwt FATE-test; also fixes #9945. (I don't know whether the multiplication can overflow.) >>> >>> The 5/3 transform i

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

2022-09-27 Thread Michael Niedermayer
On Tue, Sep 27, 2022 at 03:47:15AM +0200, Andreas Rheinhardt wrote: > 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(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9F

[FFmpeg-devel] [RFC] [PATCH 0/7] RISC-V V vector length dealings

2022-09-27 Thread Rémi Denis-Courmont
Hello, As a general rule, scalable vector instruction sets should be used with the largest possible vector length. There are however a number of operations that just happen with a fixed size, and this patchset exhibits the simplest one I could find. The proper RISC-V Vector extension guara

[FFmpeg-devel] [PATCH 1/7] lavu/riscv: helper to read the vector length

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavutil/riscv/cpu.h | 45 +++ 1 file changed, 45 insertions(+) create mode 100644 libavutil/riscv/cpu.h diff --git a/libavutil/riscv/cpu.h b/libavutil/riscv/cpu.h new file mode 100644 index 00..56035f8556 --- /dev/

[FFmpeg-devel] [PATCH 2/7] lavc/idctdsp: RISC-V V put_pixels_clamped function

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavcodec/idctdsp.c| 2 ++ libavcodec/idctdsp.h| 2 ++ libavcodec/riscv/Makefile | 2 ++ libavcodec/riscv/idctdsp_init.c | 41 +++ libavcodec/riscv/idctdsp_rvv.S | 43 + 5

[FFmpeg-devel] [PATCH 4/7] lavc/idctdsp: RISC-V V put_signed_pixels_clamped function

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/idctdsp_init.c | 3 +++ libavcodec/riscv/idctdsp_rvv.S | 21 + 2 files changed, 24 insertions(+) diff --git a/libavcodec/riscv/idctdsp_init.c b/libavcodec/riscv/idctdsp_init.c index 58b8a6c97a..e6e616a555 100644 --- a/libavcod

[FFmpeg-devel] [PATCH 3/7] lavc/idctdsp: RISC-V V add_pixels_clamped function

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/idctdsp_init.c | 6 +- libavcodec/riscv/idctdsp_rvv.S | 16 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/idctdsp_init.c b/libavcodec/riscv/idctdsp_init.c index 1a6add80da..58b8a6c97a 100644 -

[FFmpeg-devel] [PATCH 5/7] lavc/pixblockdsp: RISC-V V 8-bit get_pixels & get_pixels_unaligned

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/Makefile | 1 + libavcodec/riscv/pixblockdsp_init.c | 12 ++ libavcodec/riscv/pixblockdsp_rvv.S | 37 + 3 files changed, 50 insertions(+) create mode 100644 libavcodec/riscv/pixblockdsp_rvv.S diff --

[FFmpeg-devel] [PATCH 7/7] lavc/pixblockdsp: RISC-V diff_pixels & diff_pixels_unaligned

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/pixblockdsp_init.c | 4 libavcodec/riscv/pixblockdsp_rvv.S | 16 2 files changed, 20 insertions(+) diff --git a/libavcodec/riscv/pixblockdsp_init.c b/libavcodec/riscv/pixblockdsp_init.c index bbda381c12..aa39a8a665 100644 -

[FFmpeg-devel] [PATCH 6/7] lavc/pixblockdsp: RISC-V V 16-bit get_pixels & get_pixels_unaligned

2022-09-27 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/pixblockdsp_init.c | 6 +- libavcodec/riscv/pixblockdsp_rvv.S | 7 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/pixblockdsp_init.c b/libavcodec/riscv/pixblockdsp_init.c index 69dbd18918..bbda381c12 10

Re: [FFmpeg-devel] [PATCH] float in tiff

2022-09-27 Thread Mark Reid
On Fri, Sep 23, 2022 at 11:14 AM Paul B Mahol wrote: > On 9/14/22, Paul B Mahol wrote: > > Patches attached. > > > > Will apply soon. > Were you planning on adding swscale support for the rgbaf32 formats? Didn't want to start working on it if you already started :) > _

[FFmpeg-devel] [PATCH] avcodec/libsvtav1: Add support for multipass encoding

2022-09-27 Thread Gustav Grusell
Implements support for 2-pass CRF and 3-pass VBR by implementing reading and writing of stats file, and passing the pass number on to the encoder. For 3-pass VBR, the first pass should be run with '-pass 1', the second with '-pass 3' and the third with '-pass 2'. Signed-off-by: Gustav Grusell ---

Re: [FFmpeg-devel] [RFC] [PATCH 0/7] RISC-V V vector length dealings

2022-09-27 Thread Lynne
Sep 27, 2022, 22:04 by r...@remlab.net: > Hello, > > As a general rule, scalable vector instruction sets should be used with the > largest possible vector length. There are however a number of operations that > just happen with a fixed size, and this patchset exhibits the simplest one I > could fi

Re: [FFmpeg-devel] [PATCH] avutil/display: Drop wrong comments about matrices being allocated

2022-09-27 Thread Andreas Rheinhardt
Andreas Rheinhardt: > These functions work just as well with stack based matrices. > > Signed-off-by: Andreas Rheinhardt > --- > libavutil/display.h | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavutil/display.h b/libavutil/display.h > index 31d8bef361..0c73b

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dirac_dwt(_template): Don't use ff_-prefix for static func

2022-09-27 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/dirac_dwt.c | 6 +++--- > libavcodec/dirac_dwt_template.c | 2 +- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/libavcodec/dirac_dwt.c b/libavcodec/dirac_dwt.c > index af29932c6d..4039899cf0

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

2022-09-27 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Also remove a variable that is only used in this commented-out > codeblock. This fixes a -Wunused-variable warning. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/tiff.c | 7 +-- > 1 file changed, 1 insertion(+), 6 deletions(-) > > diff --git a/libavcodec/tif

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/amrwbdec, lsp: Include mips headers only #if ARCH_MIPS

2022-09-27 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/amrwbdec.c | 4 > libavcodec/lsp.c | 4 > 2 files changed, 8 insertions(+) > > diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c > index ea3812cd9a..b59066adcf 100644 > --- a/libavcodec/amrwbdec.c

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/codec_internal: Avoid deprecation warnings for channel_layouts

2022-09-27 Thread Andreas Rheinhardt
Andreas Rheinhardt: > AVCodec.channel_layouts is deprecated and Clang (unlike GCC) > warns when setting this field in a codec definition. > Fortunately, Clang (unlike GCC) allows to use > FF_DISABLE_DEPRECATION_WARNINGS inside a definition (of an FFCodec), > so that one can create simple macros to

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

2022-09-27 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 v2 1/2] libavcodec/qsvenc: Let runtime to set default parameter.

2022-09-27 Thread Xiang, Haihao
On Mon, 2022-09-26 at 17:36 +0800, Wenbin Chen wrote: > 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_

[FFmpeg-devel] [PATCH] lavc/libvpx: increase thread limit to 64

2022-09-27 Thread OvchinnikovDmitrii
This change improves the performance and multicore scalability of the vp9 codec for streaming single-pass encoded videos by taking advantage of up to 64 cores in the system. The current thread limit for ffmpeg codecs is 16 (MAX_AUTO_THREADS in pthread_internal.h) due to a limitation in H.264 codec

Re: [FFmpeg-devel] [PATCH] lavc/libvpx: increase thread limit to 64

2022-09-27 Thread Ronald S. Bultje
Hi, On Tue, Sep 27, 2022 at 9:52 PM OvchinnikovDmitrii < ovchinnikov.dmit...@gmail.com> wrote: > +/* Increase max threads for libvpx from 16 to 64 to benefit 4K/8K video > encoding. */ > The "increase" and "from 16 to" are not very helpful. Just documenting the code that is, not what it was befo

Re: [FFmpeg-devel] [PATCH 1/2] avcodec/dirac_dwt(_template): Don't use ff_-prefix for static func

2022-09-27 Thread Lynne
Sep 28, 2022, 03:05 by andreas.rheinha...@outlook.com: > Andreas Rheinhardt: > >> Signed-off-by: Andreas Rheinhardt >> --- >> libavcodec/dirac_dwt.c | 6 +++--- >> libavcodec/dirac_dwt_template.c | 2 +- >> 2 files changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/libavcodec/d

Re: [FFmpeg-devel] [RFC] [PATCH 0/7] RISC-V V vector length dealings

2022-09-27 Thread Rémi Denis-Courmont
Le 28 septembre 2022 00:32:42 GMT+03:00, Lynne a écrit : >Sep 27, 2022, 22:04 by r...@remlab.net: > >> Hello, >> >> As a general rule, scalable vector instruction sets should be used with the >> largest possible vector length. There are however a number of operations that >> just happen with a fix

Re: [FFmpeg-devel] [RFC] [PATCH 0/7] RISC-V V vector length dealings

2022-09-27 Thread Lynne
Sep 28, 2022, 08:03 by r...@remlab.net: > Le 28 septembre 2022 00:32:42 GMT+03:00, Lynne a écrit : > >Sep 27, 2022, 22:04 by r...@remlab.net: > >>> Hello, >>> >>> As a general rule, scalable vector instruction sets should be used with the >>> largest possible vector length. There are however a nu