[FFmpeg-devel] [PATCH] riscv: Use the correct path for including asm.S

2022-09-28 Thread Martin Storsjö
Signed-off-by: Martin Storsjö --- This should hopefully fix the compile failures on fate, http://fate.ffmpeg.org/report.cgi?time=20220927222508&slot=riscv64-linux-gnu-gcc-12 and http://fate.ffmpeg.org/report.cgi?time=20220927225014&slot=riscv64-linux-gnu-clang-14. --- libavcodec/riscv/fmtconvert_

[FFmpeg-devel] [PATCH] arm: vc1dsp: Canonicalize the syntax for aligned NEON loads/stores

2022-09-28 Thread Martin Storsjö
This hopefully should fix building with older toolchains, hopefully fixing the fate failures on http://fate.ffmpeg.org/history.cgi?slot=armel5tej-qemu-debian-gcc4.4. Signed-off-by: Martin Storsjö --- libavcodec/arm/vc1dsp_neon.S | 40 ++-- 1 file changed, 20 inser

Re: [FFmpeg-devel] [PATCH] riscv: Use the correct path for including asm.S

2022-09-28 Thread Rémi Denis-Courmont
Le 28 septembre 2022 10:13:57 GMT+03:00, "Martin Storsjö" a écrit : >Signed-off-by: Martin Storsjö >--- >This should hopefully fix the compile failures on fate, >http://fate.ffmpeg.org/report.cgi?time=20220927222508&slot=riscv64-linux-gnu-gcc-12 >and >http://fate.ffmpeg.org/report.cgi?time=20220

Re: [FFmpeg-devel] [PATCH] riscv: Use the correct path for including asm.S

2022-09-28 Thread Martin Storsjö
On Wed, 28 Sep 2022, Rémi Denis-Courmont wrote: Le 28 septembre 2022 10:13:57 GMT+03:00, "Martin Storsjö" a écrit : Signed-off-by: Martin Storsjö --- This should hopefully fix the compile failures on fate, http://fate.ffmpeg.org/report.cgi?time=20220927222508&slot=riscv64-linux-gnu-gcc-12 an

[FFmpeg-devel] [PATCH] doc/APIchanges: mention the addition of AV_PIX_FMT_RGB[A]F*

2022-09-28 Thread Anton Khirnov
lavu minor bump was apparently forgotten for those, so mention them in the block adding av_chroma_location*(), which was the next lavu minor bump. --- doc/APIchanges | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index b0a41c9e37..a6df7a231a

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

2022-09-28 Thread Rémi Denis-Courmont
Le 27 septembre 2022 23:04:22 GMT+03:00, r...@remlab.net a écrit : >From: Rémi Denis-Courmont > >--- > libavcodec/idctdsp.c| 2 ++ > libavcodec/idctdsp.h| 2 ++ > libavcodec/riscv/Makefile | 2 ++ > libavcodec/riscv/idctdsp_init.c | 41 +++

Re: [FFmpeg-devel] [PATCH] mediacodecdec_common: enable refcounting of buffers unconditionally

2022-09-28 Thread Anton Khirnov
Quoting sfan5 (2022-09-18 20:26:48) > This allows av_mediacodec_release_buffer to be called safely after > the decoder is closed, this was already the case with delay_flush=1. > Note that this causes holding onto frames to keep the decoding context > alive which is generally considered to be the in

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

2022-09-28 Thread Paul B Mahol
On 9/27/22, Mark Reid wrote: > 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 alre

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

