diff options
author | Mark Thompson <mrt@jkqxz.net> | 2016-03-07 22:34:59 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-03-19 15:40:22 +0100 |
commit | d264c720f7b74286840719e506daba39f83b438b (patch) | |
tree | 3356645831e636395b559fb51c2205cbd5335a4b /libavutil | |
parent | b1f01e85a92d401a9b29c79f23db36b7685e8c09 (diff) | |
download | ffmpeg-d264c720f7b74286840719e506daba39f83b438b.tar.gz |
lavu: deprecate AV_PIX_FMT_VAAPI_*, replace with AV_PIX_FMT_VAAPI
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'libavutil')
-rw-r--r-- | libavutil/pixdesc.c | 14 | ||||
-rw-r--r-- | libavutil/pixfmt.h | 5 | ||||
-rw-r--r-- | libavutil/version.h | 5 |
3 files changed, 23 insertions, 1 deletions
diff --git a/libavutil/pixdesc.c b/libavutil/pixdesc.c index 9b948ed2fd..b383cd4fb5 100644 --- a/libavutil/pixdesc.c +++ b/libavutil/pixdesc.c @@ -1093,6 +1093,7 @@ static 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, @@ -1111,6 +1112,14 @@ static 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_VDA_VLD] = { .name = "vda_vld", .log2_chroma_w = 1, @@ -1655,6 +1664,11 @@ enum AVPixelFormat av_get_pix_fmt(const char *name) snprintf(name2, sizeof(name2), "%s%s", name, X_NE("be", "le")); pix_fmt = get_pix_fmt_internal(name2); } + +#if FF_API_VAAPI + if (pix_fmt == AV_PIX_FMT_NONE && !strcmp(name, "vaapi")) + pix_fmt = AV_PIX_FMT_VAAPI; +#endif return pix_fmt; } diff --git a/libavutil/pixfmt.h b/libavutil/pixfmt.h index 7d369f5520..c903a3f649 100644 --- a/libavutil/pixfmt.h +++ b/libavutil/pixfmt.h @@ -116,9 +116,14 @@ enum AVPixelFormat { AV_PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), big-endian, most significant bit to 1 AV_PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1A 5B 5G 5R(lsb), little-endian, most significant bit to 1 +#if FF_API_VAAPI 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 VASurfaceID + AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD, +#else + AV_PIX_FMT_VAAPI, ///< HW decoding through VA API, Picture.data[3] contains a VASurfaceID +#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 b102e93fa0..72eb5f4605 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -54,7 +54,7 @@ */ #define LIBAVUTIL_VERSION_MAJOR 55 -#define LIBAVUTIL_VERSION_MINOR 7 +#define LIBAVUTIL_VERSION_MINOR 8 #define LIBAVUTIL_VERSION_MICRO 0 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -99,6 +99,9 @@ #ifndef FF_API_ERROR_FRAME #define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 56) #endif +#ifndef FF_API_VAAPI +#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56) +#endif /** |