Commit 9f8e57ef authored by Gwenole Beauchesne's avatar Gwenole Beauchesne

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: 's avatarGwenole Beauchesne <gwenole.beauchesne@intel.com>
parent 6eecb91f
...@@ -15,6 +15,13 @@ libavutil: 2014-08-09 ...@@ -15,6 +15,13 @@ libavutil: 2014-08-09
API changes, most recent first: API changes, most recent first:
2015-xx-xx - lavu 54.31.100 - pixfmt.h
Add a unique pixel format for VA-API (AV_PIX_FMT_VAAPI) that
indicates the nature of the underlying storage: a VA surface. This
yields the same value as AV_PIX_FMT_VAAPI_VLD.
Deprecate old VA-API related pixel formats: AV_PIX_FMT_VAAPI_MOCO,
AV_PIX_FMT_VAAPI_IDCT, AV_PIX_FMT_VAAPI_VLD.
2015-xx-xx - lavu 54.30.0 2015-xx-xx - lavu 54.30.0
xxxxxxx - Add av_blowfish_alloc(). xxxxxxx - Add av_blowfish_alloc().
xxxxxxx - Add av_rc4_alloc(). xxxxxxx - Add av_rc4_alloc().
......
...@@ -720,7 +720,7 @@ frame_end: ...@@ -720,7 +720,7 @@ frame_end:
const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = { const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = {
#if CONFIG_H263_VAAPI_HWACCEL || CONFIG_MPEG4_VAAPI_HWACCEL #if CONFIG_H263_VAAPI_HWACCEL || CONFIG_MPEG4_VAAPI_HWACCEL
AV_PIX_FMT_VAAPI_VLD, AV_PIX_FMT_VAAPI,
#endif #endif
#if CONFIG_H263_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL #if CONFIG_H263_VDPAU_HWACCEL || CONFIG_MPEG4_VDPAU_HWACCEL
AV_PIX_FMT_VDPAU, AV_PIX_FMT_VDPAU,
......
...@@ -946,7 +946,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback) ...@@ -946,7 +946,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
*fmt++ = AV_PIX_FMT_D3D11VA_VLD; *fmt++ = AV_PIX_FMT_D3D11VA_VLD;
#endif #endif
#if CONFIG_H264_VAAPI_HWACCEL #if CONFIG_H264_VAAPI_HWACCEL
*fmt++ = AV_PIX_FMT_VAAPI_VLD; *fmt++ = AV_PIX_FMT_VAAPI;
#endif #endif
#if CONFIG_H264_VDA_HWACCEL #if CONFIG_H264_VDA_HWACCEL
*fmt++ = AV_PIX_FMT_VDA_VLD; *fmt++ = AV_PIX_FMT_VDA_VLD;
......
...@@ -1213,7 +1213,7 @@ static const enum AVPixelFormat mpeg2_hwaccel_pixfmt_list_420[] = { ...@@ -1213,7 +1213,7 @@ static const enum AVPixelFormat mpeg2_hwaccel_pixfmt_list_420[] = {
AV_PIX_FMT_D3D11VA_VLD, AV_PIX_FMT_D3D11VA_VLD,
#endif #endif
#if CONFIG_MPEG2_VAAPI_HWACCEL #if CONFIG_MPEG2_VAAPI_HWACCEL
AV_PIX_FMT_VAAPI_VLD, AV_PIX_FMT_VAAPI,
#endif #endif
#if CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL #if CONFIG_MPEG2_VIDEOTOOLBOX_HWACCEL
AV_PIX_FMT_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX,
......
...@@ -359,7 +359,7 @@ AVHWAccel ff_h264_vaapi_hwaccel = { ...@@ -359,7 +359,7 @@ AVHWAccel ff_h264_vaapi_hwaccel = {
.name = "h264_vaapi", .name = "h264_vaapi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H264, .id = AV_CODEC_ID_H264,
.pix_fmt = AV_PIX_FMT_VAAPI_VLD, .pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_h264_start_frame, .start_frame = vaapi_h264_start_frame,
.end_frame = vaapi_h264_end_frame, .end_frame = vaapi_h264_end_frame,
.decode_slice = vaapi_h264_decode_slice, .decode_slice = vaapi_h264_decode_slice,
......
...@@ -138,7 +138,7 @@ AVHWAccel ff_mpeg2_vaapi_hwaccel = { ...@@ -138,7 +138,7 @@ AVHWAccel ff_mpeg2_vaapi_hwaccel = {
.name = "mpeg2_vaapi", .name = "mpeg2_vaapi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MPEG2VIDEO, .id = AV_CODEC_ID_MPEG2VIDEO,
.pix_fmt = AV_PIX_FMT_VAAPI_VLD, .pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_mpeg2_start_frame, .start_frame = vaapi_mpeg2_start_frame,
.end_frame = ff_vaapi_mpeg_end_frame, .end_frame = ff_vaapi_mpeg_end_frame,
.decode_slice = vaapi_mpeg2_decode_slice, .decode_slice = vaapi_mpeg2_decode_slice,
......
...@@ -141,7 +141,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = { ...@@ -141,7 +141,7 @@ AVHWAccel ff_mpeg4_vaapi_hwaccel = {
.name = "mpeg4_vaapi", .name = "mpeg4_vaapi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_MPEG4, .id = AV_CODEC_ID_MPEG4,
.pix_fmt = AV_PIX_FMT_VAAPI_VLD, .pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_mpeg4_start_frame, .start_frame = vaapi_mpeg4_start_frame,
.end_frame = ff_vaapi_mpeg_end_frame, .end_frame = ff_vaapi_mpeg_end_frame,
.decode_slice = vaapi_mpeg4_decode_slice, .decode_slice = vaapi_mpeg4_decode_slice,
...@@ -153,7 +153,7 @@ AVHWAccel ff_h263_vaapi_hwaccel = { ...@@ -153,7 +153,7 @@ AVHWAccel ff_h263_vaapi_hwaccel = {
.name = "h263_vaapi", .name = "h263_vaapi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_H263, .id = AV_CODEC_ID_H263,
.pix_fmt = AV_PIX_FMT_VAAPI_VLD, .pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_mpeg4_start_frame, .start_frame = vaapi_mpeg4_start_frame,
.end_frame = ff_vaapi_mpeg_end_frame, .end_frame = ff_vaapi_mpeg_end_frame,
.decode_slice = vaapi_mpeg4_decode_slice, .decode_slice = vaapi_mpeg4_decode_slice,
......
...@@ -339,7 +339,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = { ...@@ -339,7 +339,7 @@ AVHWAccel ff_wmv3_vaapi_hwaccel = {
.name = "wmv3_vaapi", .name = "wmv3_vaapi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_WMV3, .id = AV_CODEC_ID_WMV3,
.pix_fmt = AV_PIX_FMT_VAAPI_VLD, .pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_vc1_start_frame, .start_frame = vaapi_vc1_start_frame,
.end_frame = ff_vaapi_mpeg_end_frame, .end_frame = ff_vaapi_mpeg_end_frame,
.decode_slice = vaapi_vc1_decode_slice, .decode_slice = vaapi_vc1_decode_slice,
...@@ -350,7 +350,7 @@ AVHWAccel ff_vc1_vaapi_hwaccel = { ...@@ -350,7 +350,7 @@ AVHWAccel ff_vc1_vaapi_hwaccel = {
.name = "vc1_vaapi", .name = "vc1_vaapi",
.type = AVMEDIA_TYPE_VIDEO, .type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VC1, .id = AV_CODEC_ID_VC1,
.pix_fmt = AV_PIX_FMT_VAAPI_VLD, .pix_fmt = AV_PIX_FMT_VAAPI,
.start_frame = vaapi_vc1_start_frame, .start_frame = vaapi_vc1_start_frame,
.end_frame = ff_vaapi_mpeg_end_frame, .end_frame = ff_vaapi_mpeg_end_frame,
.decode_slice = vaapi_vc1_decode_slice, .decode_slice = vaapi_vc1_decode_slice,
......
...@@ -1115,7 +1115,7 @@ static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = { ...@@ -1115,7 +1115,7 @@ static const enum AVPixelFormat vc1_hwaccel_pixfmt_list_420[] = {
AV_PIX_FMT_D3D11VA_VLD, AV_PIX_FMT_D3D11VA_VLD,
#endif #endif
#if CONFIG_VC1_VAAPI_HWACCEL #if CONFIG_VC1_VAAPI_HWACCEL
AV_PIX_FMT_VAAPI_VLD, AV_PIX_FMT_VAAPI,
#endif #endif
#if CONFIG_VC1_VDPAU_HWACCEL #if CONFIG_VC1_VDPAU_HWACCEL
AV_PIX_FMT_VDPAU, AV_PIX_FMT_VDPAU,
......
...@@ -1208,6 +1208,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { ...@@ -1208,6 +1208,7 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
}, },
.flags = AV_PIX_FMT_FLAG_RGB, .flags = AV_PIX_FMT_FLAG_RGB,
}, },
#if FF_API_VAAPI
[AV_PIX_FMT_VAAPI_MOCO] = { [AV_PIX_FMT_VAAPI_MOCO] = {
.name = "vaapi_moco", .name = "vaapi_moco",
.log2_chroma_w = 1, .log2_chroma_w = 1,
...@@ -1226,6 +1227,14 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = { ...@@ -1226,6 +1227,14 @@ const AVPixFmtDescriptor av_pix_fmt_descriptors[AV_PIX_FMT_NB] = {
.log2_chroma_h = 1, .log2_chroma_h = 1,
.flags = AV_PIX_FMT_FLAG_HWACCEL, .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] = { [AV_PIX_FMT_YUV420P9LE] = {
.name = "yuv420p9le", .name = "yuv420p9le",
.nb_components = 3, .nb_components = 3,
......
...@@ -121,9 +121,21 @@ enum AVPixelFormat { ...@@ -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_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 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_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_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_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_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 AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
*/ */
#define LIBAVUTIL_VERSION_MAJOR 54 #define LIBAVUTIL_VERSION_MAJOR 54
#define LIBAVUTIL_VERSION_MINOR 30 #define LIBAVUTIL_VERSION_MINOR 31
#define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_MICRO 100
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
...@@ -128,6 +128,9 @@ ...@@ -128,6 +128,9 @@
#ifndef FF_API_CRYPTO_CONTEXT #ifndef FF_API_CRYPTO_CONTEXT
#define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56) #define FF_API_CRYPTO_CONTEXT (LIBAVUTIL_VERSION_MAJOR < 56)
#endif #endif
#ifndef FF_API_VAAPI
#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 56)
#endif
#ifndef FF_CONST_AVUTIL55 #ifndef FF_CONST_AVUTIL55
#if LIBAVUTIL_VERSION_MAJOR >= 55 #if LIBAVUTIL_VERSION_MAJOR >= 55
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment