aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <[email protected]>2017-03-07 15:23:39 +0100
committerChristian König <[email protected]>2017-03-13 08:51:41 +0100
commite9d3e29bb3225e1f6e8fdf56702979e86d92e675 (patch)
tree0ecbd2ef24ac7d7d4001e9f29a06a0882eec7abc
parente58a1e8f68b3b740d915468012573a4d7befb875 (diff)
st/va: add support for allocating 10bpp surfaces
We support P010 and P016 as targets for 10bpp video decoding. Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
-rw-r--r--src/gallium/state_trackers/va/surface.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/gallium/state_trackers/va/surface.c b/src/gallium/state_trackers/va/surface.c
index 543a00ac71f..c7d6ef7c8c3 100644
--- a/src/gallium/state_trackers/va/surface.c
+++ b/src/gallium/state_trackers/va/surface.c
@@ -431,21 +431,26 @@ vlVaQuerySurfaceAttributes(VADriverContextP ctx, VAConfigID config_id,
i++;
}
}
- if (config->rt_format & VA_RT_FORMAT_YUV420) {
- attribs[i].type = VASurfaceAttribPixelFormat;
- attribs[i].value.type = VAGenericValueTypeInteger;
- attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
- attribs[i].value.value.i = VA_FOURCC_NV12;
- i++;
- }
- } else {
- /* Assume VAEntrypointVLD for now. */
+ }
+ if (config->rt_format & VA_RT_FORMAT_YUV420) {
attribs[i].type = VASurfaceAttribPixelFormat;
attribs[i].value.type = VAGenericValueTypeInteger;
attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
attribs[i].value.value.i = VA_FOURCC_NV12;
i++;
}
+ if (config->rt_format & VA_RT_FORMAT_YUV420_10BPP) {
+ attribs[i].type = VASurfaceAttribPixelFormat;
+ attribs[i].value.type = VAGenericValueTypeInteger;
+ attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
+ attribs[i].value.value.i = VA_FOURCC_P010;
+ i++;
+ attribs[i].type = VASurfaceAttribPixelFormat;
+ attribs[i].value.type = VAGenericValueTypeInteger;
+ attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
+ attribs[i].value.value.i = VA_FOURCC_P016;
+ i++;
+ }
attribs[i].type = VASurfaceAttribMemoryType;
attribs[i].value.type = VAGenericValueTypeInteger;
@@ -658,6 +663,7 @@ vlVaCreateSurfaces2(VADriverContextP ctx, unsigned int format,
if (VA_RT_FORMAT_YUV420 != format &&
VA_RT_FORMAT_YUV422 != format &&
VA_RT_FORMAT_YUV444 != format &&
+ VA_RT_FORMAT_YUV420_10BPP != format &&
VA_RT_FORMAT_RGB32 != format) {
return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
}