Re: [FFmpeg-devel] [PATCH 1/2] hwcontext_vulkan: add a new mechanism to expose used queue families

2024-07-10 Thread Anton Khirnov
Quoting Lynne via ffmpeg-devel (2024-07-10 01:56:57) > On 09/07/2024 08:57, Anton Khirnov wrote: > > Quoting Lynne via ffmpeg-devel (2024-07-09 03:07:12) > >> @@ -151,6 +162,17 @@ typedef struct AVVulkanDeviceContext { > >>* Similar to lock_queue(), unlocks a queue. Must only be called > >

Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-10 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-07-10 00:00:32) > On Tue, Jul 09, 2024 at 05:14:37PM +0200, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2024-07-09 15:28:10) > > > On Tue, Jul 09, 2024 at 03:17:58PM +0200, Anton Khirnov wrote: > > > > > ensure width and height fit in 32bit > > > > > > >

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: set keep_aspect to true for the crop filter

2024-07-10 Thread Anton Khirnov
Quoting James Almer (2024-07-09 21:06:26) > The input sample aspect ratio applies to the pre-cropping dimensions, so > update it. I don't understand this reasoning, why should cropping a video change pixel aspect ratio? -- Anton Khirnov ___ ffmpeg-dev

Re: [FFmpeg-devel] [PATCH 2/2] avcodec: add Mediacodec audio decoders support

2024-07-10 Thread Matthieu Bouron
Le mer. 12 juin 2024, 3:47 PM, Matthieu Bouron a écrit : > --- > configure | 14 ++ > libavcodec/Makefile | 7 + > libavcodec/allcodecs.c| 7 + > libavcodec/mediacodecdec.c| 215 ++- > libavcodec/mediacodecdec_common.

Re: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_scale: fix frame lifetimes

2024-07-10 Thread Anton Khirnov
Patchset looks ok. -- 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".

Re: [FFmpeg-devel] [PATCH 2/2] avutil/executor: Fix stack overflow due to recursive call

2024-07-10 Thread Anton Khirnov
Quoting Nuo Mi (2024-07-09 13:36:09) > On Tue, Jul 9, 2024 at 6:35 AM Timo Rothenpieler > wrote: > > > On 08.07.2024 17:32, Zhao Zhili wrote: > > > > > > > > >> On Jul 8, 2024, at 22:07, Timo Rothenpieler > > wrote: > > >> > > >> On 08.07.2024 09:43, Zhao Zhili wrote: > > >>> From: Zhao Zhili >

Re: [FFmpeg-devel] [PATCH] avcodec/avformat: Store SDP attributes from RTSP stream into AVStream side data.

2024-07-10 Thread Bernardo Pilarz via ffmpeg-devel
Hi, I've tried to push this patch several times, but it looks like my email client is messing up the diff, and patchwork isn't able to apply it. On 09/07/2024 12:02, Bernardo Pilarz via ffmpeg-devel wrote: Connecting to an RTSP stream will now cause the SDP attributes of each media stream to b

[FFmpeg-devel] [PATCH] lavc/vvc_mc: R-V V avg w_avg

2024-07-10 Thread uk7b
From: sunyuechi C908 X60 avg_8_2x2_c:1.21.2 avg_8_2x2_rvv_i32 :0.70.7 avg_8_2x4_c:2.02.0 avg_8_2x4_rvv_i

Re: [FFmpeg-devel] [PATCH v5] lavc/vvc_mc: R-V V avg w_avg

2024-07-10 Thread flow gg
Sorry, the previous logic was indeed a bit confusing. I rewrote it, renaming the third parameter to max_lmul. If e16 is involved in the function, then vsetvlstatic8 uses max_lmul == m4. If e32 is involved in the function, then vsetvlstatic8 uses max_lmul == m2. If e16 is involved in the functio

Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: set keep_aspect to true for the crop filter

2024-07-10 Thread James Almer
On 7/10/2024 5:29 AM, Anton Khirnov wrote: Quoting James Almer (2024-07-09 21:06:26) The input sample aspect ratio applies to the pre-cropping dimensions, so update it. I don't understand this reasoning, why should cropping a video change pixel aspect ratio? You're right, this patch is not

Re: [FFmpeg-devel] [PATCH 1/2] avfilter/vf_scale: fix frame lifetimes

