The Intel binary iHD driver does not support the VASurfaceAttribMemoryType, so surface allocation will fail when using it. (cherry picked from commit 2124711b950b03c582a119c75f52a87acc32d6ec)
Unified · Split
| @@ -15,6 +15,9 @@ libavutil: 2015-08-28 · 14 unmodified lines | |||
| 15 | 15 | ||
| 16 | API changes, most recent first: | 16 | API changes, most recent first: |
| 17 | 17 | ||
| 18 | 2016-xx-xx - xxxxxxx - lavu 55.39.100 - hwcontext_vaapi.h | ||
| 19 | Add AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE. | ||
| 20 | |||
| 18 | 2016-xx-xx - xxxxxxx - lavu 55.38.100 - hwcontext_vaapi.h | 21 | 2016-xx-xx - xxxxxxx - lavu 55.38.100 - hwcontext_vaapi.h |
| 19 | Add driver quirks field to VAAPI-specific hwdevice and enum with | 22 | Add driver quirks field to VAAPI-specific hwdevice and enum with |
| 20 | members AV_VAAPI_DRIVER_QUIRK_* to represent its values. | 23 | members AV_VAAPI_DRIVER_QUIRK_* to represent its values. |
| @@ -275,6 +275,11 @@ static const struct { · 274 unmodified lines | |||
| 275 | "i965", | 275 | "i965", |
| 276 | AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS, | 276 | AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS, |
| 277 | }, | 277 | }, |
| 278 | { | ||
| 279 | "Intel iHD", | ||
| 280 | "ubit", | ||
| 281 | AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE, | ||
| 282 | }, | ||
| 278 | }; | 283 | }; |
| 279 | 284 | ||
| 280 | static int vaapi_device_init(AVHWDeviceContext *hwdev) | 285 | static int vaapi_device_init(AVHWDeviceContext *hwdev) |
| @@ -449,7 +454,8 @@ static int vaapi_frames_init(AVHWFramesContext *hwfc) · 168 unmodified lines | |||
| 449 | } | 454 | } |
| 450 | 455 | ||
| 451 | if (!hwfc->pool) { | 456 | if (!hwfc->pool) { |
| 452 | int need_memory_type = 1, need_pixel_format = 1; | 457 | int need_memory_type = !(hwctx->driver_quirks & AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE); |
| 458 | int need_pixel_format = 1; | ||
| 453 | for (i = 0; i < avfc->nb_attributes; i++) { | 459 | for (i = 0; i < avfc->nb_attributes; i++) { |
| 454 | if (ctx->attributes[i].type == VASurfaceAttribMemoryType) | 460 | if (ctx->attributes[i].type == VASurfaceAttribMemoryType) |
| 455 | need_memory_type = 0; | 461 | need_memory_type = 0; |
| @@ -45,6 +45,12 @@ enum { · 44 unmodified lines | |||
| 45 | * separately afterwards. | 45 | * separately afterwards. |
| 46 | */ | 46 | */ |
| 47 | AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1), | 47 | AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1), |
| 48 | |||
| 49 | /** | ||
| 50 | * The driver does not support the VASurfaceAttribMemoryType attribute, | ||
| 51 | * so the surface allocation code will not try to use it. | ||
| 52 | */ | ||
| 53 | AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = (1 << 2), | ||
| 48 | }; | 54 | }; |
| 49 | 55 | ||
| 50 | /** | 56 | /** |
| @@ -79,7 +79,7 @@ · 78 unmodified lines | |||
| 79 | */ | 79 | */ |
| 80 | 80 | ||
| 81 | #define LIBAVUTIL_VERSION_MAJOR 55 | 81 | #define LIBAVUTIL_VERSION_MAJOR 55 |
| 82 | #define LIBAVUTIL_VERSION_MINOR 38 | 82 | #define LIBAVUTIL_VERSION_MINOR 39 |
| 83 | #define LIBAVUTIL_VERSION_MICRO 100 | 83 | #define LIBAVUTIL_VERSION_MICRO 100 |
| 84 | 84 | ||
| 85 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ | 85 | #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ |