[FFmpeg-devel] [PATCH] avfilter/vf_extractplanes: use refcounting for planar formats

2025-08-08 Thread Jorge Estrada
As recommended by Nicholas George. Uses refcounting for planar formats similar to this change for alphamerge https://patchwork.ffmpeg.org/project/ffmpeg/patch/20250807195800.77462-1-jestrada.l...@gmail.com/ --- libavfilter/vf_extractplanes.c | 41 +- 1 file changed

Re: [FFmpeg-devel] [PATCH] avfilter/vf_alphamerge: use refcounting for planar formats

2025-08-07 Thread Jorge Estrada
Addressed and attached the updated patch. I sent my previous email incorrectly. My bad. On Thu, Aug 7, 2025 at 1:13 PM James Almer wrote: > On 8/7/2025 4:58 PM, Jorge Estrada wrote: > > Use reference plane when handling planar formats. Should address > > https://code.ffmpeg.or

[FFmpeg-devel] use av_buffer_replace

2025-08-07 Thread Jorge Estrada
Addressed. Uses av_buffer_replace now --- libavfilter/vf_alphamerge.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_alphamerge.c b/libavfilter/vf_alphamerge.c index f5779484a9..69c0dd04ea 100644 --- a/libavfilter/vf_alphamerge.c +++ b

[FFmpeg-devel] [PATCH] avfilter/vf_alphamerge: use refcounting for planar formats

2025-08-07 Thread Jorge Estrada
Use reference plane when handling planar formats. Should address https://code.ffmpeg.org/FFmpeg/FFmpeg/issues/20153 Example: ffmpeg -f lavfi -i "color=red:s=640x480:d=5,format=yuva420p" \ -f lavfi -i "color=black:s=640x480:d=5,format=yuv420p,geq=lum='255*gt(150,hypot(X-W/2,Y-H/2))':a=0" \

Re: [FFmpeg-devel] [PATCH] avfilter: add alphamerge_cuda filter

2025-08-07 Thread Jorge Estrada
formats in alphamerge or keep anything CUDA related separated into alphamerge_cuda which would basically be doing the same thing? On Thu, Aug 7, 2025 at 3:15 AM Nicolas George wrote: > Jorge Estrada (HE12025-08-06): > > This patch adds the alphamerge_cuda video filter > > Thank

[FFmpeg-devel] [PATCH] avfilter: add alphamerge_cuda filter

2025-08-06 Thread Jorge Estrada
This patch adds the alphamerge_cuda video filter Example usage: ffmpeg -f lavfi -i "color=c=red:s=1280x720:d=5,format=yuva420p" \ -f lavfi -i "color=c=black:s=1280x720:d=5,geq=lum='255*gt(W/4,hypot(X-W/2,Y-H/2))'" \ -f lavfi -i "color=c=blue:s=1280x720:d=5" \ -filter_complex \ "[0:v]hwupload_cuda

Re: [FFmpeg-devel] [PATCH] libavfilter/vf_scale_npp: fix yuva420p -> yuv420p conversion

2025-07-28 Thread Jorge Estrada
ping On Sat, Jul 19, 2025 at 3:32 PM Jorge Estrada wrote: > When converting from yuva420p to yuv420p the resize loop would try to > access an output plane that did not exist. > Added a check for the output planes existence. > > Example cmd: ffmpeg -hwaccel cuda -hwaccel_output

[FFmpeg-devel] [PATCH] libavfilter/vf_scale_npp: fix yuva420p -> yuv420p conversion

2025-07-19 Thread Jorge Estrada
-c:v h264_nvenc -f null - Signed-off-by: Jorge Estrada --- libavfilter/vf_scale_npp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_scale_npp.c b/libavfilter/vf_scale_npp.c index 1b1b7b9fc9..5387bf9c7a 100644 --- a/libavfilter/vf_scale_npp.c +++ b/libavfilter

[FFmpeg-devel] [PATCH] avfilter/overlay_cuda: add timeline editing support

2025-07-07 Thread Jorge Estrada
e_npp=format=yuv420p[video],[video][image]overlay_cuda=enable='between(t,30,60)'" -c:v h264_nvenc -c:a copy -y overlay-output-gpu.mp4 Signed-off-by: Jorge Estrada --- libavfilter/vf_overlay_cuda.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavfilter/vf_overlay_

Re: [FFmpeg-devel] [PATCH] avfilter: add pad_cuda filter

2025-07-03 Thread Jorge Estrada
Changes look good to me. I appreciate the fixes. Thanks! On Thu, Jul 3, 2025 at 3:49 PM Timo Rothenpieler wrote: > On 03.07.2025 23:05, Jorge Estrada wrote: > > ping > > Completely forgot about this, sorry. > > Patch does not compile, cause vector_types.h does not exist.

Re: [FFmpeg-devel] [PATCH] avfilter: add pad_cuda filter

2025-07-03 Thread Jorge Estrada
ping On Thu, Jun 19, 2025 at 7:43 PM Jorge Estrada wrote: > Thanks for the feedback. Addressed your points and attached an updated > patch > > - Simplified the documentation to just point to the pad filter for usage > but kept the examples > - Made the adjustments to vf_pad_

Re: [FFmpeg-devel] [PATCH] avfilter: add pad_cuda filter

2025-06-19 Thread Jorge Estrada
Thanks for the feedback. Addressed your points and attached an updated patch - Simplified the documentation to just point to the pad filter for usage but kept the examples - Made the adjustments to vf_pad_cuda.c - Updated vf_pad_cuda.cu. Should be easier to add 10-12 bit support down the line now.

[FFmpeg-devel] [PATCH] avfilter: add pad_cuda filter

2025-06-16 Thread Jorge Estrada
From: Jorge Estrada <--global> This patch adds the pad_cuda video filter. A filter similar to the existing pad filter but accelerated by CUDA. The filter shares the same options as the software pad filter. Example usage: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.m

Re: [FFmpeg-devel] [PATCH] avfilter: add pad_npp filter

2025-06-16 Thread Jorge Estrada
Sounds reasonable. I'll look into rewriting this and will re-submit a CUDA variant. On Mon, Jun 16, 2025 at 4:08 AM Timo Rothenpieler wrote: > On 16/06/2025 03:38, Jorge Estrada wrote: > > Got it. I don't mind writing a CUDA variant of this and submitting it > > separat

Re: [FFmpeg-devel] [PATCH] avfilter: add pad_npp filter

2025-06-15 Thread Jorge Estrada
Got it. I don't mind writing a CUDA variant of this and submitting it separately. What's the reasoning behind preferring a plain CUDA filter over an NPP based one? On Sun, Jun 15, 2025 at 5:37 PM Timo Rothenpieler wrote: > On 16.06.2025 02:14, Jorge Estrada wrote: > >

[FFmpeg-devel] [PATCH] avfilter: add pad_npp filter

2025-06-15 Thread Jorge Estrada
This patch adds the pad_npp video filter. A filter similar to the existing pad filter but accelerated by NPP. The filter shares the same options as the software pad filter. Example usage: ffmpeg -hwaccel cuda -hwaccel_output_format cuda -i input.mp4 -vf "pad_npp=w=iw+100:h=ih+100:x=-1:y=-1:colo