diff options
author | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2015-07-28 11:16:59 +0300 |
---|---|---|
committer | Gwenole Beauchesne <gwenole.beauchesne@intel.com> | 2015-08-19 15:03:24 +0300 |
commit | 9f8e57efe4400ca86352277873792792279c3b15 (patch) | |
tree | 32c3b90e49eb7370b757832756ffec930b5ad8a1 /libavutil | |
parent | 6eecb91fbc275fec5225626c06d061e883ba37e0 (diff) |
vaapi: define a unique pixel format for VA-API (AV_PIX_FMT_VAAPI).
Deprecate older VA pixel formats (MOCO, IDCT) as it is now very unlikely
to ever be useful in the future. Only keep plain AV_PIX_FMT_VAAPI format
that is aliased to the older VLD variant.
This is an API change.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/pixdesc.c | 9 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 12 | ||||
-rw-r--r-- | libavutil/version.h | 5 |
3 files changed, 25 insertions, 1 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index eb0dc9d311..eb52113745 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -1208,6 +1208,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { }, .flags = AV_PIX_FMT_FLAG_RGB, }, +#if FF_API_VAAPI [AV_PIX_FMT_VAAPI_MOCO] = { .name = "vaapi_moco", .log2_chroma_w = 1, @@ -1226,6 +1227,14 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { .log2_chroma_h = 1, .flags = AV_PIX_FMT_FLAG_HWACCEL, }, +#else + [AV_PIX_FMT_VAAPI] = { + .name = "vaapi", + .log2_chroma_w = 1, + .log2_chroma_h = 1, + .flags = AV_PIX_FMT_FLAG_HWACCEL, + }, +#endif [AV_PIX_FMT_YUV420P9LE] = { .name = "yuv420p9le", .nb_components = 3, diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 5cdbeb9678..029c911d49 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -121,9 +121,21 @@ enum AVPixelFormat { AV_PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined AV_PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined +#if FF_API_VAAPI + /** @name Deprecated pixel formats */ + /**@{*/ AV_PIX_FMT_VAAPI_MOCO, ///< HW acceleration through VA API at motion compensation entry-point, Picture.data[3] contains a vaapi_render_state struct which contains macroblocks as well as various fields extracted from headers AV_PIX_FMT_VAAPI_IDCT, ///< HW acceleration through VA API at IDCT entry-point, Picture.data[3] contains a vaapi_render_state struct which contains fields extracted from headers AV_PIX_FMT_VAAPI_VLD, ///< HW decoding through VA API, Picture.data[3] contains a vaapi_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers + /**@}*/ + AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD, +#else + /** + * Hardware acceleration through VA-API, data[3] contains a + * VASurfaceID. + */ + AV_PIX_FMT_VAAPI, +#endif AV_PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian diff --git a/libavutil/version.h b/libavutil/version.h index 653f530631..5dc3181ebe 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -56,7 +56,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 54 -#define LIBAVUTIL_VERSION_MINOR 30 +#define LIBAVUTIL_VERSION_MINOR 31 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -128,6 +128,9 @@ #ifndef FF_API_CRYPTO_CONTEXT #define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56) #endif +#ifndef FF_API_VAAPI +#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56) +#endif #ifndef FF_CONST_AVUTIL55 #if LIBAVUTIL_VERSION_MAJOR >= 55 |