This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit a8c7afa7d778cefec08f781ef5bcc09c640161fb
Author:     Diego de Souza <[email protected]>
AuthorDate: Fri Jul 10 18:18:33 2026 +0200
Commit:     Niklas Haas <[email protected]>
CommitDate: Wed Aug 26 09:52:59 2026 +0000

    avfilter/vf_scale_cuda: use generic filters for Lanczos by default
    
    Use the generic weight-LUT path for Lanczos in automatic mode to provide
    the full filter window and downscaling anti-aliasing. Keep the legacy
    four-tap path available with use_filters=0.
    
    Signed-off-by: Diego de Souza <[email protected]>
---
 doc/filters.texi            | 6 ++++--
 libavfilter/vf_scale_cuda.c | 8 ++++++--
 2 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 47f27b8a44..488ecdf9c5 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -27689,7 +27689,8 @@ Bicubic
 This is the default.
 
 @item lanczos
-Lanczos
+High-quality separable Lanczos (windowed sinc). The filter radius can be
+set with @option{param}; the default is 3.
 
 @end table
 
@@ -27711,7 +27712,8 @@ parameters. This is the default behaviour.
 If set to 1, filter with a generic weight LUT instead of using fixed-function
 shader kernels. May be faster or slower depending on the hardware. A value
 of @code{auto} (the default) enables this automatically when required for
-correct anti-aliasing when downscaling.
+correct anti-aliasing when downscaling, and for high-quality Lanczos scaling.
+Set this to 0 to use the legacy fixed 4-tap Lanczos kernel.
 
 @item param
 Algorithm-specific parameter. For @var{bicubic}, this affects the filter
diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c
index 9e47659536..747cc624b3 100644
--- a/libavfilter/vf_scale_cuda.c
+++ b/libavfilter/vf_scale_cuda.c
@@ -540,8 +540,12 @@ static av_cold int init_processing_chain(AVFilterContext 
*ctx, int in_width, int
         } else if (s->use_filters_opt >= 0) {
             s->use_filters = s->use_filters_opt;
         } else {
-            s->use_filters = cudascale_plane_is_downscaled(in_width, out_width,
-                                                            0, 0) ||
+            /* Lanczos needs the generic path for its full windowed-sinc
+             * kernel. Other algorithms need it when downscaling for correct
+             * anti-aliasing. */
+            s->use_filters = s->interp_algo == INTERP_ALGO_LANCZOS ||
+                             cudascale_plane_is_downscaled(in_width, out_width,
+                                                           0, 0) ||
                              cudascale_plane_is_downscaled(in_height, 
out_height,
                                                            0, 0) ||
                              (s->in_planes > 1 && s->out_planes > 1 &&

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to