Export the surface attribute based on YV16 for VPP on Gen7+
authorZhao Yakui <yakui.zhao@intel.com>
Fri, 14 Mar 2014 07:16:20 +0000 (15:16 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 23 Apr 2014 06:16:20 +0000 (14:16 +0800)
Reviewed-by: Wind Yuan <feng.yuan@intel.com>
Tested-by: Wind Yuan <feng.yuan@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 94f415b29ee197f66281370801a9c3bd4240c928)

src/i965_drv_video.c

index 6bd6c30..3470ba9 100755 (executable)
@@ -4648,6 +4648,12 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
                 attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
                 attribs[i].value.value.i = VA_FOURCC('R', 'G', 'B', 'X');
                 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('Y', 'V', '1', '6');
+                i++;
             }
         }
     } else if (IS_GEN8(i965->intel.device_id)) {
@@ -4758,6 +4764,12 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
                 attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
                 attribs[i].value.value.i = VA_FOURCC('B', 'G', 'R', 'X');
                 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('Y', 'V', '1', '6');
+                i++;
             }
         }
     }