summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/va/config.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/va/config.c')
-rw-r--r--src/gallium/state_trackers/va/config.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/va/config.c b/src/gallium/state_trackers/va/config.c
index 2f96eb6cedf..da52a58c5db 100644
--- a/src/gallium/state_trackers/va/config.c
+++ b/src/gallium/state_trackers/va/config.c
@@ -195,6 +195,11 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
}
}
}
+
+ /* Default value if not specified in the input attributes. */
+ if (!config->rt_format)
+ config->rt_format = VA_RT_FORMAT_YUV420 | VA_RT_FORMAT_RGB32;
+
pipe_mutex_lock(drv->mutex);
*config_id = handle_table_add(drv->htab, config);
pipe_mutex_unlock(drv->mutex);
@@ -256,6 +261,10 @@ vlVaCreateConfig(VADriverContextP ctx, VAProfile profile, VAEntrypoint entrypoin
}
}
+ /* Default value if not specified in the input attributes. */
+ if (!config->rt_format)
+ config->rt_format = VA_RT_FORMAT_YUV420;
+
pipe_mutex_lock(drv->mutex);
*config_id = handle_table_add(drv->htab, config);
pipe_mutex_unlock(drv->mutex);