Re: [FFmpeg-devel] [RFC PATCH] avfilter/video: Protect frame_pool from multi-threads access

2024-05-10 Thread Zhao Zhili
> On May 10, 2024, at 16:57, Zhao Zhili wrote: > > From: Zhao Zhili > > Fix crash with > ./ffplay -f lavfi -i movie=foo.mp4,drawtext=text=bar This is an RFC because I’m not sure whether it’s a valid use case or not to call ff_default_get_video_buffer2 from multiple threads. On one hand, it’s

Re: [FFmpeg-devel] [PATCH] avfilter/src_movie: Remove align dimension to fix crash

2024-05-10 Thread James Almer
On 5/10/2024 6:26 PM, Paul B Mahol wrote: On Fri, May 10, 2024 at 10:56 AM Zhao Zhili wrote: From: Zhao Zhili The alignment is handled by ff_default_get_video_buffer2. We shouldn't use the aligned width/height as FFFramePool width/height. It cause recreate FFFramePool inside ff_default_get_v

Re: [FFmpeg-devel] [PATCH 4/4] avfilter/vf_geq: fix interpolation with 1 pixel width/height

2024-05-10 Thread Michael Niedermayer
On Thu, May 09, 2024 at 08:49:18AM +0200, Marton Balint wrote: > Fixes ticket #9740. > > Signed-off-by: Marton Balint > --- > libavfilter/vf_geq.c | 20 > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/libavfilter/vf_geq.c b/libavfilter/vf_geq.c > index d

Re: [FFmpeg-devel] [PATCH] avformat/data_uri: Fix base64 decode buffer size calculation

2024-05-10 Thread Michael Niedermayer
On Thu, May 09, 2024 at 04:02:09PM +0200, Kacper Michajłow wrote: > Also reject input if it is too short. > > Found by OSS-Fuzz. > > Signed-off-by: Kacper Michajłow > --- > libavformat/data_uri.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/data_uri.

[FFmpeg-devel] [PATCH 2/2] avutil/tests/base64: Check with too short output array

2024-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavutil/tests/base64.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/libavutil/tests/base64.c b/libavutil/tests/base64.c index 400e01cefe4..66d0fdc1fc8 100644 --- a/libavutil/tests/base64.c +++ b/libavutil/tests/base64.c @@ -64,6 +64,16 @

[FFmpeg-devel] [PATCH 1/2] libavutil/base64: Try not to write over the array end

2024-05-10 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- libavutil/base64.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libavutil/base64.c b/libavutil/base64.c index 3e66f4fcbe5..69e11e6f5e1 100644 --- a/libavutil/base64.c +++ b/libavutil/base64.c @@ -127,10 +127,12 @@ validity_check:

Re: [FFmpeg-devel] FFmpeg, zlib based modules' FATE tests expecting bit-exact and Fedora switching to zlib-ng

2024-05-10 Thread Michael Niedermayer
On Fri, May 10, 2024 at 11:27:54PM +0200, Paul B Mahol wrote: > On Fri, May 10, 2024 at 10:38 PM Jan Ekström wrote: [...] > > --- a/tests/ref/vsynth/vsynth_lena-zlib > > +++ b/tests/ref/vsynth/vsynth_lena-zlib > > @@ -1,4 +1,4 @@ > > -abbfccc551b173a357024d8392de21dd *tests/data/fate/vsynth_lena-z

Re: [FFmpeg-devel] [FFmpeg-cvslog] avcodec/cbs_av1: Avoid shift overflow

2024-05-10 Thread Michael Niedermayer
On Thu, May 09, 2024 at 09:38:14PM +0100, Mark Thompson wrote: > On 09/05/2024 16:10, Michael Niedermayer wrote: > > ffmpeg | branch: master | Michael Niedermayer | > > Wed May 1 21:44:33 2024 +0200| [d7924a4f60f2088de1e6790345caba929eb97030] > > | committer: Michael Niedermayer > > > > avcode

