diff options
author | Víctor Manuel Jáquez Leal <vjaquez@igalia.com> | 2017-03-27 09:05:40 -0700 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-03-29 08:29:46 +0800 |
commit | 437cbe03eaeb08e6f4ab70cdf8757bccb8de15dd (patch) | |
tree | 8cef7fe719626db4bca120624fd40fe28169a90d /src | |
parent | 228e4fc197e2a180dcbfcaba4df2a0717f6ec853 (diff) | |
download | libva-intel-driver-437cbe03eaeb08e6f4ab70cdf8757bccb8de15dd.tar.gz |
gen8: accept P010 as valid format
The functions gen8_gpe_set_surface2_state() and
gen8_gpe_media_chroma_surface_setup() asserts for the surface color
format, admiting only NV12.
Nonetheless, gen8 also can encoder surfaces with P010 color format.
This patch adds P010 color format in the assertion condition.
Fixes #106
Diffstat (limited to 'src')
-rw-r--r-- | src/i965_gpe_utils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/i965_gpe_utils.c b/src/i965_gpe_utils.c index 5010ccc7..061736f4 100644 --- a/src/i965_gpe_utils.c +++ b/src/i965_gpe_utils.c @@ -738,7 +738,8 @@ gen8_gpe_set_surface2_state(VADriverContextP ctx, unsigned int tiling, swizzle; assert(obj_surface->bo); - assert(obj_surface->fourcc == VA_FOURCC_NV12); + assert(obj_surface->fourcc == VA_FOURCC_NV12 + || obj_surface->fourcc == VA_FOURCC_P010); dri_bo_get_tiling(obj_surface->bo, &tiling, &swizzle); w = obj_surface->orig_width; @@ -899,7 +900,8 @@ gen8_gpe_media_chroma_surface_setup(VADriverContextP ctx, dri_bo *bo; int cbcr_offset; - assert(obj_surface->fourcc == VA_FOURCC_NV12); + assert(obj_surface->fourcc == VA_FOURCC_NV12 + || obj_surface->fourcc == VA_FOURCC_P010); bo = gpe_context->surface_state_binding_table.bo; dri_bo_map(bo, True); assert(bo->virtual); |