[Libva] [PATCH 6/6 v2 965 driver] add YUY2 support in i965_GetSurfaceAttributes, fix a small issue

Zhao Halley halley.zhao at intel.com
Tue Jun 26 23:45:22 PDT 2012


---
 src/i965_drv_video.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 02dfacc..6b44bba 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -3569,7 +3569,7 @@ i965_GetSurfaceAttributes(
     if (obj_config == NULL)
         return VA_STATUS_ERROR_INVALID_CONFIG;
     
-    if (attrib_list == NULL || num_attribs)
+    if (attrib_list == NULL || num_attribs == 0)
         return VA_STATUS_ERROR_INVALID_PARAMETER;
 
     for (i = 0; i < num_attribs; i++) {
@@ -3638,7 +3638,8 @@ i965_GetSurfaceAttributes(
                     } else if (obj_config->profile == VAProfileNone) {
                         if (attrib_list[i].value.value.i != VA_FOURCC('N', 'V', '1', '2') &&
                             attrib_list[i].value.value.i != VA_FOURCC('I', '4', '2', '0') &&
-                            attrib_list[i].value.value.i != VA_FOURCC('Y', 'V', '1', '2')) {
+                            attrib_list[i].value.value.i != VA_FOURCC('Y', 'V', '1', '2') && 
+                            attrib_list[i].value.value.i != VA_FOURCC('Y', 'U', 'Y', '2')) {
                             attrib_list[i].value.value.i = 0;                            
                             attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE;
                         }
@@ -3651,7 +3652,8 @@ i965_GetSurfaceAttributes(
                         obj_config->entrypoint == VAEntrypointVideoProc) {
                         if (attrib_list[i].value.value.i != VA_FOURCC('N', 'V', '1', '2') &&
                             attrib_list[i].value.value.i != VA_FOURCC('I', '4', '2', '0') &&
-                            attrib_list[i].value.value.i != VA_FOURCC('Y', 'V', '1', '2')) {
+                            attrib_list[i].value.value.i != VA_FOURCC('Y', 'V', '1', '2') && 
+                            attrib_list[i].value.value.i != VA_FOURCC('Y', 'U', 'Y', '2')) {
                             attrib_list[i].value.value.i = 0;                            
                             attrib_list[i].flags &= ~VA_SURFACE_ATTRIB_SETTABLE;
                         }
-- 
1.7.4.1



More information about the Libva mailing list