2024-07-10 Thread Michael Niedermayer
On Tue, Jul 09, 2024 at 11:34:36AM +0200, Niklas Haas wrote: > From: Niklas Haas > > scale_frame() inconsistently handled the lifetime of `in`. Fixes a > possible double free and a possible memory leak. > > The new code always has `scale_frame` take over ownership of the input > frame. I first t

Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-10 Thread Michael Niedermayer
On Wed, Jul 10, 2024 at 10:23:57AM +0200, Anton Khirnov wrote: > Quoting Michael Niedermayer (2024-07-10 00:00:32) > > On Tue, Jul 09, 2024 at 05:14:37PM +0200, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2024-07-09 15:28:10) > > > > On Tue, Jul 09, 2024 at 03:17:58PM +0200, Anton Khirn

Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-10 Thread Anton Khirnov
Quoting Michael Niedermayer (2024-07-10 15:44:47) > Do you still object to a 32bit check on width and height ? > If not i intend to apply a patch adding such limits > If you object i will take this to the TC In my first reply in this thread I asked for a very simple thing - justify this commit, as

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-10 Thread Zhao Zhili
> On Jun 12, 2024, at 21:42, Matthieu Bouron wrote: > > Hello, > > This patchset adds Mediacodec audio decoders support. Currently, only AAC, > AMR, > MP3, FLAC, VORBIS and OPUS are supported. > > This is mainly useful to avoid shipping Android builds of FFmpeg that are > subjects to licensin

Re: [FFmpeg-devel] [PATCH] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-10 Thread Paul B Mahol
On Wed, Jul 10, 2024 at 12:00 AM Michael Niedermayer wrote: > On Tue, Jul 09, 2024 at 05:14:37PM +0200, Anton Khirnov wrote: > > Quoting Michael Niedermayer (2024-07-09 15:28:10) > > > On Tue, Jul 09, 2024 at 03:17:58PM +0200, Anton Khirnov wrote: > > > > > ensure width and height fit in 32bit >

Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Mention that AV_OPT_TYPE_IMAGE_SIZE can be unsigned

2024-07-10 Thread Paul B Mahol
tile and untile are wrong ___ 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".

Re: [FFmpeg-devel] [PATCH v19] avformat: add farbfeld muxer and demuxer

2024-07-10 Thread Paul B Mahol
demuxer is wrong on multiple levels, it should operate as pipe/stream only ___ 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 w

[FFmpeg-devel] [PATCH 1/2] avcodec/packet: mention an example source for frame cropping information

2024-07-10 Thread James Almer
Signed-off-by: James Almer --- libavcodec/packet.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/packet.h b/libavcodec/packet.h index 13667ffa36..fa73edaf85 100644 --- a/libavcodec/packet.h +++ b/libavcodec/packet.h @@ -328,7 +328,8 @@ enum AVPacketSideDataType

[FFmpeg-devel] [PATCH 2/2] doc/demuxers: mention support for Image File Format

2024-07-10 Thread James Almer
Signed-off-by: James Almer --- doc/demuxers.texi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 04293c4813..986c427b1f 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -853,9 +853,9 @@ Range is from 1000 to INT_MAX. The

Re: [FFmpeg-devel] [PATCH v2] lavu/opt: Mention that AV_OPT_TYPE_IMAGE_SIZE can be unsigned

2024-07-10 Thread Andrew Sayers
On Wed, Jul 10, 2024 at 04:01:44PM +0200, Paul B Mahol wrote: > tile and untile are wrong How so? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-de

[FFmpeg-devel] [PATCH] avfilter/vf_scale: validate values before converting to integer

2024-07-10 Thread Kacper Michajłow
Fixes the conversion of double values to integer, which may be out of the representable range. Also, bail out on overflow check instead of printing an error only. Found by OSS-Fuzz. Signed-off-by: Kacper Michajłow --- libavfilter/vf_scale.c | 33 +++-- 1 file change

Re: [FFmpeg-devel] [PATCH v2] avfilter/vf_scale: Cleanup some checks

2024-07-10 Thread Kacper Michajlow
On Tue, 9 Jul 2024 at 23:43, Michael Niedermayer wrote: > > On Tue, Jul 09, 2024 at 04:46:59PM +0200, Kacper Michajlow wrote: > > On Tue, 9 Jul 2024 at 15:17, Anton Khirnov wrote: > > > > > > Quoting Michael Niedermayer (2024-07-09 13:37:11) > > > > Fixes: CID1513722 Operands don't affect result

[FFmpeg-devel] [PATCH] avcodec/wmavoice: use av_clipd for double values

