summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/config.c
diff options
context:
space:
mode:
authorJulien Isorce <[email protected]>2015-10-30 11:42:49 +0000
committerChristian König <[email protected]>2015-10-30 13:20:29 +0100
commit1bdea0e5793a466d098dc3a34ce39798a17aa207 (patch)
tree00b391ee4d7fd4cdced7cf1409540d3d0b119889 /src/gallium/state_trackers/va/config.c
parent0b868807e4d6f209d5fec9948a5994936138ffcc (diff)
st/va: handle Video Post Processing for configs
Add support for VA_PROFILE_NONE and VAEntrypointVideoProc in the 4 following functions: vlVaQueryConfigProfiles vlVaQueryConfigEntrypoints vlVaCreateConfig vlVaQueryConfigAttributes Signed-off-by: Julien Isorce <[email protected]> Reviewed-by: Emil Velikov <[email protected]> Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/va/config.c')
-rw-r--r--src/gallium/state_trackers/va/config.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
index 5030f9e5d43..0f47aacdbd6 100644
--- a/src/gallium/state_trackers/va/config.c
+++ b/src/gallium/state_trackers/va/config.c
@@ -52,6 +52,9 @@ vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int *num_
profile_list[(*num_profiles)++] = vap;
}
+ /* Support postprocessing through vl_compositor */
+ profile_list[(*num_profiles)++] = VAProfileNone;
+
return VA_STATUS_SUCCESS;
}
@@ -67,6 +70,11 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
*num_entrypoints = 0;
+ if (profile == VAProfileNone) {
+ entrypoint_list[(*num_entrypoints)++] = VAEntrypointVideoProc;
+ return VA_STATUS_SUCCESS;
+ }
+
p = ProfileToPipe(profile);
if (p == PIPE_VIDEO_PROFILE_UNKNOWN)
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
@@ -118,6 +126,11 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
if (!ctx)
return VA_STATUS_ERROR_INVALID_CONTEXT;
+ if (profile == VAProfileNone && entrypoint == VAEntrypointVideoProc) {
+ *config_id = PIPE_VIDEO_PROFILE_UNKNOWN;
+ return VA_STATUS_SUCCESS;
+ }
+
p = ProfileToPipe(profile);
if (p == PIPE_VIDEO_PROFILE_UNKNOWN)
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
@@ -151,6 +164,13 @@ vlVaQueryConfigAttributes(VADriverContextP ctx, VAConfigID config_id, VAProfile
return VA_STATUS_ERROR_INVALID_CONTEXT;
*profile = PipeToProfile(config_id);
+
+ if (config_id == PIPE_VIDEO_PROFILE_UNKNOWN) {
+ *entrypoint = VAEntrypointVideoProc;
+ *num_attribs = 0;
+ return VA_STATUS_SUCCESS;
+ }
+
*entrypoint = VAEntrypointVLD;
*num_attribs = 1;