[FFmpeg-cvslog] avutil: remove obsolete FF_API_OLD_OPENCL cruft

James Almer git at videolan.org
Mon Sep 15 21:01:34 CEST 2014


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Sep 14 21:19:29 2014 -0300| [95a064f5303478b70d2e1410f72505438ace2bb3] | committer: James Almer

avutil: remove obsolete FF_API_OLD_OPENCL cruft

Reviewed-by: Michael Niedermayer <michaelni at gmx.at>
Signed-off-by: James Almer <jamrial at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95a064f5303478b70d2e1410f72505438ace2bb3
---

 libavutil/opencl.c  |   22 ----------------------
 libavutil/opencl.h  |   32 --------------------------------
 libavutil/version.h |    3 ---
 3 files changed, 57 deletions(-)

diff --git a/libavutil/opencl.c b/libavutil/opencl.c
index 0b4f83b..36cb6fe 100644
--- a/libavutil/opencl.c
+++ b/libavutil/opencl.c
@@ -70,12 +70,6 @@ typedef struct {
     cl_context context;
     cl_device_id device_id;
     cl_command_queue command_queue;
-#if FF_API_OLD_OPENCL
-    char *build_options;
-    int program_count;
-    cl_program programs[MAX_KERNEL_CODE_NUM];
-    int kernel_count;
-#endif
     int kernel_code_count;
     KernelCode kernel_code[MAX_KERNEL_CODE_NUM];
     AVOpenCLDeviceList device_list;
@@ -86,9 +80,6 @@ typedef struct {
 static const AVOption opencl_options[] = {
      { "platform_idx",        "set platform index value",  OFFSET(platform_idx),  AV_OPT_TYPE_INT,    {.i64=-1}, -1, INT_MAX},
      { "device_idx",          "set device index value",    OFFSET(device_idx),    AV_OPT_TYPE_INT,    {.i64=-1}, -1, INT_MAX},
-#if FF_API_OLD_OPENCL
-     { "build_options",       "build options of opencl",   OFFSET(build_options), AV_OPT_TYPE_STRING, {.str="-I."},  CHAR_MIN, CHAR_MAX},
-#endif
      { NULL }
 };
 
@@ -475,19 +466,6 @@ cl_command_queue av_opencl_get_command_queue(void)
     return opencl_ctx.command_queue;
 }
 
-#if FF_API_OLD_OPENCL
-int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name)
-{
-    av_log(&opencl_ctx, AV_LOG_ERROR, "Could not create OpenCL kernel %s, please update libavfilter.\n", kernel_name);
-    return AVERROR(EINVAL);
-}
-
-void av_opencl_release_kernel(AVOpenCLKernelEnv *env)
-{
-    av_log(&opencl_ctx, AV_LOG_ERROR, "Could not release OpenCL kernel, please update libavfilter.\n");
-}
-#endif
-
 static int init_opencl_env(OpenclContext *opencl_ctx, AVOpenCLExternalEnv *ext_opencl_env)
 {
     cl_int status;
diff --git a/libavutil/opencl.h b/libavutil/opencl.h
index 9e6dc55..4655cba 100644
--- a/libavutil/opencl.h
+++ b/libavutil/opencl.h
@@ -69,14 +69,6 @@ typedef struct {
     AVOpenCLPlatformNode **platform_node;
 } AVOpenCLDeviceList;
 
-#if FF_API_OLD_OPENCL
-typedef struct {
-    cl_command_queue command_queue;
-    cl_kernel kernel;
-    char kernel_name[AV_OPENCL_MAX_KERNEL_NAME_SIZE];
-} AVOpenCLKernelEnv;
-#endif
-
 typedef struct {
     cl_platform_id platform_id;
     cl_device_type device_type;
@@ -187,19 +179,6 @@ int av_opencl_register_kernel_code(const char *kernel_code);
  */
 int av_opencl_init(AVOpenCLExternalEnv *ext_opencl_env);
 
-#if FF_API_OLD_OPENCL
-/**
- * Create kernel object in the specified kernel environment.
- *
- * @param env              pointer to kernel environment which is filled with
- *                         the environment used to run the kernel
- * @param kernel_name      kernel function name
- * @return >=0 on success, a negative error code in case of failure
- * @deprecated, use clCreateKernel
- */
-int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name);
-#endif
-
 /**
  * compile specific OpenCL kernel source
  *
@@ -292,17 +271,6 @@ int av_opencl_buffer_read_image(uint8_t **dst_data, int *plane_size, int plane_n
  */
 void av_opencl_buffer_release(cl_mem *cl_buf);
 
-#if FF_API_OLD_OPENCL
-/**
- * Release kernel object.
- *
- * @param env kernel environment where the kernel object was created
- *            with av_opencl_create_kernel()
- * @deprecated, use clReleaseKernel
- */
-void av_opencl_release_kernel(AVOpenCLKernelEnv *env);
-#endif
-
 /**
  * Release OpenCL environment.
  *
diff --git a/libavutil/version.h b/libavutil/version.h
index aedaaec..f4f34a7 100644
--- a/libavutil/version.h
+++ b/libavutil/version.h
@@ -122,9 +122,6 @@
 #ifndef FF_API_GET_CHANNEL_LAYOUT_COMPAT
 #define FF_API_GET_CHANNEL_LAYOUT_COMPAT (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif
-#ifndef FF_API_OLD_OPENCL
-#define FF_API_OLD_OPENCL               (LIBAVUTIL_VERSION_MAJOR < 54)
-#endif
 #ifndef FF_API_XVMC
 #define FF_API_XVMC                     (LIBAVUTIL_VERSION_MAJOR < 55)
 #endif



More information about the ffmpeg-cvslog mailing list