[Libva] [LIBVA-INTEL-DRIVER][PATCH] Export the P010 surface attribute for HEVC/VP9 10-bits decoding

Zhao,Yakui yakui.zhao at intel.com
Tue Jul 19 07:33:46 UTC 2016


From: Zhao Yakui <yakui.zhao at intel.com>

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
 src/i965_drv_video.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index ad48f22..87363f3 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -5798,6 +5798,15 @@ i965_QuerySurfaceAttributes(VADriverContextP ctx,
                 attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;
                 attribs[i].value.value.i = VA_FOURCC_NV12;
                 i++;
+
+                if ((obj_config->profile == VAProfileHEVCMain10) ||
+                    (obj_config->profile == VAProfileVP9Profile2)) {
+                    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++;
+                }
             }
         } else if (obj_config->entrypoint == VAEntrypointEncSlice ||  /* encode */
                    obj_config->entrypoint == VAEntrypointVideoProc ||
-- 
1.8.5.dirty



More information about the Libva mailing list