From 3650cb2dfa644ff4260d226b783747ff9e020ad1 Mon Sep 17 00:00:00 2001 From: Mark Thompson Date: Tue, 14 Nov 2017 19:47:30 +0000 Subject: lavu,lavfi,ffmpeg: Remove experimental OpenCL API This was added in early 2013 and abandoned several months later; as far as I can tell, there are no external users. Future OpenCL use will be via hwcontext, which requires neither special OpenCL-only API nor global state in libavutil. All internal users are also deleted - this is just the unsharp filter (replaced by unsharp_opencl, which is more flexible) and the deshake filter (no replacement). --- libavfilter/vf_unsharp.c | 26 ++------------------------ 1 file changed, 2 insertions(+), 24 deletions(-) (limited to 'libavfilter/vf_unsharp.c') diff --git a/libavfilter/vf_unsharp.c b/libavfilter/vf_unsharp.c index 438ff6d8fb..41ccc56942 100644 --- a/libavfilter/vf_unsharp.c +++ b/libavfilter/vf_unsharp.c @@ -46,7 +46,6 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "unsharp.h" -#include "unsharp_opencl.h" static void apply_unsharp( uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, @@ -134,10 +133,8 @@ static void set_filter_param(UnsharpFilterParam *fp, int msize_x, int msize_y, f static av_cold int init(AVFilterContext *ctx) { - int ret = 0; UnsharpContext *s = ctx->priv; - set_filter_param(&s->luma, s->lmsize_x, s->lmsize_y, s->lamount); set_filter_param(&s->chroma, s->cmsize_x, s->cmsize_y, s->camount); @@ -146,16 +143,6 @@ static av_cold int init(AVFilterContext *ctx) return AVERROR(EINVAL); } s->apply_unsharp = apply_unsharp_c; - if (!CONFIG_OPENCL && s->opencl) { - av_log(ctx, AV_LOG_ERROR, "OpenCL support was not enabled in this build, cannot be selected\n"); - return AVERROR(EINVAL); - } - if (CONFIG_OPENCL && s->opencl) { - s->apply_unsharp = ff_opencl_apply_unsharp; - ret = ff_opencl_unsharp_init(ctx); - if (ret < 0) - return ret; - } return 0; } @@ -227,10 +214,6 @@ static av_cold void uninit(AVFilterContext *ctx) { UnsharpContext *s = ctx->priv; - if (CONFIG_OPENCL && s->opencl) { - ff_opencl_unsharp_uninit(ctx); - } - free_filter_param(&s->luma); free_filter_param(&s->chroma); } @@ -248,14 +231,9 @@ static int filter_frame(AVFilterLink *link, AVFrame *in) return AVERROR(ENOMEM); } av_frame_copy_props(out, in); - if (CONFIG_OPENCL && s->opencl) { - ret = ff_opencl_unsharp_process_inout_buf(link->dst, in, out); - if (ret < 0) - goto end; - } ret = s->apply_unsharp(link->dst, in, out); -end: + av_frame_free(&in); if (ret < 0) { @@ -282,7 +260,7 @@ static const AVOption unsharp_options[] = { { "cy", "set chroma matrix vertical size", OFFSET(cmsize_y), AV_OPT_TYPE_INT, { .i64 = 5 }, MIN_SIZE, MAX_SIZE, FLAGS }, { "chroma_amount", "set chroma effect strength", OFFSET(camount), AV_OPT_TYPE_FLOAT, { .dbl = 0 }, -2, 5, FLAGS }, { "ca", "set chroma effect strength", OFFSET(camount), AV_OPT_TYPE_FLOAT, { .dbl = 0 }, -2, 5, FLAGS }, - { "opencl", "use OpenCL filtering capabilities", OFFSET(opencl), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS }, + { "opencl", "ignored", OFFSET(opencl), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, FLAGS }, { NULL } }; -- cgit v1.2.3