[Libva] [libva-intel-driver][PATCH] Add support for VAConfigAttribDecSliceMode

Xiang, Haihao haihao.xiang at intel.com
Tue Jul 29 18:41:24 PDT 2014


From: "Xiang, Haihao" <haihao.xiang at intel.com>

So far the driver only supports Normal mode for decoding

Signed-off-by: Xiang, Haihao <haihao.xiang at intel.com>
---
 src/i965_drv_video.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 593691d..6185819 100755
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -707,6 +707,11 @@ i965_GetConfigAttributes(VADriverContextP ctx,
 		break;
 	    }
 
+        case VAConfigAttribDecSliceMode:
+            if (entrypoint == VAEntrypointVLD)
+                attrib_list[i].value = VA_DEC_SLICE_MODE_NORMAL;
+            break;
+
         default:
             /* Do nothing */
             attrib_list[i].value = VA_ATTRIB_NOT_SUPPORTED;
@@ -814,6 +819,17 @@ i965_CreateConfig(VADriverContextP ctx,
             vaStatus = i965_append_config_attribute(obj_config, &attrib);
         else if (!(attrib_found->value & attrib.value))
             vaStatus = VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT;
+
+        if (entrypoint == VAEntrypointVLD) {
+            attrib.type = VAConfigAttribDecSliceMode;
+            attrib.value = VA_DEC_SLICE_MODE_NORMAL;
+            attrib_found = i965_lookup_config_attribute(obj_config, attrib.type);
+            if (!attrib_found || !attrib_found->value)
+                vaStatus = i965_append_config_attribute(obj_config, &attrib);
+            else if (attrib_found->value != attrib.value)
+                vaStatus = VA_STATUS_ERROR_UNKNOWN;
+        }
+
     }
 
     /* Error recovery */
-- 
1.8.3.2



More information about the Libva mailing list