[FFmpeg-devel] [PATCH] hwcontext_vulkan: add support for Vulkan encoding

2024-08-07 Thread Lynne via ffmpeg-devel
--- libavutil/hwcontext_vulkan.c | 10 ++ libavutil/vulkan_functions.h | 7 +++ libavutil/vulkan_loader.h| 3 +++ 3 files changed, 20 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index df7f42d995..9576e2393a 100644 --- a/libavutil/hwcont

[FFmpeg-devel] [PATCH 2/2] avcodec/cbs_vp9: Try to store fewer than 2 things in the same bit

2024-08-07 Thread Michael Niedermayer
Fixes: use of uninitialized value Fixes: 70907/clusterfuzz-testcase-minimized-ffmpeg_BSF_VP9_METADATA_fuzzer-6339363208757248 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/cbs_vp9.c

[FFmpeg-devel] [PATCH 1/2] avcodec/cfhdenc: Clear dwt_tmp

2024-08-07 Thread Michael Niedermayer
This occurs on a 32x32 input Fixes: use of uninitialized value Fixes: 70897/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CFHD_fuzzer-5960860961406976 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer ---

[FFmpeg-devel] [PATCH 13/13] vulkan: use allocator callback for buffer creation

2024-08-07 Thread Lynne via ffmpeg-devel
This would've let to a segfault if custom allocators were used. --- libavutil/vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index df7758cc1e..7b45e43a89 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@ -855,7 +855,7

[FFmpeg-devel] [PATCH 12/13] hwcontext_vulkan: add support for VK_EXT_shader_object

2024-08-07 Thread Lynne via ffmpeg-devel
We'd like to use it eventually, and its already covered by the minimum version of the headers we require. --- libavutil/hwcontext_vulkan.c | 14 -- libavutil/vulkan_functions.h | 7 ++- libavutil/vulkan_loader.h| 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --

[FFmpeg-devel] [PATCH 11/13] vulkan_shaderc: add debug information to shaders

2024-08-07 Thread Lynne via ffmpeg-devel
--- libavfilter/vulkan_shaderc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vulkan_shaderc.c b/libavfilter/vulkan_shaderc.c index 455e81767e..9e8a3d17ac 100644 --- a/libavfilter/vulkan_shaderc.c +++ b/libavfilter/vulkan_shaderc.c @@ -51,6 +51,7 @@ static int shdc_shader_compil

[FFmpeg-devel] [PATCH 09/13] vulkan_shaderc: fix error reporting for certain errors

2024-08-07 Thread Lynne via ffmpeg-devel
The issue is that shaderc_result_get_num_errors may sometime return 0 even when shaderc_result_get_compilation_status returns a non-zero error code. Since we use the result from the former, override the status if it returned 0. --- libavfilter/vulkan_shaderc.c | 3 +++ 1 file changed, 3 insertions

[FFmpeg-devel] [PATCH 10/13] hwcontext_vulkan: enable storageBuffer16BitAccess if available

2024-08-07 Thread Lynne via ffmpeg-devel
--- libavutil/hwcontext_vulkan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 07c2a970a8..1e46ee2cee 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -1399,6 +1399,8 @@ static int vulkan_devi

[FFmpeg-devel] [PATCH 08/13] hwcontext_vulkan: constify validation layer features table

2024-08-07 Thread Lynne via ffmpeg-devel
The struct data seem to get corrupted otherwise. Possibly a validation layer or libvulkan issue. --- libavutil/hwcontext_vulkan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index 443862be3b..07c2a970a8 100644 ---

[FFmpeg-devel] [PATCH 07/13] hwcontext_vulkan: rewrite upload/download

2024-08-07 Thread Lynne via ffmpeg-devel
This commit was long overdue. The old transfer dubiously tried to merge as much code as possible, and had very little in the way of optimizations, apart from basic host-mapping. The new code uses buffer pools for any temporary bufflers, and handles falling back to buffer-based uploads if host-mapp

