diff options
author | Mark Thompson <sw@jkqxz.net> | 2017-03-05 02:57:46 +0300 |
---|---|---|
committer | Mark Thompson <sw@jkqxz.net> | 2017-11-23 02:01:29 +0300 |
commit | a050f56c0903c718d8ef0b14dc09195785fdf564 (patch) | |
tree | b0f4376bc4838af8291d6d03b8a63cc011ce4f75 | |
parent | 152902f3799f24d0d392880f33a11c6920a30cf1 (diff) |
lavu: Add OpenCL hardware pixfmt
-rw-r--r-- | doc/APIchanges | 3 | ||||
-rw-r--r-- | libavutil/pixdesc.c | 4 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 7 | ||||
-rw-r--r-- | libavutil/version.h | 2 |
4 files changed, 15 insertions, 1 deletions
diff --git a/doc/APIchanges b/doc/APIchanges index d336f6ce22..2464cc2e5f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2017-11-xx - xxxxxxx - lavu 55.1.0 - pixfmt.h + Add AV_PIX_FMT_OPENCL. + 2017-xx-xx - xxxxxxx - lavc 58.3.100 - avcodec.h Add avcodec_get_hw_frames_parameters(). diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 3d21e67a78..e77d5f44b9 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -2181,6 +2181,10 @@ static const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .name = "drm_prime", .flags = AV_PIX_FMT_FLAG_HWACCEL, }, + [AV_PIX_FMT_OPENCL] = { + .name = "opencl", + .flags = AV_PIX_FMT_FLAG_HWACCEL, + }, }; #if FF_API_PLUS1_MINUS1 FF_ENABLE_DEPRECATION_WARNINGS diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index a520028962..4c530fead3 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -322,6 +322,13 @@ enum AVPixelFormat { * data[0] points to an AVDRMFrameDescriptor. */ AV_PIX_FMT_DRM_PRIME, + /** + * Hardware surfaces for OpenCL. + * + * data[i] contain 2D image objects (typed in C as cl_mem, used + * in OpenCL as image2d_t) for each plane of the surface. + */ + AV_PIX_FMT_OPENCL, 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 }; diff --git a/libavutil/version.h b/libavutil/version.h index 1bc4b2a6cb..cf8ec498e4 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -80,7 +80,7 @@ #define LIBAVUTIL_VERSION_MAJOR 56 -#define LIBAVUTIL_VERSION_MINOR 0 +#define LIBAVUTIL_VERSION_MINOR 1 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |