[FFmpeg-devel] [PATCH] avfilter/vf_curves: add PCHIP interpolator and interp option

2022-10-02 Thread Takeshi (Kesh) Ikuma
summary: This patch modifies the `curves` filter with new `interp` option to let user pick the existing natural cubic spline interpolation and the new PCHIP interapolation. reason: The natural cubic spline does not impose monotonicity between the keypoints. As such, the

Re: [FFmpeg-devel] [PATCH 1/1] Enable building with WSL and MSVC

2022-10-02 Thread Pierre-Anthony Lemieux
On Sun, Oct 2, 2022 at 5:14 PM Timo Rothenpieler wrote: > > On 03.10.2022 01:47, Julio C. Rocha wrote: > > --- > > configure | 7 ++- > > 1 file changed, 6 insertions(+), 1 deletion(-) > > > > diff --git a/configure b/configure > > index 6712d045d9..f5f5eb29dd 100755 > > --- a/configure > >

Re: [FFmpeg-devel] [PATCH 1/1] Enable building with WSL and MSVC

2022-10-02 Thread Timo Rothenpieler
On 03.10.2022 01:47, Julio C. Rocha wrote: --- configure | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6712d045d9..f5f5eb29dd 100755 --- a/configure +++ b/configure @@ -4847,7 +4847,12 @@ probe_cc(){ else _ident=$(

[FFmpeg-devel] [PATCH 1/1] Enable building with WSL and MSVC

2022-10-02 Thread Julio C. Rocha
--- configure | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 6712d045d9..f5f5eb29dd 100755 --- a/configure +++ b/configure @@ -4847,7 +4847,12 @@ probe_cc(){ else _ident=$($_cc --version 2>/dev/null | head -n1 | tr -d '\r

[FFmpeg-devel] [PATCH 0/1] Enable building in Windows Subsystem for Linux and MSVC compilers

2022-10-02 Thread Julio C. Rocha
When building on Windows (CYGWIN or WSL), generated .d files contain the MSYS2/CYGWIN path format (i.e. C:/MyRepos/ffmpeg). This causes make commands such as clean an install to fail when running on WSL. This patch detects whether WSL is being used and converts the paths to standard UNIX paths (i.

Re: [FFmpeg-devel] [PATCH 1/5] avcodec/mpeg12vlc: Move MPEG-1/2 RL VLCs to it

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > It is better place for these declarations than > mpeg12data.h as RL VLC are just a variant of VLCs. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/mpeg12data.c | 1 + > libavcodec/mpeg12data.h | 4 > libavcodec/mpeg12dec.h | 10 -- > libavcodec/mpe

[FFmpeg-devel] [PATCH 6/6] avcodec/mpegvideo_enc: Call ff_mpeg1_encode_init() earlier

2022-10-02 Thread Andreas Rheinhardt
It does not require anything that is being set between the new position where it is called and the old position where it used to be called; and nothing that it sets gets overwritten between these two positions. Doing so allows to remove a check lateron. Signed-off-by: Andreas Rheinhardt --- liba

[FFmpeg-devel] [PATCH 5/6] avcodec/h261enc: Store the H.261 format value

2022-10-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h261enc.c | 39 +++ libavcodec/h261enc.h | 1 - 2 files changed, 15 insertions(+), 25 deletions(-) diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index 7aa548c39d..e8ea357cbb 100644 --- a/libavcodec/h

[FFmpeg-devel] [PATCH 4/6] avcodec/mpegvideo_enc: Move H.261 size check to h261enc.c

2022-10-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/h261enc.c | 11 ++- libavcodec/h261enc.h | 2 +- libavcodec/mpegvideo_enc.c | 11 +++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c index b868827160..7aa548

[FFmpeg-devel] [PATCH 3/6] avcodec/mpegvideo_enc: Call ff_h261_encode_init() earlier

2022-10-02 Thread Andreas Rheinhardt
It does not require anything that is being set between the new position where it is called and the old position where it used to be called; and nothing that it sets gets overwritten between these two positions. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 5 ++--- 1 file ch

[FFmpeg-devel] [PATCH 2/6] avcodec/mpegvideo_enc: Move SpeedHQ check to speedhqenc.c

2022-10-02 Thread Andreas Rheinhardt
Also set this only once and not for every frame. Signed-off-by: Andreas Rheinhardt --- libavcodec/mpegvideo_enc.c | 3 --- libavcodec/speedhqenc.c| 4 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 0b398c56ab.

[FFmpeg-devel] [PATCH 1/6] fate/vcodec: Add speedhq tests

2022-10-02 Thread Andreas Rheinhardt
The vsynth3 tests are disabled, because the encoder produces garbage. Signed-off-by: Andreas Rheinhardt --- tests/fate/vcodec.mak | 9 - tests/ref/vsynth/vsynth1-speedhq-420p | 4 tests/ref/vsynth/vsynth1-speedhq-422p | 4 tests/ref/vsynth/vsynth1-sp

Re: [FFmpeg-devel] [PATCH v2] avformat/mpegtsenc: add omit_rai flag

2022-10-02 Thread Marton Balint
On Fri, 30 Sep 2022, Zhao Zhili wrote: 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 --- v2: change pcr_at_keyframe to omit_rai LGTM with libavformat micro version bump, thanks. Mar

[FFmpeg-devel] [PATCH] tiff: add support for one more tag

2022-10-02 Thread Paul B Mahol
Patch attached. From c3dc0b0bf8fe84692ae0c877c6f33880ad7992c5 Mon Sep 17 00:00:00 2001 From: Paul B Mahol Date: Sun, 2 Oct 2022 20:32:34 +0200 Subject: [PATCH] avcodec/tiff: add support for one more tag Also be less strict about tag order. Signed-off-by: Paul B Mahol --- libavcodec/tiff.c | 9

Re: [FFmpeg-devel] [PATCH v2] avcodec/tiff: add read support for compressed rgb floating point formats

2022-10-02 Thread James Almer
On 10/2/2022 2:06 PM, Michael Niedermayer wrote: On Sat, Oct 01, 2022 at 04:05:12PM -0700, mindm...@gmail.com wrote: From: Mark Reid floating point uses a slightly different predictor technique describe here http://chriscox.org/TIFFTN3d1.pdf Here is a link the test files, if someone could

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

2022-10-02 Thread Andreas Rheinhardt
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..b1bff6d5

Re: [FFmpeg-devel] [PATCH 1/6] avcodec/g723_1enc: Remove unnecessary av_clipl_int32()

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > partial_corr is an int16_t and so the av_clipl_int32() > never clips and can be removed. This also avoids > undefined left-shifts of negative numbers. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/g723_1enc.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/wmavoice: Don't initialize GetBitContext with buf == NULL

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Happens when flushing. This triggers NULL + 0 (which is UB) in > init_get_bits_xe (which previously errored out, but the return value > has not been checked) and in copy_bits(). > > This fixes the wmavoice-(7|11|19)k FATE-tests with UBSan. > > Signed-off-by: Andreas Rheinhar

Re: [FFmpeg-devel] [PATCH v2] avcodec/tiff: add read support for compressed rgb floating point formats

2022-10-02 Thread Michael Niedermayer
On Sat, Oct 01, 2022 at 04:05:12PM -0700, mindm...@gmail.com wrote: > From: Mark Reid > > floating point uses a slightly different predictor technique describe here > http://chriscox.org/TIFFTN3d1.pdf > > Here is a link the test files, if someone could add them to fate me > https://www.dropbox.

Re: [FFmpeg-devel] [PATCH] avcodec/bonk: Check step

2022-10-02 Thread Rémi Denis-Courmont
Le sunnuntaina 2. lokakuuta 2022, 19.26.21 EEST James Almer a écrit : > On 10/2/2022 1:13 PM, Rémi Denis-Courmont wrote: > > Le sunnuntaina 2. lokakuuta 2022, 18.43.23 EEST Michael Niedermayer a écrit : > >> Fixes: signed integer overflow: 2040812214 + 255101526 cannot be > >> represented in type

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

2022-10-02 Thread Pierre-Anthony Lemieux
On Tue, Sep 27, 2022 at 5:40 AM Zane van Iperen wrote: > > 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; > > +in

Re: [FFmpeg-devel] [PATCH] avcodec/vorbis: Split data declarations out into new header

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > vorbis.h currently contains stuff only used by the native > Vorbis codecs and some Vorbis tables, which are also used by > Opus and libvorbis. Therefore split the data out into a header > of its own. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/libopusdec.c |

Re: [FFmpeg-devel] [PATCH] avutil/channel_layout: Don't mention dead project

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- > libavutil/channel_layout.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavutil/channel_layout.h b/libavutil/channel_layout.h > index ff2b57bbe3..7808573118 100644 > --- a/libavutil/channel_layout.h > +

Re: [FFmpeg-devel] [PATCH] avcodec/pngdec: Don't use unsigned for width, height

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Otherwise p->linesize[0] * y will be evaluated as an unsigned > which leads to segfaults in case linesize is negative. > This happens in the apng-dispose-previous FATE-test in case > one makes get_buffer return pictures with negative linesizes. > > Signed-off-by: Andreas Rhei

Re: [FFmpeg-devel] [PATCH] avcodec/bonk: Check step

2022-10-02 Thread Andreas Rheinhardt
James Almer: > On 10/2/2022 1:13 PM, Rémi Denis-Courmont wrote: >> Le sunnuntaina 2. lokakuuta 2022, 18.43.23 EEST Michael Niedermayer a >> écrit : >>> Fixes: signed integer overflow: 2040812214 + 255101526 cannot be >>> represented >>> in type 'int' Fixes: >>> 51323/clusterfuzz-testcase-minimized-

Re: [FFmpeg-devel] [PATCH] avcodec/zerocodec: Avoid undefined NULL - 0

2022-10-02 Thread Andreas Rheinhardt
Andreas Rheinhardt: > Fixes the zerocodec FATE-test. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/zerocodec.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/zerocodec.c b/libavcodec/zerocodec.c > index 93fc2834e4..42fb24ff6c 100644 > --- a/l

[FFmpeg-devel] [PATCH v2 3/3] avformat/imfdec: variable initialiaztion cosmetics

2022-10-02 Thread pal
From: Pierre-Anthony Lemieux --- libavformat/imf_cpl.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/libavformat/imf_cpl.c b/libavformat/imf_cpl.c index 183e6dd84e..ad84a68b13 100644 --- a/libavformat/imf_cpl.c +++ b/libavformat/imf_cpl.c @@ -72,10 +72,9 @@ xmlNode

[FFmpeg-devel] [PATCH v2 2/3] avformat/tests/imf: add CPL timecode test

2022-10-02 Thread pal
From: Pierre-Anthony Lemieux --- libavformat/tests/imf.c | 7 +++ tests/ref/fate/imf | 1 + 2 files changed, 8 insertions(+) diff --git a/libavformat/tests/imf.c b/libavformat/tests/imf.c index a71de692f9..2cacb43f47 100644 --- a/libavformat/tests/imf.c +++ b/libavformat/tests/imf.c @@

[FFmpeg-devel] [PATCH v2 1/3] avformat/imfdec: use CPL start timecode if available

2022-10-02 Thread pal
From: Pierre-Anthony Lemieux The IMF CPL contains an optional timecode start address. This patch reads the latter, if present, into the context's timecode metadata parameter. This addresses https://trac.ffmpeg.org/ticket/9842. --- libavformat/imf.h | 2 + libavformat/imf_cpl.c | 106 +

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

2022-10-02 Thread Andreas Rheinhardt
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" fr

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

2022-10-02 Thread Andreas Rheinhardt
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 441af040

Re: [FFmpeg-devel] [PATCH] avcodec/bonk: Check step

2022-10-02 Thread James Almer
On 10/2/2022 1:13 PM, Rémi Denis-Courmont wrote: Le sunnuntaina 2. lokakuuta 2022, 18.43.23 EEST Michael Niedermayer a écrit : Fixes: signed integer overflow: 2040812214 + 255101526 cannot be represented in type 'int' Fixes: 51323/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-479

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

2022-10-02 Thread Andreas Rheinhardt
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 ++

Re: [FFmpeg-devel] [PATCH] avcodec/bonk: Check step

2022-10-02 Thread Rémi Denis-Courmont
Le sunnuntaina 2. lokakuuta 2022, 18.43.23 EEST Michael Niedermayer a écrit : > Fixes: signed integer overflow: 2040812214 + 255101526 cannot be represented > in type 'int' Fixes: > 51323/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-4791481 > 067503616 > > Found-by: continuous fuz

Re: [FFmpeg-devel] [PATCH] avcodec/mpeg4audio: Move ff_copy_pce_data() to a header of its own

2022-10-02 Thread Michael Niedermayer
On Sat, Oct 01, 2022 at 07:40:04PM +0200, Andreas Rheinhardt wrote: > It is only used by three of the thirty files that (potentially > indirectly) include mpeg4audio.h. Twenty of these files won't > have a put_bits.h inclusion any more after this patch. > > Signed-off-by: Andreas Rheinhardt > ---

[FFmpeg-devel] [PATCH] avcodec/bonk: Check step

2022-10-02 Thread Michael Niedermayer
Fixes: signed integer overflow: 2040812214 + 255101526 cannot be represented in type 'int' Fixes: 51323/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BONK_fuzzer-4791481067503616 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-b

[FFmpeg-devel] [PATCH 15/15] avcodec/huffyuv: Update outdated link

2022-10-02 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/huffyuv.c| 2 +- libavcodec/huffyuv.h| 2 +- libavcodec/huffyuvdec.c | 2 +- libavcodec/huffyuvenc.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c index 6bcaacfc37..aaba31

[FFmpeg-devel] [PATCH 4/4] lavc/bswapdsp: RISC-V V bswap16_buf

2022-10-02 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/bswapdsp_init.c | 5 - libavcodec/riscv/bswapdsp_rvv.S | 17 + 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/libavcodec/riscv/bswapdsp_init.c b/libavcodec/riscv/bswapdsp_init.c index c17b6b75bb..abe84ec1f7 1006

[FFmpeg-devel] [PATCH 3/4] lavc/bswapdsp: RISC-V V bswap_buf

2022-10-02 Thread remi
From: Rémi Denis-Courmont --- libavcodec/riscv/Makefile| 1 + libavcodec/riscv/bswapdsp_init.c | 7 - libavcodec/riscv/bswapdsp_rvv.S | 45 3 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 libavcodec/riscv/bswapdsp_rvv.S diff -

[FFmpeg-devel] [PATCH 2/4] lavc/bswapdsp: RISC-V B bswap_buf

2022-10-02 Thread remi
From: Rémi Denis-Courmont Simply taking the Zbb REV8 instruction into use in a simple loop gives some significant savings: bswap_buf_c: 1081.0 bswap_buf_rvb_b: 771.0 But we can also use the 64-bit REV8 as a pseudo-SIMD instruction with just one additional shift, and one fewer load, effectively

[FFmpeg-devel] [PATCH 1/4] lavu/riscv: CPU flag for the Zbb extension

2022-10-02 Thread remi
From: Rémi Denis-Courmont Unfortunately, it is common, and will remain so, that the Bit manipulations are not enabled at compilation time. This is an official policy for Debian ports in general (though they do not support RISC-V officially as of yet) to stick to the minimal target baseline, which

[FFmpeg-devel] [PATCH 0/4] RISC-V initial bswapdsp

2022-10-02 Thread Rémi Denis-Courmont
Hello, The following changes since commit b0c7352cd494c88d33f032be60b5e1c4e8b092a0: avcodec/mjpegdec: Fix compilation (2022-09-30 19:30:29 +0200) are available in the Git repository at: git.remlab.net:git/ffmpeg.git remlab/rv-bswap for you to fetch changes up to cb5a7b0834cbb3c8264

[FFmpeg-devel] [PATCH 2/2] avcodec/libjxl: use RGB32F or RGBA32F for 32-bit float JPEG XL

2022-10-02 Thread Leo Izen
Use AV_PIX_FMT_RGB32F or AV_PIX_FMT_RGBA32F for encoding and decoding JPEG XL files when encountered, rather than returning an error and refusing to do anything. Signed-off-by: Leo Izen --- libavcodec/libjxldec.c | 15 +-- libavcodec/libjxlenc.c | 1 + 2 files changed, 10 insertions

[FFmpeg-devel] [PATCH 1/2] avutil/pixfmt.h: add native-endian RGB32F and RGBA32F formats

2022-10-02 Thread Leo Izen
Add an AV_PIX_FMT_NE macro for RGB32FBE/RGB32FLE and also one for RGBA32FBE/RGBA32FLE for packed 32-bit float RGB samples, and also packed 32-bit float RGBA samples, respectively. Signed-off-by: Leo Izen --- libavutil/pixfmt.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavutil/pixf

[FFmpeg-devel] [PATCH 0/2] RGB(A)32F in libjxl

2022-10-02 Thread Leo Izen
FFmpeg has supported these pixel formats since 7bb0afc245d093b0 and libjxl supports receiving/sending these pixel formats so it makes sense to add support to the libjxl wrapper for these formats. Leo Izen (2): avutil/pixfmt.h: add native-endian RGB32F and RGBA32F formats avcodec/libjxl: use RG