[FFmpeg-devel] [PATCH 06/13] hwcontext_vulkan: remove unused struct

2024-08-07 Thread Lynne via ffmpeg-devel
--- libavutil/hwcontext_vulkan.c | 13 - 1 file changed, 13 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c index c81fc95af2..e2ef599a0d 100644 --- a/libavutil/hwcontext_vulkan.c +++ b/libavutil/hwcontext_vulkan.c @@ -67,19 +67,6 @@ #define CHECK

[FFmpeg-devel] [PATCH 05/13] vulkan_video: remove NIH pooled buffer implementation

2024-08-07 Thread Lynne via ffmpeg-devel
The code predates ff_vk_get_pooled_buffer(). --- libavcodec/vulkan_decode.c | 41 --- libavcodec/vulkan_decode.h | 2 + libavcodec/vulkan_video.c | 82 -- libavcodec/vulkan_video.h | 15 --- 4 files changed, 28 insertions(+), 112 deletions

[FFmpeg-devel] [PATCH 04/13] hwcontext_vulkan: initialize optical flow queues if available

2024-08-07 Thread Lynne via ffmpeg-devel
Lets us implement FPS conversion. --- libavutil/hwcontext_vulkan.c | 18 +++--- libavutil/vulkan.c | 6 +- libavutil/vulkan.h | 1 + libavutil/vulkan_functions.h | 8 libavutil/vulkan_loader.h| 1 + 5 files changed, 30 insertions(+), 4 deletions

[FFmpeg-devel] [PATCH 03/13] hwcontext_vulkan: rewrite queue picking system for the new API

2024-08-07 Thread Lynne via ffmpeg-devel
This allows us to support different video ops on different queues, as well as any other arbitrary queues we need. --- libavutil/hwcontext_vulkan.c | 262 ++- 1 file changed, 167 insertions(+), 95 deletions(-) diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hw

[FFmpeg-devel] [PATCH 02/13] vulkan: use the new queue family mechanism

2024-08-07 Thread Lynne via ffmpeg-devel
--- libavutil/vulkan.c | 68 ++ libavutil/vulkan.h | 2 +- 2 files changed, 21 insertions(+), 49 deletions(-) diff --git a/libavutil/vulkan.c b/libavutil/vulkan.c index 11c17ee6f3..cec8354ba6 100644 --- a/libavutil/vulkan.c +++ b/libavutil/vulkan.c @@

[FFmpeg-devel] [PATCH 01/13] hwcontext_vulkan: add a new mechanism to expose used queue families

2024-08-07 Thread Lynne via ffmpeg-devel
The issue with the old mechanism is that we had to introduce new API each time we needed a new queue family, and all the queue families were functionally fixed to a given purpose. Nvidia's GPUs are able to handle video encoding and compute on the same queue, which results in a speedup when pre-pro

Re: [FFmpeg-devel] [PATCH v2] add tools/target_swr_fuzzer

2024-08-07 Thread Michael Niedermayer
On Wed, Aug 07, 2024 at 04:02:23PM -0300, James Almer wrote: > On 8/7/2024 2:13 PM, Michael Niedermayer wrote: > > On Wed, Aug 07, 2024 at 01:05:40PM -0300, James Almer wrote: > > > > > > > > > On 8/7/2024 12:51 PM, Michael Niedermayer wrote: > > > > Signed-off-by: Michael Niedermayer > > > > --

Re: [FFmpeg-devel] [PATCH] avformat/mpegts: correctly skip TP_extra_header in m2ts

2024-08-07 Thread llyyr
On 6/7/24 1:29 PM, Hendrik Leppkes wrote: On Fri, Jun 7, 2024 at 9:47 AM Hendrik Leppkes wrote: On Mon, May 27, 2024 at 3:47 PM llyyr wrote: instead of just resyncing and skipping a bunch of TS packets, leading to a loss of frames. Before this, a stray byte with the value of 0x47 in TP_ext

