summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i965_drv_video.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/i965_drv_video.c b/src/i965_drv_video.c
index 729bd081..fa7c390b 100644
--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1112,7 +1112,8 @@ i965_GetConfigAttributes(VADriverContextP ctx,
break;
case VAConfigAttribDecSliceMode:
- attrib_list[i].value = VA_DEC_SLICE_MODE_NORMAL;
+ if (entrypoint == VAEntrypointVLD)
+ attrib_list[i].value = VA_DEC_SLICE_MODE_NORMAL;
break;
case VAConfigAttribEncROI:
@@ -1428,6 +1429,17 @@ i965_CreateConfig(VADriverContextP ctx,
vaStatus = i965_append_config_attribute(obj_config, &attrib);
}
+ if (vaStatus == VA_STATUS_SUCCESS) {
+ VAConfigAttrib *attrib_found;
+
+ attrib_found = i965_lookup_config_attribute(obj_config, VAConfigAttribDecSliceMode);
+
+ if (attrib_found &&
+ (entrypoint != VAEntrypointVLD ||
+ attrib_found->value != VA_DEC_SLICE_MODE_NORMAL))
+ vaStatus = VA_STATUS_ERROR_INVALID_VALUE;
+ }
+
if ((vaStatus == VA_STATUS_SUCCESS) &&
(profile == VAProfileVP9Profile0) &&
(entrypoint == VAEntrypointVLD) &&