Re: [FFmpeg-devel] FFmpeg, zlib based modules' FATE tests expecting bit-exact and Fedora switching to zlib-ng

2024-05-10 Thread Paul B Mahol
On Fri, May 10, 2024 at 10:38 PM Jan Ekström wrote: > Hi, > > As of Fedora 40, the zlib provider has been switched to zlib-ng > (https://fedoraproject.org/wiki/Changes/ZlibNGTransition). This has > reared the ugly fact that we expect that the usage of zlib APIs is > bit-exact. > > Some of these t

Re: [FFmpeg-devel] [PATCH] avfilter/src_movie: Remove align dimension to fix crash

2024-05-10 Thread Paul B Mahol
On Fri, May 10, 2024 at 10:56 AM Zhao Zhili wrote: > From: Zhao Zhili > > The alignment is handled by ff_default_get_video_buffer2. We > shouldn't use the aligned width/height as FFFramePool width/height. > It cause recreate FFFramePool inside ff_default_get_video_buffer2. > The recreate of FFFr

[FFmpeg-devel] [PATCH v2] libavfilter: add PipeWire-based grab

2024-05-10 Thread François-Simon Fauteux-Chapleau
This is a revised version of the "pipewiregrab" patch submitted by Abhishek Ojha a few months ago: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20231227162504.690730-1-abhishek.o...@savoirfairelinux.com/ https://patchwork.ffmpeg.org/project/ffmpeg/patch/20231227162504.690730-2-abhishek.o...@sa

[FFmpeg-devel] FFmpeg, zlib based modules' FATE tests expecting bit-exact and Fedora switching to zlib-ng

2024-05-10 Thread Jan Ekström
Hi, As of Fedora 40, the zlib provider has been switched to zlib-ng (https://fedoraproject.org/wiki/Changes/ZlibNGTransition). This has reared the ugly fact that we expect that the usage of zlib APIs is bit-exact. Some of these tests such as copy-apng that only do remux can be moved from transcod

[FFmpeg-devel] [PATCH v2] avformat/hls: update current segment reference before use

2024-05-10 Thread Kacper Michajłow
It may be invalidated by the time it is used. Fixes use after free when accessing current segment. Fixes: #10825 Signed-off-by: Kacper Michajłow --- libavformat/hls.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/hls.c b/libavformat/hls.c index 214a99c7ba..62473a15dd 100644

[FFmpeg-devel] [PATCH v2 3/3] avcodec/libzvbi-teletextdec: change new lines to \n in ASS header

2024-05-10 Thread Kacper Michajłow
Fixes remaining \r\n is ASS header after 57c545090d. Fixes AVERROR_BUG error during init as this decoder expected `\r\n` in default ASS header. strstr(..., "\r\n[Events]\r\n") failed after changes in 57c545090d. Fixes: 57c545090d Signed-off-by: Kacper Michajłow --- libavcodec/libzvbi-teletextde

[FFmpeg-devel] [PATCH v2 2/3] avcodec/libaribcaption: change new lines to \n in ASS header

2024-05-10 Thread Kacper Michajłow
Fixes remaining \r\n is ASS header after 57c545090d. Signed-off-by: Kacper Michajłow --- libavcodec/libaribcaption.c | 26 +- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/libavcodec/libaribcaption.c b/libavcodec/libaribcaption.c index 0b67d41772..46a2a5

[FFmpeg-devel] [PATCH v2 1/3] avcodec/libaribb24: change new lines to \n in ASS header

2024-05-10 Thread Kacper Michajłow
Fixes remaining \r\n is ASS header after 57c545090d. Signed-off-by: Kacper Michajłow --- libavcodec/libaribb24.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/libavcodec/libaribb24.c b/libavcodec/libaribb24.c index 009c995ded..0e4fa9935c 100644 --

[FFmpeg-devel] [PATCH 6/6] avcodec/codec_desc: Mark AVRN, TGQ, PhotoCD, VBN as intra-only

2024-05-10 Thread Andreas Rheinhardt
Also remove the then redundant assignments of AV_FRAME_FLAG_KEY, AV_PICTURE_TYPE_I. Signed-off-by: Andreas Rheinhardt --- Is SGA (AV_CIDEC_ID_SGA_VIDEO) intra only? The decoder always sets the key frame flag + picture type I, yet the demuxer does not automatically set the AV_PKT_FLAG_KEY. libav

[FFmpeg-devel] [PATCH 5/6] avcodec/yop: Add missing AV_CODEC_CAP_DR1

2024-05-10 Thread Andreas Rheinhardt
This decoder does not do anything fancy any more since c6303f8d70c25dd6c6e6486c78bf99c9924e2b6b (before that, it overwrote the frame's linesize) so that it supports direct rendering. This effectively reverts d3de3a16d1e428139c1541e55ea483466c1380e7. Signed-off-by: Andreas Rheinhardt --- libavcod

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/adts_header: Add ff_adts_header_parse_buf()

2024-05-10 Thread Andreas Rheinhardt
James Almer: > On 5/10/2024 1:56 PM, Andreas Rheinhardt wrote: >> Most users of ff_adts_header_parse() don't already have >> an opened GetBitContext for the header, so add a convenience >> function for them. >> Also use a forward declaration of GetBitContext in adts_header.h >> as this avoids (impl

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/adts_header: Add ff_adts_header_parse_buf()

2024-05-10 Thread James Almer
On 5/10/2024 1:56 PM, Andreas Rheinhardt wrote: Most users of ff_adts_header_parse() don't already have an opened GetBitContext for the header, so add a convenience function for them. Also use a forward declaration of GetBitContext in adts_header.h as this avoids (implicit) inclusion of get_bits.

[FFmpeg-devel] [PATCH 4/4] avcodec/aac_ac3_parser: Use ff_adts_header_parse_buf()

2024-05-10 Thread Andreas Rheinhardt
instead of avpriv_adts_header_parse(). Using the former avoids an indirection. Signed-off-by: Andreas Rheinhardt --- libavcodec/aac_ac3_parser.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libavcodec/aac_ac3_parser.c b/libavcodec/aac_ac3_parser.c index 9305b4c50f..

[FFmpeg-devel] [PATCH 3/4] avcodec/adts_header: Add ff_adts_header_parse_buf()

2024-05-10 Thread Andreas Rheinhardt
Most users of ff_adts_header_parse() don't already have an opened GetBitContext for the header, so add a convenience function for them. Also use a forward declaration of GetBitContext in adts_header.h as this avoids (implicit) inclusion of get_bits.h in some of the users that now no longer use a Ge

[FFmpeg-devel] [PATCH 2/4] avcodec/aac_ac3_parser: Untangle AAC and AC3 parsing error codes

2024-05-10 Thread Andreas Rheinhardt
Also remove the (unused) AAC_AC3_PARSE_ERROR_CHANNEL_CFG while at it; furthermore, fix the documentation of ff_ac3_parse_header() and (ff|avpriv)_adts_header_parse(). Signed-off-by: Andreas Rheinhardt --- libavcodec/aac_ac3_parser.h | 10 -- libavcodec/ac3_parser.c | 14 +++

[FFmpeg-devel] [PATCH 1/4] avcodec/adts_parser: Don't presume buffer to be padded

2024-05-10 Thread Andreas Rheinhardt
The documentation of av_adts_header_parse() does not require the buffer to be padded at all. Signed-off-by: Andreas Rheinhardt --- libavcodec/adts_parser.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libavcodec/adts_parser.c b/libavcodec/adts_parser.c index 6c22c86e

[FFmpeg-devel] [PATCH 2/3] lavu/riscv: add ff_rv_vlen_least()

2024-05-10 Thread Rémi Denis-Courmont
This inline function checks that the vector length is at least a given value. With this, most run-time VLEN checks can be optimised away. --- libavutil/riscv/cpu.h | 21 + 1 file changed, 21 insertions(+) diff --git a/libavutil/riscv/cpu.h b/libavutil/riscv/cpu.h index 56035f8

[FFmpeg-devel] [PATCH 3/3] lavc/riscv: use ff_rv_vlen_least()

2024-05-10 Thread Rémi Denis-Courmont
--- libavcodec/riscv/blockdsp_init.c | 2 +- libavcodec/riscv/g722dsp_init.c | 2 +- libavcodec/riscv/h264_chroma_init_riscv.c | 2 +- libavcodec/riscv/idctdsp_init.c | 2 +- libavcodec/riscv/me_cmp_init.c| 2 +- libavcodec/riscv/pixblockdsp_init.c |

[FFmpeg-devel] [PATCH 1/3] lavc/vp9dsp: fix indentation

2024-05-10 Thread Rémi Denis-Courmont
--- libavcodec/riscv/vp9dsp_init.c | 50 +- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/libavcodec/riscv/vp9dsp_init.c b/libavcodec/riscv/vp9dsp_init.c index 69ab39004c..6863c486c8 100644 --- a/libavcodec/riscv/vp9dsp_init.c +++ b/libavcodec/risc

Re: [FFmpeg-devel] [PATCH v2 1/9] lavc/vp9dsp: R-V ipred vert

2024-05-10 Thread Rémi Denis-Courmont
Le tiistaina 7. toukokuuta 2024, 10.36.05 EEST u...@foxmail.com a écrit : > From: sunyuechi > > C908: > vp9_vert_8x8_8bpp_c: 22.0 > vp9_vert_8x8_8bpp_rvi: 15.7 > vp9_vert_16x16_8bpp_c: 71.2 > vp9_vert_16x16_8bpp_rvi: 39.0 > vp9_vert_32x32_8bpp_c: 300.2 > vp9_vert_32x32_8bpp_rvi: 135.2 > --- > li

Re: [FFmpeg-devel] [PATCH] checkasm: Fix h264chroma test name

2024-05-10 Thread Rémi Denis-Courmont
Will merge soon. -- レミ・デニ-クールモン http://www.remlab.net/ ___ 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 "unsub

Re: [FFmpeg-devel] [PATCH v4 6/9] lavc/vp8dsp: R-V V put_epel hv

2024-05-10 Thread Rémi Denis-Courmont
Le tiistaina 7. toukokuuta 2024, 19.54.09 EEST u...@foxmail.com a écrit : > From: sunyuechi > > C908: > vp8_put_epel4_h4v4_c: 20.0 > vp8_put_epel4_h4v4_rvv_i32: 11.0 > vp8_put_epel4_h4v6_c: 25.2 > vp8_put_epel4_h4v6_rvv_i32: 13.5 > vp8_put_epel4_h6v4_c: 22.2 > vp8_put_epel4_h6v4_rvv_i32: 14.5 > v

Re: [FFmpeg-devel] [PATCH] lavc/vc1dsp: R-V V mspel_pixels

2024-05-10 Thread Rémi Denis-Courmont
Le perjantaina 10. toukokuuta 2024, 11.22.53 EEST flow gg a écrit : > Hi, I got BananaPi F3, made some fixes, updated in reply So... Does it benefit from halving the logical multiplier to process fixed-sized block as compared to C908, or can we stick to the same code regardless of vector sizes?

[FFmpeg-devel] [PATCH 3/3] avcodec/libx264: Check init_get_bits8() return code

2024-05-10 Thread Michael Niedermayer
Fixes: CID1594529 Unchecked return value Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/libx264.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c index 2715f277f1f..e4938c54a90 100644 --- a/li

[FFmpeg-devel] [PATCH 2/3] avcodec/jpeg2000dec: remove ST=3 case

2024-05-10 Thread Michael Niedermayer
Fixes: CID1460979 Logically dead code Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/jpeg2000dec.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c index 28bf6be2fef..135537b52fb 100644 --- a/libavcodec

[FFmpeg-devel] [PATCH 1/3] avcodec/ilbcdec: Remove dead code

2024-05-10 Thread Michael Niedermayer
Yes the same dead code is in "iLBC Speech Coder ANSI-C Source Code" Fixes: CID1509370 Logically dead code Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavcodec/ilbcdec.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/libavcodec/ilbcdec.c b/libavcodec/ilbc

Re: [FFmpeg-devel] [PATCH 3/3] lavc/speedhqdec: Set AV_PICTURE_TYPE_I

2024-05-10 Thread Andreas Rheinhardt
Tomas Härdin: > ons 2024-05-08 klockan 17:06 -0300 skrev James Almer: >> On 5/8/2024 5:01 PM, Marton Balint wrote: >>> >>> >>> On Wed, 8 May 2024, Tomas Härdin wrote: >>> >>> >>> What suprises me is that pict_type and the keyframe flag is not set >>> already for decoding codecs with AV_CO

Re: [FFmpeg-devel] [PATCH 3/3] lavc/speedhqdec: Set AV_PICTURE_TYPE_I

2024-05-10 Thread Tomas Härdin
ons 2024-05-08 klockan 17:06 -0300 skrev James Almer: > On 5/8/2024 5:01 PM, Marton Balint wrote: > > > > > > On Wed, 8 May 2024, Tomas Härdin wrote: > > > > > > > > > > > > What suprises me is that pict_type and the keyframe flag is not set > > already for decoding codecs with AV_CODEC_PROP_

[FFmpeg-devel] [PATCH] lavc/vaapi_decode: Reject decoding of frames with no slices

2024-05-10 Thread David Rosca
Matches other hwaccels. --- libavcodec/vaapi_decode.c | 5 + 1 file changed, 5 insertions(+) diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c index 8e9f647c20..3c4030c073 100644 --- a/libavcodec/vaapi_decode.c +++ b/libavcodec/vaapi_decode.c @@ -157,6 +157,11 @@ int ff_vaapi

[FFmpeg-devel] [RFC PATCH] avfilter/video: Protect frame_pool from multi-threads access

2024-05-10 Thread Zhao Zhili
From: Zhao Zhili Fix crash with ./ffplay -f lavfi -i movie=foo.mp4,drawtext=text=bar --- libavfilter/avfilter.c | 2 ++ libavfilter/avfilter_internal.h | 2 ++ libavfilter/video.c | 14 -- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libavfil

[FFmpeg-devel] [PATCH] avfilter/src_movie: Remove align dimension to fix crash

2024-05-10 Thread Zhao Zhili
From: Zhao Zhili The alignment is handled by ff_default_get_video_buffer2. We shouldn't use the aligned width/height as FFFramePool width/height. It cause recreate FFFramePool inside ff_default_get_video_buffer2. The recreate of FFFramePool together with multi-threads decoding leading to data rac

Re: [FFmpeg-devel] [PATCH] lavc/vc1dsp: R-V V mspel_pixels

2024-05-10 Thread flow gg
Hi, I got BananaPi F3, made some fixes, updated in reply Rémi Denis-Courmont 于2024年5月6日周一 03:26写道: > Le sunnuntaina 5. toukokuuta 2024, 12.18.56 EEST flow gg a écrit : > > > Does MF2 actually improve perfs over M1 here? > > > > The difference here seems very small, but when both mf2 and m1 are >

[FFmpeg-devel] [PATCH] lavc/vc1dsp: R-V V mspel_pixels

2024-05-10 Thread uk7b
From: sunyuechi C908 X60 vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_c: 14.7 13.2 vc1dsp.avg_vc1_mspel_pixels_tab[0][0]_rvv_i32 : 2.5 2.2 vc1dsp.avg_vc1_mspel_pixels_tab[1][0]_c: 3.7 3.5 vc1dsp.avg_vc1_mspel_pixel