2022-09-28 Thread Tomas Härdin
tis 2022-09-27 klockan 21:20 +0200 skrev 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. > > > > > (

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

2022-09-28 Thread Martin Storsjö
On Mon, 26 Sep 2022, Grzegorz Bernacki wrote: 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 Bench

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

2022-09-28 Thread Martin Storsjö
On Mon, 26 Sep 2022, Grzegorz Bernacki wrote: 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/aa

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

2022-09-28 Thread Martin Storsjö
On Mon, 26 Sep 2022, Grzegorz Bernacki wrote: 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 --- libav

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

2022-09-28 Thread Martin Storsjö
On Mon, 26 Sep 2022, Grzegorz Bernacki wrote: 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

[FFmpeg-devel] [PATCH 1/2] aarch64: me_cmp: Avoid redundant loads in ff_pix_abs16_y2_neon

2022-09-28 Thread Martin Storsjö
This avoids one redundant load per row; pix3 from the previous iteration can be used as pix2 in the next one. Before: Cortex A53A72A73 pix_abs_0_2_neon: 138.0 59.7 48.0 After: pix_abs_0_2_neon: 109.7 50.2 39.5 Signed-off-by: Martin Storsjö --- libavcodec/aarch64/me_cmp_n

[FFmpeg-devel] [PATCH 2/2] aarch64: me_cmp: Avoid using the non-unrolled codepath for the minimum unroll size

2022-09-28 Thread Martin Storsjö
Signed-off-by: Martin Storsjö --- libavcodec/aarch64/me_cmp_neon.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/aarch64/me_cmp_neon.S b/libavcodec/aarch64/me_cmp_neon.S index 832a7cb22d..c710358ab7 100644 --- a/libavcodec/aarch64/me_cmp_neon.S +++ b/libavco

Re: [FFmpeg-devel] [PATCH 1/2] aarch64: me_cmp: Avoid redundant loads in ff_pix_abs16_y2_neon

2022-09-28 Thread Hubert Mazur
LGTM, thanks! On Wed, Sep 28, 2022 at 11:13 AM Martin Storsjö wrote: > This avoids one redundant load per row; pix3 from the previous > iteration can be used as pix2 in the next one. > > Before: Cortex A53A72A73 > pix_abs_0_2_neon: 138.0 59.7 48.0 > After: > pix_abs_0_2_neon:

Re: [FFmpeg-devel] [PATCH 2/2] aarch64: me_cmp: Avoid using the non-unrolled codepath for the minimum unroll size

2022-09-28 Thread Hubert Mazur
LGTM. On Wed, Sep 28, 2022 at 11:13 AM Martin Storsjö wrote: > Signed-off-by: Martin Storsjö > --- > libavcodec/aarch64/me_cmp_neon.S | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavcodec/aarch64/me_cmp_neon.S > b/libavcodec/aarch64/me_cmp_neon.S > index 832

[FFmpeg-devel] [PATCH 1/8] lavfi/vf_fps: set frame duration

2022-09-28 Thread Anton Khirnov
--- libavfilter/vf_fps.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_fps.c b/libavfilter/vf_fps.c index 0e5a1fec35..051d278f54 100644 --- a/libavfilter/vf_fps.c +++ b/libavfilter/vf_fps.c @@ -291,6 +291,7 @@ static int write_frame(AVFilterContext *ctx, FPSContext *s, AVFilt

[FFmpeg-devel] [PATCH 6/8] lavfi/avf_showcqt: set frame durations

2022-09-28 Thread Anton Khirnov
The filter is supposed to produce CFR output. --- libavfilter/avf_showcqt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/avf_showcqt.c b/libavfilter/avf_showcqt.c index 33c482bd42..c019dc2564 100644 --- a/libavfilter/avf_showcqt.c +++ b/libavfilter/avf_showcqt.c @@ -1187,6 +1187

[FFmpeg-devel] [PATCH 2/8] lavfi/setpts: unset frame durations

2022-09-28 Thread Anton Khirnov
This filter cannot know frame durations. --- libavfilter/setpts.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/setpts.c b/libavfilter/setpts.c index 171fae88c0..ba653df4ae 100644 --- a/libavfilter/setpts.c +++ b/libavfilter/setpts.c @@ -185,6 +185,7 @@ static int filter_frame(AV

[FFmpeg-devel] [PATCH 4/8] lavfi/avf_aphasemeter: set frame durations

2022-09-28 Thread Anton Khirnov
The filter is supposed to produce CFR output. --- libavfilter/avf_aphasemeter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/avf_aphasemeter.c b/libavfilter/avf_aphasemeter.c index 3501e62825..0f7692982c 100644 --- a/libavfilter/avf_aphasemeter.c +++ b/libavfilter/avf_aphaseme

[FFmpeg-devel] [PATCH 5/8] lavfi/avf_avectorscope: set frame durations

2022-09-28 Thread Anton Khirnov
The filter is supposed to produce CFR output. --- libavfilter/avf_avectorscope.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/avf_avectorscope.c b/libavfilter/avf_avectorscope.c index fe381a631d..2ed85f56e5 100644 --- a/libavfilter/avf_avectorscope.c +++ b/libavfilter/avf_avecto

[FFmpeg-devel] [PATCH 3/8] lavfi/avf_ahistogram: set frame durations

2022-09-28 Thread Anton Khirnov
The filter is supposed to produce CFR output. --- libavfilter/avf_ahistogram.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/avf_ahistogram.c b/libavfilter/avf_ahistogram.c index d14e0bcfac..c45493730d 100644 --- a/libavfilter/avf_ahistogram.c +++ b/libavfilter/avf_ahistogram.c @

[FFmpeg-devel] [PATCH 7/8] lavfi/avf_showfreqs: set frame durations

2022-09-28 Thread Anton Khirnov
The filter is supposed to produce CFR output. --- libavfilter/avf_showfreqs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/avf_showfreqs.c b/libavfilter/avf_showfreqs.c index 86a67c7328..cc7d6204b4 100644 --- a/libavfilter/avf_showfreqs.c +++ b/libavfilter/avf_showfreqs.c @@ -46

[FFmpeg-devel] [PATCH 8/8] lavfi/avf_showspatial: add framerate option

2022-09-28 Thread Anton Khirnov
Apparently this option was intended (the context contains a currently-unused frame_rate field), but was never added. This results in the output timebase being unset after config_output(), so the input audio timebase ends up being used for video output, which is clearly wrong. Add an option for set

[FFmpeg-devel] [PATCH 2/3] lavc/encode: generalize a check for setting dts=pts

2022-09-28 Thread Anton Khirnov
DTS may be different from PTS only if both of these are true: - the codec supports reordering - the encoder has delay --- libavcodec/encode.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index 0f78012747..fb3ab0db3c 100644 -

[FFmpeg-devel] [PATCH 3/3] lavc/encode: combine setting no-delay pts for video/audio

2022-09-28 Thread Anton Khirnov
--- libavcodec/encode.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libavcodec/encode.c b/libavcodec/encode.c index fb3ab0db3c..a1bc10fa3a 100644 --- a/libavcodec/encode.c +++ b/libavcodec/encode.c @@ -209,13 +209,13 @@ int ff_encode_encode_cb(AVCodecContext *avc

[FFmpeg-devel] [PATCH 1/3] lavc/encode: make sure frame timebase matches encoder, when set

2022-09-28 Thread Anton Khirnov
AVFrame.time_base has been added recently, but is currently not used for anything. Prepare for its use in encoders by rejecting frames where time_base is set, but differs from the AVCodecContext one. --- libavcodec/avcodec.h | 4 libavcodec/encode.c | 8 libavutil/frame.h| 5 +++

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

2022-09-28 Thread Tomas Härdin
tis 2022-09-27 klockan 17:23 +0200 skrev 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

Re: [FFmpeg-devel] [PATCH] mediacodecdec_common: enable refcounting of buffers unconditionally

2022-09-28 Thread Matthieu Bouron
On Wed, Sep 28, 2022 at 10:27:49AM +0200, Anton Khirnov wrote: > Quoting sfan5 (2022-09-18 20:26:48) > > This allows av_mediacodec_release_buffer to be called safely after > > the decoder is closed, this was already the case with delay_flush=1. > > Note that this causes holding onto frames to keep

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

2022-09-28 Thread Lynne
Sep 28, 2022, 10:06 by r...@remlab.net: > Le 27 septembre 2022 23:04:22 GMT+03:00, r...@remlab.net a écrit : > >From: Rémi Denis-Courmont > >> >> > >--- > >> libavcodec/idctdsp.c| 2 ++ >> libavcodec/idctdsp.h| 2 ++ >> libavcodec/riscv/Makefile | 2 ++ >> libavcodec

[FFmpeg-devel] [PATCH 2/9] fftools/ffmpeg: drop always-true conditions

2022-09-28 Thread Anton Khirnov
in_picture->pts cannot be AV_NOPTS_VALUE, as it is set to ost->sync_opts a few lines above. ost->sync_opts is never AV_NOPTS_VALUE. --- fftools/ffmpeg.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index f84701ec75..2054271c82 100644

[FFmpeg-devel] [PATCH 1/9] fftools/ffmpeg: drop the -async option

2022-09-28 Thread Anton Khirnov
It has been deprecated in favor of the aresample filter for almost 10 years. Another thing this option can do is drop audio timestamps and have them generated by the encoding code or the muxer, but - for encoding, this can already be done with the setpts filter - for muxing this should almost neve

[FFmpeg-devel] [PATCH 6/9] fftools/ffmpeg: stop setting OutputStream.sync_opts for streamcopy

2022-09-28 Thread Anton Khirnov
It is not used for anything. --- fftools/ffmpeg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 971c146fea..1a6768f6c2 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1934,8 +1934,6 @@ static void do_streamcopy(InputStream *ist, OutputStrea

[FFmpeg-devel] [PATCH 7/9] fftools/ffmpeg: pass the timestamp to check_recording_time()

2022-09-28 Thread Anton Khirnov
Stop setting OutputStream.sync_opts for subtitle encoding, as it is now unused. --- fftools/ffmpeg.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 1a6768f6c2..40c01b1c65 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.

[FFmpeg-devel] [PATCH 4/9] fftools/ffmpeg: cosmetics

2022-09-28 Thread Anton Khirnov
Reindent after previous commit, apply some style fixes. --- fftools/ffmpeg.c | 85 1 file changed, 42 insertions(+), 43 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 833df0b167..697971167c 100644 --- a/fftools/ffmpeg.c +++ b/f

[FFmpeg-devel] [PATCH 3/9] fftools/ffmpeg: move forced keyframe processing into its own function

2022-09-28 Thread Anton Khirnov
--- fftools/ffmpeg.c | 108 +-- 1 file changed, 58 insertions(+), 50 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 2054271c82..833df0b167 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -1133,6 +1133,63 @@ static void do_su

[FFmpeg-devel] [PATCH 5/9] fftools/ffmpeg: drop never-set OutputStream.first_pts

2022-09-28 Thread Anton Khirnov
--- fftools/ffmpeg.c | 2 +- fftools/ffmpeg.h | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 697971167c..971c146fea 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -763,7 +763,7 @@ static int check_recording_time(OutputStrea

[FFmpeg-devel] [PATCH 8/9] fftools/ffmpeg: rename OutputStream.sync_opts to next_pts

2022-09-28 Thread Anton Khirnov
The current name is confusing. --- fftools/ffmpeg.c | 22 -- fftools/ffmpeg.h | 6 +++--- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 40c01b1c65..6deca8bfbf 100644 --- a/fftools/ffmpeg.c +++ b/fftools/ffmpeg.c @@ -

[FFmpeg-devel] [PATCH 9/9] fftools/ffmpeg: move some code from init_output_stream() to init_output_stream_encode()

2022-09-28 Thread Anton Khirnov
The code is subtitle-encoding-specific, so this is a more appropriate place for it. --- fftools/ffmpeg.c | 58 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c index 6deca8bfbf..754172e568 100644 --

[FFmpeg-devel] [PATCH 01/11] lavc/jpeg2000dec: Finer granularity threading

2022-09-28 Thread Tomas Härdin
Hi This patchset depends both on my execute2() patchset and on av_realloc*_array_reuse(). The performance numbers aren't fully up to date, but I expect they won't have changed much. /Tomas From 9f70f673b2977e969c2c6df51d7a2b7d73302f08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?=

[FFmpeg-devel] [PATCH 02/11] lavc/jpeg2000dec: Reindent

2022-09-28 Thread Tomas Härdin
From 99e9b6cf421538dee6e0280daf3d1ffc71c1acda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Fri, 10 Jun 2022 14:12:11 +0200 Subject: [PATCH 02/11] lavc/jpeg2000dec: Reindent --- libavcodec/jpeg2000dec.c | 36 ++-- 1 file changed, 18 inserti

[FFmpeg-devel] [PATCH 03/11] lavc/jpeg2000dwt: Implement sliced transforms

2022-09-28 Thread Tomas Härdin
From 159d744f09f39e3350ac39ac5d05feaca22103af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Fri, 10 Jun 2022 17:18:14 +0200 Subject: [PATCH 03/11] lavc/jpeg2000dwt: Implement sliced transforms lavc/tests/jpeg2000dwt tests this. --- libavcodec/j2kenc.c| 3 +-

[FFmpeg-devel] [PATCH 04/11] lavc/jpeg2000dec: Thread init_tile()

2022-09-28 Thread Tomas Härdin
This is the one that needs the new execute2() From 4e7c65a7a3e049396ce5e3c01db335a532889115 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Mon, 13 Jun 2022 15:09:17 +0200 Subject: [PATCH 04/11] lavc/jpeg2000dec: Thread init_tile() --- libavcodec/jpeg2000dec.c | 31 +

[FFmpeg-devel] [PATCH 05/11] lavc/jpeg2000*: Use av_realloc_array_reuse() and av_reallocz_array_reuse() to eliminate lots of allocations

2022-09-28 Thread Tomas Härdin
From 5a5986c29d62933f3f2cd2259becb763f3719eaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Mon, 13 Jun 2022 17:04:10 +0200 Subject: [PATCH 05/11] lavc/jpeg2000*: Use av_realloc_array_reuse() and av_reallocz_array_reuse() to eliminate lots of allocations --- libavcodec/j

[FFmpeg-devel] [PATCH 06/11] lavc/jpeg2000: Switch Jpeg2000TgtNode to int32_t parent

2022-09-28 Thread Tomas Härdin
From 807d7d315269126e7eccd0c36d7c29615cb98676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 7 Jun 2022 16:43:40 +0200 Subject: [PATCH 06/11] lavc/jpeg2000: Switch Jpeg2000TgtNode to int32_t parent --- libavcodec/j2kenc.c | 44

[FFmpeg-devel] [PATCH 07/11] lavc/jpeg2000: Speed up ff_jpeg2000_tag_tree_init() using stereotypes for sizes <= 4x4

2022-09-28 Thread Tomas Härdin
From a31a6d82b257f51618389a67af18d49cc78ac240 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Wed, 8 Jun 2022 10:08:15 +0200 Subject: [PATCH 07/11] lavc/jpeg2000: Speed up ff_jpeg2000_tag_tree_init() using stereotypes for sizes <= 4x4 --- libavcodec/jpeg2000.c | 36 +++

[FFmpeg-devel] [PATCH 08/11] lavc/jpeg2000: Reindent

2022-09-28 Thread Tomas Härdin
From 2e915fbbd481c1d202c0ec058842cfc9f9593871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 14 Jun 2022 11:23:08 +0200 Subject: [PATCH 08/11] lavc/jpeg2000: Reindent --- libavcodec/jpeg2000.c | 44 +-- 1 file changed, 22 insert

[FFmpeg-devel] [PATCH 09/11] lavc/jpeg2000: Minimize calls to av_codec_is_encoder()

2022-09-28 Thread Tomas Härdin
From ecb1d9ff671b83bddb0d1c7d31d60ade4b5cdead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 14 Jun 2022 10:57:45 +0200 Subject: [PATCH 09/11] lavc/jpeg2000: Minimize calls to av_codec_is_encoder() --- libavcodec/jpeg2000.c | 19 +++ 1 file changed, 11

[FFmpeg-devel] [PATCH 10/11] lavc/jpeg2000dec: Use coarser slicing for initial reslevels

2022-09-28 Thread Tomas Härdin
This patch is more informal, there's probably a better way to bump performance up above 50 fps. This is for the smoke_sauna sample on SVT's FTP by the way. From 103c38adabae39a607049ef517de43f4d2f9d406 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 14 Jun 2022 11:19:06 +

[FFmpeg-devel] [PATCH 11/11] lavc/jpeg2000dec: Component-level threading of write_frame()

2022-09-28 Thread Tomas Härdin
Ideally the clipping done by write_frame() and the MCT stuff would be done at the final IDWT stage From 34f055bb0732085d6f97d8f27890b47afb8ca868 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Tue, 14 Jun 2022 15:45:32 +0200 Subject: [PATCH 11/11] lavc/jpeg2000dec: Component-l

[FFmpeg-devel] [PATCH] ffmpeg: Make find_stream_info behave like a normal per-file option

2022-09-28 Thread Marvin Scholz
Currently it would essentially change the find_stream_info setting for the file it was specified for and all following files, which is unusual and somewhat unexpected behaviour for a per-file option and not even documented to behave like this. --- fftools/ffmpeg.h | 1 + fftools/ffmpeg_opt.c |

[FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: Remove unused do_deinterlace variable

2022-09-28 Thread Marvin Scholz
Unused since removal of the -deinterlace option in d013453caafcc44c74d4bdbaa99ee4e8f32414cb --- fftools/ffmpeg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index ede0b2bd96..b7a7062378 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -661,7 +661,6

[FFmpeg-devel] [PATCH 2/2] fftools/ffmpeg: Remove unused frame_bits_per_raw_sample variable

2022-09-28 Thread Marvin Scholz
Unused since the bits_per_raw_sample was made a per-output-stream option in 425889396137451ae30288c84122e28532b71596 --- fftools/ffmpeg.h | 1 - 1 file changed, 1 deletion(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index b7a7062378..a4c25e0f32 100644 --- a/fftools/ffmpeg.h +++ b/fftools/

[FFmpeg-devel] [PATCH 3/6] lavc: replace av_fast_realloc() with av_realloc_reuse()

2022-09-28 Thread Anton Khirnov
--- libavcodec/4xm.c | 6 +++--- libavcodec/audio_frame_queue.c | 3 ++- libavcodec/audio_frame_queue.h | 2 +- libavcodec/av1_parse.c | 2 +- libavcodec/av1_parse.h | 2 +- libavcodec/dirac_parser.c | 10 +- libavcodec/dxva2_av1.c | 6 +++--

[FFmpeg-devel] [PATCH 5/6] lavf: replace av_fast_realloc() with av_realloc_reuse()

2022-09-28 Thread Anton Khirnov
--- libavformat/avc.c | 4 +-- libavformat/avc.h | 2 +- libavformat/bethsoftvid.c | 6 ++-- libavformat/cafenc.c | 8 ++--- libavformat/concat.c | 4 +-- libavformat/demux.h | 2 +- libavformat/hls.c | 4 +-- libavformat/imf.h | 2 +- libavf

[FFmpeg-devel] [PATCH 6/6] sws: replace av_fast_realloc() with av_realloc_reuse()

2022-09-28 Thread Anton Khirnov
--- libswscale/swscale_internal.h | 2 +- libswscale/utils.c| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index abeebbb002..1566bb50fe 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/sw

[FFmpeg-devel] [PATCH 1/6] lavu/mem: add av_realloc_reuse() as a replacement for av_fast_realloc()

2022-09-28 Thread Anton Khirnov
It uses size_t rather than unsigned for the size and conforms to our standard naming scheme. --- configure | 5 - doc/APIchanges | 3 +++ libavutil/mem.c | 30 ++ libavutil/mem.h | 37 +++-- libavutil/version.

[FFmpeg-devel] [PATCH 4/6] lavfi: replace av_fast_realloc() with av_realloc_reuse()

2022-09-28 Thread Anton Khirnov
--- libavfilter/af_adelay.c| 4 ++-- libavfilter/asrc_afirsrc.c | 12 ++-- libavfilter/avf_showspectrum.c | 8 libavfilter/f_drawgraph.c | 18 +- libavfilter/f_graphmonitor.c | 8 libavfilter/f_reverse.c| 16

[FFmpeg-devel] [PATCH 2/6] lavu: replace av_fast_realloc() with av_realloc_reuse()

2022-09-28 Thread Anton Khirnov
--- libavutil/hwcontext_vulkan.c | 6 +++--- libavutil/tx.c | 6 +++--- libavutil/vulkan.c | 40 ++-- libavutil/vulkan.h | 18 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/libavutil/hwcontext_v

Re: [FFmpeg-devel] [PATCH 1/6] lavu/mem: add av_realloc_reuse() as a replacement for av_fast_realloc()

2022-09-28 Thread Rémi Denis-Courmont
Le 28 septembre 2022 13:48:49 GMT+03:00, Anton Khirnov a écrit : >It uses size_t rather than unsigned for the size and conforms to our >standard naming scheme. >--- > configure | 5 - > doc/APIchanges | 3 +++ > libavutil/mem.c | 30 ++ > libavuti

Re: [FFmpeg-devel] [PATCH 1/6] lavu/mem: add av_realloc_reuse() as a replacement for av_fast_realloc()

2022-09-28 Thread Rémi Denis-Courmont
Le 28 septembre 2022 13:51:43 GMT+03:00, "Rémi Denis-Courmont" a écrit : >Le 28 septembre 2022 13:48:49 GMT+03:00, Anton Khirnov a >écrit : >>It uses size_t rather than unsigned for the size and conforms to our >>standard naming scheme. >>--- >> configure | 5 - >> doc/APIchanges

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

2022-09-28 Thread Andreas Rheinhardt
Tomas Härdin: > tis 2022-09-27 klockan 17:23 +0200 skrev 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: >>>

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

2022-09-28 Thread Tomas Härdin
ons 2022-09-28 klockan 13:06 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2022-09-27 klockan 17:23 +0200 skrev 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: > > > >

Re: [FFmpeg-devel] [PATCH 1/6] lavu/mem: add av_realloc_reuse() as a replacement for av_fast_realloc()

2022-09-28 Thread Tomas Härdin
ons 2022-09-28 klockan 12:48 +0200 skrev Anton Khirnov: > > +/** > + * Reallocate a data buffer, reusing the existing one if it is large > enough. > + * > + * This function is similar to av_realloc(), but optimized for cases > where the > + * buffer may grow significantly and is not expected to sh

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

2022-09-28 Thread Grzegorz Bernacki
Hi Martin, I resent the patchset, because the first try did not reach ffmpeg-devel maillist. I apologize, I should have mentioned about that in cover letter. Thanks a lot for your review, I will apply the changes and send v2 soon. thanks, grzegorz śr., 28 wrz 2022 o 11:07 Martin Storsjö napisał

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

2022-09-28 Thread Peter Krefting
Hi! 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 that's supposed ti be guarded by run-time CPU flags rather tha

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

2022-09-28 Thread Anton Khirnov
Quoting Andreas Rheinhardt (2022-09-26 21:58:55) > 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 +++

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

2022-09-28 Thread Andreas Rheinhardt
Anton Khirnov: > Quoting Andreas Rheinhardt (2022-09-26 21:58:55) >> 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/pix

Re: [FFmpeg-devel] [PATCH] lavf/async: Fix wrapped_url_read return value

2022-09-28 Thread Anton Khirnov
Quoting Guangyu Sun (2022-09-19 07:22:39) > This fixes a regression from commit 36117968ad. > > wrapped_url_read() used to be able to return positive number from > ffurl_read(). It relies on the result to check if EOF is reached in > async_buffer_task(). > > Test case: > ffmpeg -f lavfi -i test

Re: [FFmpeg-devel] [PATCH 04/11] lavc/jpeg2000dec: Thread init_tile()

2022-09-28 Thread Tomas Härdin
ons 2022-09-28 klockan 12:06 +0200 skrev Tomas Härdin: > This is the one that needs the new execute2() A data race snuck into this one, updated patch attached. /Tomas From 6fc3920731950a1820f88e3ae0cf1258ae17b75d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Mon, 13 Jun 20

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

2022-09-28 Thread Anton Khirnov
Quoting James Almer (2022-09-10 03:16:32) > On 9/9/2022 7:44 PM, Will Cassella wrote: > > In the case where the FLAC picture MIME type is not understood, fail to > > parse the picture silently rather than return AVERROR_INVALIDDATA. > > > > This originated from a bug reported in Chromium: https://

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

2022-09-28 Thread Rémi Denis-Courmont
Le 28 septembre 2022 15:52:46 GMT+03:00, Peter Krefting a écrit : >Hi! > >>> 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

Re: [FFmpeg-devel] [PATCH 1/2] fftools/ffmpeg: Remove unused do_deinterlace variable

2022-09-28 Thread Anton Khirnov
patches LGTM, will push -- Anton Khirnov ___ 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] lavu: bump minor version for the RISC-V flags

2022-09-28 Thread Anton Khirnov
Forgotten in 0c0a3deb18. Also add an APIchanges entry. --- doc/APIchanges | 5 + libavutil/version.h | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index a6df7a231a..f32a3954a0 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -14,

Re: [FFmpeg-devel] [PATCH] avcodec/mjpegdec: fix -Wparentheses warning

2022-09-28 Thread Anton Khirnov
Quoting Zhao Zhili (2022-09-23 19:46:24) > > > > -Original Message- > > From: ffmpeg-devel-boun...@ffmpeg.org On > > Behalf Of Rémi Denis-Courmont > > Sent: 2022年9月23日 22:35 > > To: ffmpeg-devel@ffmpeg.org > > Subject: Re: [FFmpeg-devel] [PATCH] avcodec/mjpegdec: fix -Wparentheses > >

Re: [FFmpeg-devel] [PATCH 1/6] lavu/mem: add av_realloc_reuse() as a replacement for av_fast_realloc()

2022-09-28 Thread Anton Khirnov
Quoting Tomas Härdin (2022-09-28 13:48:01) > ons 2022-09-28 klockan 12:48 +0200 skrev Anton Khirnov: > > > > +/** > > + * Reallocate a data buffer, reusing the existing one if it is large > > enough. > > + * > > + * This function is similar to av_realloc(), but optimized for cases > > where the >

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

2022-09-28 Thread Anton Khirnov
Quoting Chema Gonzalez (2022-09-26 18:11:22) > diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c > index 8838cc8b53..9af2e7ecc3 100644 > --- a/libswscale/swscale_unscaled.c > +++ b/libswscale/swscale_unscaled.c > @@ -2095,6 +2095,7 @@ void ff_get_unscaled_swscale(SwsContext

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

2022-09-28 Thread Peter Krefting
Rémi Denis-Courmont: Our compiler (powerpc-btech-linux-gnuspe-gcc (crosstool-NG 1.24.0) 8.3.0) recognizes the instruction, so the configure test succeeds, but the CPU (e500v2) crashes if it tries to execute it. Yes? Indeed. I previously had a patch (d5733936d857ce5c7d28c0bc9e89a2e2548f8895)

Re: [FFmpeg-devel] [PATCH 1/2] avformat/vividas: Check packet size

2022-09-28 Thread Anton Khirnov
Quoting Michael Niedermayer (2022-09-22 20:08:51) > Fixes: signed integer overflow: 119760682 - -2084600173 cannot be represented > in type 'int' > Fixes: > 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_VIVIDAS_fuzzer-6745781167587328 > > Found-by: continuous fuzzing process > https://github.

Re: [FFmpeg-devel] [PATCH 2/2] avformat/westwood_vqa: Check chunk size

2022-09-28 Thread Anton Khirnov
Quoting Michael Niedermayer (2022-09-22 20:08:52) > the type is also changed to int as it is interpreted as int in av_get_packet() > > Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type > 'int' > Fixes: > 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_WSVQA_fuzzer-6593

[FFmpeg-devel] [PATCH 0/3] RISC-V V swscale pixel format conversions

2022-09-28 Thread Rémi Denis-Courmont
Hello, This adds the pixel format conversions that appear to covered by checkasm (plus YUYV to I422 for which a patch was sent already). RVV has no register-register interleaving/deinterleaving instructions, so this uses strided loads or stores instead. Another option would be full register move

[FFmpeg-devel] [PATCH 1/3] sws/rgb2rgb: RISC-V V shuffle_bytes_xxxx functions

2022-09-28 Thread remi
From: Rémi Denis-Courmont --- libswscale/rgb2rgb.c | 2 + libswscale/rgb2rgb.h | 1 + libswscale/riscv/Makefile | 2 + libswscale/riscv/rgb2rgb.c | 47 libswscale/riscv/rgb2rgb_rvv.S | 78 ++ 5 files changed, 13

[FFmpeg-devel] [PATCH 2/3] sws/rgb2rgb: RISC-V V interleaveBytes

2022-09-28 Thread remi
From: Rémi Denis-Courmont --- libswscale/riscv/rgb2rgb.c | 4 libswscale/riscv/rgb2rgb_rvv.S | 26 ++ 2 files changed, 30 insertions(+) diff --git a/libswscale/riscv/rgb2rgb.c b/libswscale/riscv/rgb2rgb.c index 5654154494..32c1546827 100644 --- a/libswscale/ris

[FFmpeg-devel] [PATCH 3/3] sws/rgb2rgb: RISC-V 64-bit V packed YUYV/UYVY to planar 4:2:2

2022-09-28 Thread remi
From: Rémi Denis-Courmont This is currently 64-bit only because the stack spilling code would not assemble on RV32I (and it would corrupt s0 and s1 on RV128I, in theory). This could be added later in the unlikely that someone wants it. --- libswscale/riscv/rgb2rgb.c | 10 +++ libswscale

Re: [FFmpeg-devel] [PATCH 1/6] lavu/mem: add av_realloc_reuse() as a replacement for av_fast_realloc()

2022-09-28 Thread Andreas Rheinhardt
Tomas Härdin: > ons 2022-09-28 klockan 12:48 +0200 skrev Anton Khirnov: >> >> +/** >> + * Reallocate a data buffer, reusing the existing one if it is large >> enough. >> + * >> + * This function is similar to av_realloc(), but optimized for cases >> where the >> + * buffer may grow significantly an

Re: [FFmpeg-devel] [PATCH] avcodec: add a bsf to reorder DTS into PTS

2022-09-28 Thread Anton Khirnov
Quoting James Almer (2022-09-23 16:27:32) > On 9/23/2022 10:06 AM, Anton Khirnov wrote: > >> +static int dts2pts_filter(AVBSFContext *ctx, AVPacket *out) > >> +{ > >> +DTS2PTSContext *s = ctx->priv_data; > >> +DTS2PTSNode *poc_node = NULL, *next[2] = { NULL, NULL }; > >> +DTS2PTSFrame f

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

2022-09-28 Thread Chema Gonzalez
Hi, On Wed, Sep 28, 2022 at 8:09 AM Anton Khirnov wrote: > > if (isBayer(srcFormat)) { > > +c->dst_slice_align = 2; > > IMO it's better to put this next to the line that sets dst_slice_align > for non-bayer cases, makes it clearer what the final value is. Are you suggesting setting `

[FFmpeg-devel] [PATCH 1/5] avcodec/rl2: Remove wrong check

2022-09-28 Thread Andreas Rheinhardt
This check is intended to be avoid buffer overflows, yet there are four problems with it: 1. It has an in-built off-by-one error: len == out_end - out is perfectly fine and nothing to worry about. This off-by-one error led to the pixel in the lower-right corner not being set properly for the back f

[FFmpeg-devel] [PATCH 2/5] avcodec/rl2: Don't presume stride to be > 0

2022-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- Lots of fate tests fail if this assumption is not fulfilled. libavcodec/rl2.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c index 2464ad59ac..467c4913a4 100644 --- a/libavcodec/rl2.c +++ b/

[FFmpeg-devel] [PATCH 3/5] avcodec/rl2: Use ptrdiff_t for stride

2022-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/rl2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c index 467c4913a4..76982f0426 100644 --- a/libavcodec/rl2.c +++ b/libavcodec/rl2.c @@ -57,11 +57,11 @@ typedef struct Rl2Context { *

[FFmpeg-devel] [PATCH 5/5] avcodec/rl2: Fix indentation

2022-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/rl2.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavcodec/rl2.c b/libavcodec/rl2.c index 7938ef1d92..e427a27dce 100644 --- a/libavcodec/rl2.c +++ b/libavcodec/rl2.c @@ -62,7 +62,6 @@ static void rl2_rle_de

[FFmpeg-devel] [PATCH 4/5] avcodec/rl2: Fix undefined pointer arithmetic

2022-09-28 Thread Andreas Rheinhardt
Don't increment back_frame if it does not correspond to a real buffer. To do this, handle copying from the back frame separately from the "use coded value" codepath; also use memcpy for the former, as the chunks here are typically worth it. Signed-off-by: Andreas Rheinhardt --- libavcodec/rl2.c

[FFmpeg-devel] [PATCH] swscale/swscale_unscaled: Fix undefined NULL + 0

2022-09-28 Thread Andreas Rheinhardt
Affected the fitsdec-gbrp16 FATE-test. Signed-off-by: Andreas Rheinhardt --- libswscale/swscale_unscaled.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c index 8838cc8b53..0b97377934 100644 --- a/libswscale/

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

2022-09-28 Thread 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/libavcodec/zerocodec.c +++ b/libavcodec/z

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

2022-09-28 Thread 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 Rheinhardt --- libavcodec/wmavoice.c | 9

[FFmpeg-devel] [PATCH 2/3] avcodec/wmavoice: Check init_get_bits8()

2022-09-28 Thread Andreas Rheinhardt
Signed-off-by: Andreas Rheinhardt --- libavcodec/wmavoice.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 26744719e6..bb98f841a5 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -1911,7 +1911,9 @@ static

[FFmpeg-devel] [PATCH 3/3] avcodec/wmalosslessdec: Simplify flushing, avoid NULL + 0

2022-09-28 Thread Andreas Rheinhardt
Return immediately if not enough leftover bits are available when flushing. This is simpler and also avoids an init_get_bits(gb, NULL, 0) (which currently leads to NULL + 0, which is UB; this affects the lossless-wma(|-1|-2|-rawtile) FATE tests). Signed-off-by: Andreas Rheinhardt --- libavcodec/

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

2022-09-28 Thread 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(-) diff --git a/libavcodec/g723_1e

[FFmpeg-devel] [PATCH 2/6] avcodec/g723_1enc: Fix undefined left-shifts of negative numbers

2022-09-28 Thread Andreas Rheinhardt
Affected the acodec-g723_1 FATE-test. Signed-off-by: Andreas Rheinhardt --- libavcodec/g723_1enc.c | 71 +- 1 file changed, 35 insertions(+), 36 deletions(-) diff --git a/libavcodec/g723_1enc.c b/libavcodec/g723_1enc.c index a22985ca44..8466067185 100644

  1   2   >