2024-07-10 Thread Kacper Michajłow
Fixes Clang warning. Signed-off-by: Kacper Michajłow --- libavcodec/wmavoice.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c index 258c71330c..3db73773b7 100644 --- a/libavcodec/wmavoice.c +++ b/libavcodec/wmavoice.c @@ -655,7 +

[FFmpeg-devel] [PATCH v2] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-10 Thread Michael Niedermayer
width and height > 32bit is not supported and its easier to check in a central place Signed-off-by: Michael Niedermayer --- libavutil/imgutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/imgutils.c b/libavutil/imgutils.c index d2463815637..b738cff37c2 100644

Re: [FFmpeg-devel] [PATCH v2] avutil/imgutils: av_image_check_size2() ensure width and height fit in 32bit

2024-07-10 Thread James Almer
On 7/10/2024 12:49 PM, Michael Niedermayer wrote: width and height > 32bit is not supported and its easier to check in a central place Signed-off-by: Michael Niedermayer --- libavutil/imgutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/imgutils.c b/libav

Re: [FFmpeg-devel] [PATCH] avformat/mov: ensure pasp box derived SAR is used if present

2024-07-10 Thread Leo Izen
On 7/9/24 1:21 PM, James Almer wrote: It's meant to override any codec specific (but container level) information, but its position is not guaranteed, so apply the values after the entire trak structure has been parsed. Also, replace the ugly roundabout int -> double -> int method to set SAR from

Re: [FFmpeg-devel] [PATCHv4] swscale: prevent undefined behaviour in the PUTRGBA macro

2024-07-10 Thread Michael Niedermayer
On Tue, Jul 09, 2024 at 05:41:32PM -0400, Sean McGovern wrote: > For even small values of 'asrc[x]', shifting them by 24 bits or more > will cause arithmetic overflow and be caught by > GCC's undefined behaviour sanitizer. > > Ensure the values do not overflow by up-casting the bracketed > express

Re: [FFmpeg-devel] [PATCH] avformat/mov: ensure pasp box derived SAR is used if present

2024-07-10 Thread James Almer
On 7/10/2024 1:02 PM, Leo Izen wrote: On 7/9/24 1:21 PM, James Almer wrote: It's meant to override any codec specific (but container level) information, but its position is not guaranteed, so apply the values after the entire trak structure has been parsed. Also, replace the ugly roundabout in

Re: [FFmpeg-devel] [PATCH] lavfi/perlin: Fix out of bounds stack buffer write

2024-07-10 Thread Michael Niedermayer
On Tue, Jul 09, 2024 at 02:41:16PM +0200, epira...@gmail.com wrote: > > > On 6 Jul 2024, at 11:26, Stefano Sabatini wrote: > > > On date Tuesday 2024-07-02 20:38:00 +0200, Marvin Scholz wrote: > >> An incorrect calculation in ff_perlin_init causes a write to the > >> stack array at index 256, wh

Re: [FFmpeg-devel] Add Mediacodec audio decoders support

2024-07-10 Thread Matthieu Bouron
On Wed, Jul 10, 2024 at 4:04 PM Zhao Zhili wrote: > > > > On Jun 12, 2024, at 21:42, Matthieu Bouron > > wrote: > > > > Hello, > > > > This patchset adds Mediacodec audio decoders support. Currently, only AAC, > > AMR, > > MP3, FLAC, VORBIS and OPUS are supported. > > > > This is mainly useful

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Fix version check

2024-07-10 Thread James Almer
On 7/9/2024 5:43 AM, epira...@gmail.com wrote: On 8 Jul 2024, at 8:30, Zhao Zhili wrote: From: Zhao Zhili --- libavutil/hwcontext_videotoolbox.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_videotoolbox.c b/libavutil/hwcontext_videotoolbox.c in

[FFmpeg-devel] [PATCH] fftools/ffmpeg_filter: use a bprint buffer for the crop filter arguments

2024-07-10 Thread James Almer
Should ensure no truncation ocurrs. The input sample aspect ratio applies to the pre-cropping dimensions, so update it. Signed-off-by: James Almer --- fftools/ffmpeg_filter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filt

Re: [FFmpeg-devel] [PATCH] avutil/hwcontext_videotoolbox: Fix version check

2024-07-10 Thread epirat07
On 10 Jul 2024, at 19:26, James Almer wrote: > On 7/9/2024 5:43 AM, epira...@gmail.com wrote: >> >> >> On 8 Jul 2024, at 8:30, Zhao Zhili wrote: >> >>> From: Zhao Zhili >>> >>> --- >>> libavutil/hwcontext_videotoolbox.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff

