}
}
}
+
+ /* 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);
}
}
+ /* 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);
/* vlVaCreateConfig returns PIPE_VIDEO_PROFILE_UNKNOWN
* only for VAEntrypointVideoProc. */
if (config->profile == PIPE_VIDEO_PROFILE_UNKNOWN) {
- if (config->rt_format == VA_RT_FORMAT_RGB32) {
+ if (config->rt_format & VA_RT_FORMAT_RGB32) {
for (j = 0; j < ARRAY_SIZE(vpp_surface_formats); ++j) {
attribs[i].type = VASurfaceAttribPixelFormat;
attribs[i].value.type = VAGenericValueTypeInteger;
attribs[i].value.value.i = PipeFormatToVaFourcc(vpp_surface_formats[j]);
i++;
}
- } else if (config->rt_format == VA_RT_FORMAT_YUV420) {
+ }
+ if (config->rt_format & VA_RT_FORMAT_YUV420) {
attribs[i].type = VASurfaceAttribPixelFormat;
attribs[i].value.type = VAGenericValueTypeInteger;
attribs[i].flags = VA_SURFACE_ATTRIB_GETTABLE | VA_SURFACE_ATTRIB_SETTABLE;