diff options
author | Timo Rothenpieler <timo@rothenpieler.org> | 2020-11-04 01:43:00 +0100 |
---|---|---|
committer | Timo Rothenpieler <timo@rothenpieler.org> | 2020-11-04 01:43:21 +0100 |
commit | cfdddec0c832a67da8a0081a32ae2c7127ce2368 (patch) | |
tree | 92a2095d106c49c54b0c8c3181a1ad0bd3daca82 /libavfilter/vf_scale_cuda.c | |
parent | 98d3f2359853f1908092b6244f429ced838f493b (diff) |
avfilter/scale_cuda: add lanczos algorithm
Diffstat (limited to 'libavfilter/vf_scale_cuda.c')
-rw-r--r-- | libavfilter/vf_scale_cuda.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c index dfa638dbf7..f6401b35b0 100644 --- a/libavfilter/vf_scale_cuda.c +++ b/libavfilter/vf_scale_cuda.c @@ -59,6 +59,7 @@ enum { INTERP_ALGO_NEAREST, INTERP_ALGO_BILINEAR, INTERP_ALGO_BICUBIC, + INTERP_ALGO_LANCZOS, INTERP_ALGO_COUNT }; @@ -293,6 +294,12 @@ static av_cold int cudascale_config_props(AVFilterLink *outlink) s->interp_use_linear = 0; s->interp_as_integer = 0; break; + case INTERP_ALGO_LANCZOS: + scaler_ptx = vf_scale_cuda_bicubic_ptx; + function_infix = "_Lanczos"; + s->interp_use_linear = 0; + s->interp_as_integer = 0; + break; default: av_log(ctx, AV_LOG_ERROR, "Unknown interpolation algorithm\n"); return AVERROR_BUG; @@ -601,6 +608,7 @@ static const AVOption options[] = { { "nearest", "nearest neighbour", 0, AV_OPT_TYPE_CONST, { .i64 = INTERP_ALGO_NEAREST }, 0, 0, FLAGS, "interp_algo" }, { "bilinear", "bilinear", 0, AV_OPT_TYPE_CONST, { .i64 = INTERP_ALGO_BILINEAR }, 0, 0, FLAGS, "interp_algo" }, { "bicubic", "bicubic", 0, AV_OPT_TYPE_CONST, { .i64 = INTERP_ALGO_BICUBIC }, 0, 0, FLAGS, "interp_algo" }, + { "lanczos", "lanczos", 0, AV_OPT_TYPE_CONST, { .i64 = INTERP_ALGO_LANCZOS }, 0, 0, FLAGS, "interp_algo" }, { "passthrough", "Do not process frames at all if parameters match", OFFSET(passthrough), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, FLAGS }, { "force_original_aspect_ratio", "decrease or increase w/h if necessary to keep the original AR", OFFSET(force_original_aspect_ratio), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FLAGS, "force_oar" }, { "disable", NULL, 0, AV_OPT_TYPE_CONST, {.i64 = 0 }, 0, 0, FLAGS, "force_oar" }, |