Re: [FFmpeg-devel] [PATCH 1/4] avformat/rmdec: use 64bit for audio_framesize checks

2024-07-10 Thread Michael Niedermayer
On Sat, Jun 08, 2024 at 01:18:00AM +0200, Michael Niedermayer wrote: > It is not entirely clear what would prevent such overflow so even if it is > not possible, it is better to use 64bit > > Fixes: CID1491898 Unintentional integer overflow > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: M

Re: [FFmpeg-devel] [PATCH 7/7] avcodec/proresenc_kostya: use unsigned alpha for rotation

2024-07-10 Thread Michael Niedermayer
On Tue, Jun 18, 2024 at 03:48:26PM +0200, Michael Niedermayer wrote: > Fixes: left shift of negative value -208 > Fixes: > 69073/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PRORES_KS_fuzzer-4745020002336768 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/

Re: [FFmpeg-devel] [PATCH 06/11] doc/examples/mux: remove nop

2024-07-10 Thread Michael Niedermayer
On Mon, Jul 01, 2024 at 01:12:45AM +0200, Michael Niedermayer wrote: > Found through code review related to CID1604493 Overflowed constant > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > doc/examples/mux.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(

[FFmpeg-devel] [PATCH 1/2] lavc/h264dsp: avoid \+ expansion

2024-07-10 Thread Rémi Denis-Courmont
This seems to be unsupported by LLVM-as. --- libavcodec/riscv/h264idct_rvv.S | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/riscv/h264idct_rvv.S b/libavcodec/riscv/h264idct_rvv.S index 741e7a5532..6f17df66cc 100644 --- a/libavcodec/riscv/h264idct_rvv.S +++ b

[FFmpeg-devel] [PATCH 2/2] lavc/h264dsp: R-V V high-depth h264_idct_add

2024-07-10 Thread Rémi Denis-Courmont
T-Head C908 (cycles): h264_idct4_add_9bpp_c:248.2 h264_idct4_add_9bpp_rvv_i32: 128.7 h264_idct4_add_10bpp_c: 256.7 h264_idct4_add_10bpp_rvv_i32: 128.7 h264_idct4_add_12bpp_c: 252.5 h264_idct4_add_12bpp_rvv_i32: 129.7 h264_idct4_add_14bpp_c: 258.0 h264_idct4_add_14bpp_rvv_

[FFmpeg-devel] [PATCH 1/6] avfilter/vf_tiltandshift: Free dst on error

2024-07-10 Thread Michael Niedermayer
Fixes: CID1559901 Resource leak Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tiltandshift.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_tiltandshift.c b/libavfilter/vf_tiltandshift.c index b49a713339d..08bcb0624

[FFmpeg-devel] [PATCH 2/6] avfilter/vf_tonemap_opencl: Dereference after NULL check

2024-07-10 Thread Michael Niedermayer
Fixes: CID1437472 Dereference before null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tonemap_opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_tonemap_opencl.c b/libavfilter/vf_tonemap_opencl.c index

[FFmpeg-devel] [PATCH 3/6] avfilter/vf_tpad: Dont clone NULL

2024-07-10 Thread Michael Niedermayer
untested Fixes: CID1440836 Dereference after null check Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_tpad.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c index 72d0bf338fe..a230a50022c 100644 --- a/li

[FFmpeg-devel] [PATCH 4/6] avfilter/vf_unsharp_opencl: Use AV_VIDEO_MAX_PLANES

2024-07-10 Thread Michael Niedermayer
Related: CID1423281 Out-of-bounds read Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_unsharp_opencl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_unsharp_opencl.c b/libavfilter/vf_unsharp_opencl.c index 09398464ca3.

[FFmpeg-devel] [PATCH 5/6] avfilter/vf_v360: Assert that vf was initialized

2024-07-10 Thread Michael Niedermayer
Maybe helps: CID1504571 Uninitialized scalar variable Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_v360.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/vf_v360.c b/libavfilter/vf_v360.c index 299dbe9ff54..9a6c31228d3 100644 --- a/lib

[FFmpeg-devel] [PATCH 6/6] avfilter/vf_xfade: Compute w2, h2 with float

2024-07-10 Thread Michael Niedermayer
Fixes: CID1458148 Result is not floating-point Fixes: CID1458149 Result is not floating-point Fixes: CID1458150 Result is not floating-point Fixes: CID1458151 Result is not floating-point Fixes: CID1458152 Result is not floating-point Fixes: CID1458154 Result is not floating-point Fixes: CID1458155