Browse code

lavu: Add OpenCL hardware pixfmt

Mark Thompson authored on 2017/03/05 08:57:46
Showing 4 changed files
... ...
@@ -15,6 +15,9 @@ libavutil:     2017-10-21
15 15
 
16 16
 API changes, most recent first:
17 17
 
18
+2017-11-xx - xxxxxxx - lavu 55.1.0 - pixfmt.h
19
+  Add AV_PIX_FMT_OPENCL.
20
+
18 21
 2017-xx-xx - xxxxxxx - lavc 58.3.100 - avcodec.h
19 22
   Add avcodec_get_hw_frames_parameters().
20 23
 
... ...
@@ -2181,6 +2181,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
2181 2181
         .name = "drm_prime",
2182 2182
         .flags = AV_PIX_FMT_FLAG_HWACCEL,
2183 2183
     },
2184
+    [AV_PIX_FMT_OPENCL] = {
2185
+        .name  = "opencl",
2186
+        .flags = AV_PIX_FMT_FLAG_HWACCEL,
2187
+    },
2184 2188
 };
2185 2189
 #if FF_API_PLUS1_MINUS1
2186 2190
 FF_ENABLE_DEPRECATION_WARNINGS
... ...
@@ -322,6 +322,13 @@ enum AVPixelFormat {
322 322
      * data[0] points to an AVDRMFrameDescriptor.
323 323
      */
324 324
     AV_PIX_FMT_DRM_PRIME,
325
+    /**
326
+     * Hardware surfaces for OpenCL.
327
+     *
328
+     * data[i] contain 2D image objects (typed in C as cl_mem, used
329
+     * in OpenCL as image2d_t) for each plane of the surface.
330
+     */
331
+    AV_PIX_FMT_OPENCL,
325 332
 
326 333
     AV_PIX_FMT_NB         ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
327 334
 };
... ...
@@ -80,7 +80,7 @@
80 80
 
81 81
 
82 82
 #define LIBAVUTIL_VERSION_MAJOR  56
83
-#define LIBAVUTIL_VERSION_MINOR   0
83
+#define LIBAVUTIL_VERSION_MINOR   1
84 84
 #define LIBAVUTIL_VERSION_MICRO 100
85 85
 
86 86
 #define LIBAVUTIL_VERSION_INT   AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \