summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/image.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2017-03-06 17:53:04 +0100
committerChristian König <[email protected]>2017-03-13 08:51:38 +0100
commite58a1e8f68b3b740d915468012573a4d7befb875 (patch)
tree7bbc8ca4c17c341d1e4f4b9fc57e7f5ff5ad7ff9 /src/gallium/state_trackers/va/image.c
parentf1d1deb0157fd011daa60d439157bb16f30566ca (diff)
st/va: add support for P010 and P016 formats v3
No hardware I know off can actually support P010 natively. But we can easily support P016 and as long as nobody decodes anything into the lower 6bits it doesn't make any difference to P010. v2: allow P0160 for post processing as well v3: fix post processing once more Signed-off-by: Christian König <[email protected]> Reviewed-by: Mark Thompson <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/image.c')
-rw-r--r--src/gallium/state_trackers/va/image.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/image.c b/src/gallium/state_trackers/va/image.c
index 2ce22cefe7c..f87de8e5c4e 100644
--- a/src/gallium/state_trackers/va/image.c
+++ b/src/gallium/state_trackers/va/image.c
@@ -41,6 +41,8 @@
static const VAImageFormat formats[] =
{
{VA_FOURCC('N','V','1','2')},
+ {VA_FOURCC('P','0','1','0')},
+ {VA_FOURCC('P','0','1','6')},
{VA_FOURCC('I','4','2','0')},
{VA_FOURCC('Y','V','1','2')},
{VA_FOURCC('Y','U','Y','V')},
@@ -134,6 +136,16 @@ vlVaCreateImage(VADriverContextP ctx, VAImageFormat *format, int width, int heig
img->data_size = w * h * 3 / 2;
break;
+ case VA_FOURCC('P','0','1','0'):
+ case VA_FOURCC('P','0','1','6'):
+ img->num_planes = 2;
+ img->pitches[0] = w * 2;
+ img->offsets[0] = 0;
+ img->pitches[1] = w * 2;
+ img->offsets[1] = w * h * 2;
+ img->data_size = w * h * 3;
+ break;
+
case VA_FOURCC('I','4','2','0'):
case VA_FOURCC('Y','V','1','2'):
img->num_planes = 3;