Re: [FFmpeg-devel] [PATCH] avcodec/mediacodecdec: call MediaCodec.stop on close

2024-08-07 Thread Matthieu Bouron
On Wed, Aug 7, 2024 at 6:28 PM sfan5 wrote: > > Hi all, > > attached is a small fix for the MediaCodec code. Tested on Android 14. > LGTM, will apply in a few days. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinf

Re: [FFmpeg-devel] [PATCH v2] add tools/target_swr_fuzzer

2024-08-07 Thread James Almer
On 8/7/2024 2:13 PM, Michael Niedermayer wrote: On Wed, Aug 07, 2024 at 01:05:40PM -0300, James Almer wrote: On 8/7/2024 12:51 PM, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer --- Makefile | 2 + tools/Makefile| 3 + tools/target_swr_f

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

2024-08-07 Thread François-Simon Fauteux-Chapleau
- On Aug 6, 2024, at 11:00 PM, Quack Doc quackdoct...@gmail.com wrote: > For a POC I commented out the fd stuff so it wouldn't fail on me and > replaced pw_context_connect_fd() with pw_context_connect() and it > seemed to work fine with gamescope, gamescope only produces RGB frames > and not YU

Re: [FFmpeg-devel] [PATCH 2/4] lavc/vp9dsp: R-V V mc bilin hv

2024-08-07 Thread Rémi Denis-Courmont
Le lauantaina 3. elokuuta 2024, 12.50.38 EEST u...@foxmail.com a écrit : > From: sunyuechi > > C908 X60 > vp9_avg_bilin_4hv_8bpp_c : 10.79.5 > vp9_avg_bilin_4hv_8bpp_rvv_i32 :4.03.5

Re: [FFmpeg-devel] [PATCH v2] add tools/target_swr_fuzzer

2024-08-07 Thread Michael Niedermayer
On Wed, Aug 07, 2024 at 01:05:40PM -0300, James Almer wrote: > > > On 8/7/2024 12:51 PM, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > Makefile | 2 + > > tools/Makefile| 3 + > > tools/target_swr_fuzzer.c | 150 +++

[FFmpeg-devel] 回复: [PATCH v1] libavdevice/gdigrab: change hwnd tail check fail logic to !=null

2024-08-07 Thread Cai Eaphone
this message seems not attach to the mail successfully, manually loop it: what the patch does: fix gdigrab capture a window with hwnd shows "Invalid window handle x, must be a vlid integer", althought a valid integer is input why: line 284 of libavdevice/gdigrab.c,

[FFmpeg-devel] [PATCH] avcodec/mediacodecdec: call MediaCodec.stop on close

2024-08-07 Thread sfan5
Hi all, attached is a small fix for the MediaCodec code. Tested on Android 14. From 3f5d05920dc6826b4c0ea0ed7969e9259e08084e Mon Sep 17 00:00:00 2001 From: sfan5 Date: Wed, 7 Aug 2024 17:48:06 +0200 Subject: [PATCH] avcodec/mediacodecdec: call MediaCodec.stop on close This can free up vital re

Re: [FFmpeg-devel] [PATCH] avcodec/h264_mp4toannexb: Prepend SPS/PPS to buffering period SEI

2024-08-07 Thread Josh Allmann
On Thu, 1 Aug 2024 at 14:37, Josh Allmann wrote: > > Encoders may emit a buffering period SEI without a corresponding > SPS/PPS if the SPS/PPS is carried out-of-band, eg with avcc. > > During Annex B conversion, this may result in the SPS/PPS being > inserted *after* the buffering period SEI but b

Re: [FFmpeg-devel] [PATCH v2] add tools/target_swr_fuzzer

2024-08-07 Thread James Almer
On 8/7/2024 12:51 PM, Michael Niedermayer wrote: Signed-off-by: Michael Niedermayer --- Makefile | 2 + tools/Makefile| 3 + tools/target_swr_fuzzer.c | 150 ++ 3 files changed, 155 insertions(+) create mode 100644 to

