vpp: expose BGRA surface formats on Ivybridge and Haswell. 89/30289/1 sandbox/pcoval/latest accepted/tizen/common/20141126.163030 accepted/tizen/ivi/20141201.122140 submit/tizen/20141126.102545 submit/tizen_ivi/20141201.111111
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Mon, 8 Sep 2014 17:06:21 +0000 (19:06 +0200)
committerPhilippe Coval <philippe.coval@open.eurogiciel.org>
Thu, 13 Nov 2014 16:58:28 +0000 (17:58 +0100)
Allow for vaQuerySurfaceAttributes() to return BGRA and BGRX formats
for VPP on Ivybridge and Haswell. This is supported as both source
and target surface formats.

This fixes VA/EGL interop on Gen7 processors when a BGR[AX] surface
is exported into an EGLImage.

Change-Id: I94f0b174223f94b0a1155e32a17bb23ffb2792cf
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Bug-Tizen: TC-1195/related

src/i965_drv_video.c

index ba7c7be..df32813 100644 (file)
@@ -4998,6 +4998,18 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
                 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_BGRA;
+                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_BGRX;
+                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_YV16;
                 i++;
             }