summaryrefslogtreecommitdiff
path: root/libavfilter/vf_scale_cuda.c
diff options
context:
space:
mode:
authorTimo Rothenpieler <timo@rothenpieler.org>2021-06-22 21:42:45 +0200
committerTimo Rothenpieler <timo@rothenpieler.org>2021-06-24 20:58:47 +0200
commitb0e2e938c31f0dc46d905cb2ea7e904645ca0c19 (patch)
tree9a1ed6837a0af5c1fcf1b9367279f06a2ae19f6a /libavfilter/vf_scale_cuda.c
parent91a41a34398afd5678c20c5f5025562a41cf5bd4 (diff)
avfilter/scale_cuda: combine separate CUDA sources
Diffstat (limited to 'libavfilter/vf_scale_cuda.c')
-rw-r--r--libavfilter/vf_scale_cuda.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/libavfilter/vf_scale_cuda.c b/libavfilter/vf_scale_cuda.c
index c10938e96b..a3da4dc0bc 100644
--- a/libavfilter/vf_scale_cuda.c
+++ b/libavfilter/vf_scale_cuda.c
@@ -276,41 +276,29 @@ static av_cold int cudascale_config_props(AVFilterLink *outlink)
int w, h;
int ret;
- const unsigned char *scaler_ptx;
- unsigned int scaler_ptx_len;
const char *function_infix = "";
extern const unsigned char ff_vf_scale_cuda_ptx_data[];
extern const unsigned int ff_vf_scale_cuda_ptx_len;
- extern const unsigned char ff_vf_scale_cuda_bicubic_ptx_data[];
- extern const unsigned int ff_vf_scale_cuda_bicubic_ptx_len;
switch(s->interp_algo) {
case INTERP_ALGO_NEAREST:
- scaler_ptx = ff_vf_scale_cuda_ptx_data;
- scaler_ptx_len = ff_vf_scale_cuda_ptx_len;
function_infix = "_Nearest";
s->interp_use_linear = 0;
s->interp_as_integer = 1;
break;
case INTERP_ALGO_BILINEAR:
- scaler_ptx = ff_vf_scale_cuda_ptx_data;
- scaler_ptx_len = ff_vf_scale_cuda_ptx_len;
function_infix = "_Bilinear";
s->interp_use_linear = 1;
s->interp_as_integer = 1;
break;
case INTERP_ALGO_DEFAULT:
case INTERP_ALGO_BICUBIC:
- scaler_ptx = ff_vf_scale_cuda_bicubic_ptx_data;
- scaler_ptx_len = ff_vf_scale_cuda_bicubic_ptx_len;
function_infix = "_Bicubic";
s->interp_use_linear = 0;
s->interp_as_integer = 0;
break;
case INTERP_ALGO_LANCZOS:
- scaler_ptx = ff_vf_scale_cuda_bicubic_ptx_data;
- scaler_ptx_len = ff_vf_scale_cuda_bicubic_ptx_len;
function_infix = "_Lanczos";
s->interp_use_linear = 0;
s->interp_as_integer = 0;
@@ -327,7 +315,8 @@ static av_cold int cudascale_config_props(AVFilterLink *outlink)
if (ret < 0)
goto fail;
- ret = ff_cuda_load_module(ctx, device_hwctx, &s->cu_module, scaler_ptx, scaler_ptx_len);
+ ret = ff_cuda_load_module(ctx, device_hwctx, &s->cu_module,
+ ff_vf_scale_cuda_ptx_data, ff_vf_scale_cuda_ptx_len);
if (ret < 0)
goto fail;