[FFmpeg-devel] [PATCH v1] libavdevice/gdigrab: change hwnd tail check fail logic to !=null

2024-08-07 Thread cyfdel-at-hotmail.com
From: eaphone --- libavdevice/gdigrab.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavdevice/gdigrab.c b/libavdevice/gdigrab.c index c91661c556..08a41c304b 100644 --- a/libavdevice/gdigrab.c +++ b/libavdevice/gdigrab.c @@ -281,7 +281,7 @@ gdigrab_read_header(AVFormatCo

[FFmpeg-devel] (no subject)

2024-08-07 Thread cyfdel-at-hotmail.com
hat the patch does: fix gdigrab capture a window with hwnd shows "Invalid window handle x, must be a vlid integer", althought a valid integer is input why: line 284 of libavdevice/gdigrab.c, one of the condition leads to check failed is p[0]='\0'. if a int

[FFmpeg-devel] [PATCH v2] add tools/target_swr_fuzzer

2024-08-07 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer --- Makefile | 2 + tools/Makefile| 3 + tools/target_swr_fuzzer.c | 150 ++ 3 files changed, 155 insertions(+) create mode 100644 tools/target_swr_fuzzer.c diff --git a/Makefile b/Makefile i

Re: [FFmpeg-devel] [PATCH] add tools/target_swr_fuzzer

2024-08-07 Thread Michael Niedermayer
On Wed, Jun 26, 2024 at 10:35:32AM -0300, James Almer wrote: > On 6/26/2024 8:40 AM, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > Makefile | 2 + > > tools/Makefile| 3 + > > tools/target_swr_fuzzer.c | 161 +

[FFmpeg-devel] [PATCH] avformat/mov: ensure required number of bytes is read

2024-08-07 Thread Kacper Michajłow
Fixes: use-of-uninitialized-value Found by OSS-Fuzz. --- libavformat/mov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 1052691936..f2d8aee766 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -7096,7 +7096,7 @@ static int

[FFmpeg-devel] [PATCH] avformat/vpk: fix divide by zero

2024-08-07 Thread Kacper Michajłow
Can happen after calling avformat_find_stream_info() when the codec fails to open, but return value is 0 and subsequent uses of this context have zero value in channel number. Found by OSS-Fuzz. Signed-off-by: Kacper Michajłow --- libavformat/vpk.c | 2 ++ 1 file changed, 2 insertions(+) diff

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Rework on DTS generation

2024-08-07 Thread Zhao Zhili
> On Aug 7, 2024, at 18:18, Andreas Rheinhardt > wrote: > > Zhao Zhili: >> From: Zhao Zhili >> >> Before the patch, the method to generate DTS only works with >> timebase equal to 1/fps. With timebase like 1/1000 >> >> ./ffmpeg -i foo.mp4 -an -c:v h264_nvenc -enc_time_base 1/1000 bar.mp4 >>

Re: [FFmpeg-devel] [PATCH] avcodec/nvenc: Rework on DTS generation

2024-08-07 Thread Andreas Rheinhardt
Zhao Zhili: > From: Zhao Zhili > > Before the patch, the method to generate DTS only works with > timebase equal to 1/fps. With timebase like 1/1000 > > ./ffmpeg -i foo.mp4 -an -c:v h264_nvenc -enc_time_base 1/1000 bar.mp4 > > pts 0dts -3 > pts 160 dts 37 > pts 80 dts 77 > pts 40 dts 1

[FFmpeg-devel] Extend the PATH buffer to 2048 for RTSP

2024-08-07 Thread Stefano Mandelli
Recently, I have been experiencing an increasing number of user that use ffmpeg to retrive RTSP stream from personal mediaproxies (e.g. MediaMtx) with authorization based on JWT. The current length of PATH does not permit to insert the token in the URL failing the authorization with no possibilitie