The Intel binary iHD driver does not support the
VASurfaceAttribMemoryType, so surface allocation will fail when using
it.
(cherry picked from commit 2124711b95
)
tags/n3.3
@@ -15,6 +15,9 @@ libavutil: 2015-08-28 | |||||
API changes, most recent first: | API changes, most recent first: | ||||
2016-xx-xx - xxxxxxx - lavu 55.39.100 - hwcontext_vaapi.h | |||||
Add AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE. | |||||
2016-xx-xx - xxxxxxx - lavu 55.38.100 - hwcontext_vaapi.h | 2016-xx-xx - xxxxxxx - lavu 55.38.100 - hwcontext_vaapi.h | ||||
Add driver quirks field to VAAPI-specific hwdevice and enum with | Add driver quirks field to VAAPI-specific hwdevice and enum with | ||||
members AV_VAAPI_DRIVER_QUIRK_* to represent its values. | members AV_VAAPI_DRIVER_QUIRK_* to represent its values. | ||||
@@ -275,6 +275,11 @@ static const struct { | |||||
"i965", | "i965", | ||||
AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS, | AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS, | ||||
}, | }, | ||||
{ | |||||
"Intel iHD", | |||||
"ubit", | |||||
AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE, | |||||
}, | |||||
}; | }; | ||||
static int vaapi_device_init(AVHWDeviceContext *hwdev) | static int vaapi_device_init(AVHWDeviceContext *hwdev) | ||||
@@ -449,7 +454,8 @@ static int vaapi_frames_init(AVHWFramesContext *hwfc) | |||||
} | } | ||||
if (!hwfc->pool) { | if (!hwfc->pool) { | ||||
int need_memory_type = 1, need_pixel_format = 1; | |||||
int need_memory_type = !(hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE); | |||||
int need_pixel_format = 1; | |||||
for (i = 0; i < avfc->nb_attributes; i++) { | for (i = 0; i < avfc->nb_attributes; i++) { | ||||
if (ctx->attributes[i].type == VASurfaceAttribMemoryType) | if (ctx->attributes[i].type == VASurfaceAttribMemoryType) | ||||
need_memory_type = 0; | need_memory_type = 0; | ||||
@@ -45,6 +45,12 @@ enum { | |||||
* separately afterwards. | * separately afterwards. | ||||
*/ | */ | ||||
AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1), | AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1), | ||||
/** | |||||
* The driver does not support the VASurfaceAttribMemoryType attribute, | |||||
* so the surface allocation code will not try to use it. | |||||
*/ | |||||
AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = (1 << 2), | |||||
}; | }; | ||||
/** | /** | ||||
@@ -79,7 +79,7 @@ | |||||
*/ | */ | ||||
#define LIBAVUTIL_VERSION_MAJOR 55 | #define LIBAVUTIL_VERSION_MAJOR 55 | ||||
#define LIBAVUTIL_VERSION_MINOR 38 | |||||
#define LIBAVUTIL_VERSION_MINOR 39 | |||||
#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, \ | ||||