Browse code

avutil: remove obsolete FF_API_OLD_OPENCL cruft

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

James Almer authored on 2014/09/15 09:19:29
Showing 3 changed files
... ...
@@ -70,12 +70,6 @@ typedef struct {
70 70
     cl_context context;
71 71
     cl_device_id device_id;
72 72
     cl_command_queue command_queue;
73
-#if FF_API_OLD_OPENCL
74
-    char *build_options;
75
-    int program_count;
76
-    cl_program programs[MAX_KERNEL_CODE_NUM];
77
-    int kernel_count;
78
-#endif
79 73
     int kernel_code_count;
80 74
     KernelCode kernel_code[MAX_KERNEL_CODE_NUM];
81 75
     AVOpenCLDeviceList device_list;
... ...
@@ -86,9 +80,6 @@ typedef struct {
86 86
 static const AVOption opencl_options[] = {
87 87
      { "platform_idx",        "set platform index value",  OFFSET(platform_idx),  AV_OPT_TYPE_INT,    {.i64=-1}, -1, INT_MAX},
88 88
      { "device_idx",          "set device index value",    OFFSET(device_idx),    AV_OPT_TYPE_INT,    {.i64=-1}, -1, INT_MAX},
89
-#if FF_API_OLD_OPENCL
90
-     { "build_options",       "build options of opencl",   OFFSET(build_options), AV_OPT_TYPE_STRING, {.str="-I."},  CHAR_MIN, CHAR_MAX},
91
-#endif
92 89
      { NULL }
93 90
 };
94 91
 
... ...
@@ -475,19 +466,6 @@ cl_command_queue av_opencl_get_command_queue(void)
475 475
     return opencl_ctx.command_queue;
476 476
 }
477 477
 
478
-#if FF_API_OLD_OPENCL
479
-int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name)
480
-{
481
-    av_log(&opencl_ctx, AV_LOG_ERROR, "Could not create OpenCL kernel %s, please update libavfilter.\n", kernel_name);
482
-    return AVERROR(EINVAL);
483
-}
484
-
485
-void av_opencl_release_kernel(AVOpenCLKernelEnv *env)
486
-{
487
-    av_log(&opencl_ctx, AV_LOG_ERROR, "Could not release OpenCL kernel, please update libavfilter.\n");
488
-}
489
-#endif
490
-
491 478
 static int init_opencl_env(OpenclContext *opencl_ctx, AVOpenCLExternalEnv *ext_opencl_env)
492 479
 {
493 480
     cl_int status;
... ...
@@ -69,14 +69,6 @@ typedef struct {
69 69
     AVOpenCLPlatformNode **platform_node;
70 70
 } AVOpenCLDeviceList;
71 71
 
72
-#if FF_API_OLD_OPENCL
73
-typedef struct {
74
-    cl_command_queue command_queue;
75
-    cl_kernel kernel;
76
-    char kernel_name[AV_OPENCL_MAX_KERNEL_NAME_SIZE];
77
-} AVOpenCLKernelEnv;
78
-#endif
79
-
80 72
 typedef struct {
81 73
     cl_platform_id platform_id;
82 74
     cl_device_type device_type;
... ...
@@ -187,19 +179,6 @@ int av_opencl_register_kernel_code(const char *kernel_code);
187 187
  */
188 188
 int av_opencl_init(AVOpenCLExternalEnv *ext_opencl_env);
189 189
 
190
-#if FF_API_OLD_OPENCL
191
-/**
192
- * Create kernel object in the specified kernel environment.
193
- *
194
- * @param env              pointer to kernel environment which is filled with
195
- *                         the environment used to run the kernel
196
- * @param kernel_name      kernel function name
197
- * @return >=0 on success, a negative error code in case of failure
198
- * @deprecated, use clCreateKernel
199
- */
200
-int av_opencl_create_kernel(AVOpenCLKernelEnv *env, const char *kernel_name);
201
-#endif
202
-
203 190
 /**
204 191
  * compile specific OpenCL kernel source
205 192
  *
... ...
@@ -292,17 +271,6 @@ int av_opencl_buffer_read_image(uint8_t **dst_data, int *plane_size, int plane_n
292 292
  */
293 293
 void av_opencl_buffer_release(cl_mem *cl_buf);
294 294
 
295
-#if FF_API_OLD_OPENCL
296
-/**
297
- * Release kernel object.
298
- *
299
- * @param env kernel environment where the kernel object was created
300
- *            with av_opencl_create_kernel()
301
- * @deprecated, use clReleaseKernel
302
- */
303
-void av_opencl_release_kernel(AVOpenCLKernelEnv *env);
304
-#endif
305
-
306 295
 /**
307 296
  * Release OpenCL environment.
308 297
  *
... ...
@@ -122,9 +122,6 @@
122 122
 #ifndef FF_API_GET_CHANNEL_LAYOUT_COMPAT
123 123
 #define FF_API_GET_CHANNEL_LAYOUT_COMPAT (LIBAVUTIL_VERSION_MAJOR < 55)
124 124
 #endif
125
-#ifndef FF_API_OLD_OPENCL
126
-#define FF_API_OLD_OPENCL               (LIBAVUTIL_VERSION_MAJOR < 54)
127
-#endif
128 125
 #ifndef FF_API_XVMC
129 126
 #define FF_API_XVMC                     (LIBAVUTIL_VERSION_MAJOR < 55)
130 127
 #endif