mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-10 03:19:40 +00:00
FEI: libs: Add FEI functional mode configuration
FEI Entrypoint can work in either one of the 3 different modes: VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK or VA_FEI_FUNCTION_ENC_PAK. Add infrastructure in gstvaapicontext and gstvaapiencoder for this functioal mode configuration. https://bugzilla.gnome.org/show_bug.cgi?id=785712 https://bugzilla.gnome.org/show_bug.cgi?id=784667
This commit is contained in:
parent
6bbe79925c
commit
7d77cdd9f7
3 changed files with 13 additions and 1 deletions
|
@ -229,7 +229,7 @@ config_create (GstVaapiContext * context)
|
|||
{
|
||||
const GstVaapiContextInfo *const cip = &context->info;
|
||||
GstVaapiDisplay *const display = GST_VAAPI_OBJECT_DISPLAY (context);
|
||||
VAConfigAttrib attribs[6], *attrib;
|
||||
VAConfigAttrib attribs[7], *attrib;
|
||||
VAStatus status;
|
||||
guint value, va_chroma_format, attrib_index;
|
||||
|
||||
|
@ -327,6 +327,14 @@ config_create (GstVaapiContext * context)
|
|||
attrib = &attribs[attrib_index++];
|
||||
g_assert (attrib_index < G_N_ELEMENTS (attribs));
|
||||
}
|
||||
#endif
|
||||
#if USE_H264_FEI_ENCODER
|
||||
if (cip->entrypoint == GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_FEI) {
|
||||
attrib->type = (VAConfigAttribType) VAConfigAttribFEIFunctionType;
|
||||
attrib = &attribs[attrib_index++];
|
||||
g_assert (attrib_index < G_N_ELEMENTS (attribs));
|
||||
/* FIXME: Query the read-only supported MV predictors */
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -62,6 +62,7 @@ typedef enum {
|
|||
* @packed_headers: notify encoder that packed headers are submitted (mask).
|
||||
* @roi_capability: if encoder supports regions-of-interest.
|
||||
* @roi_num_supported: The number of regions-of-interest supported.
|
||||
* @fei_function: The functional mode for FEI Entrypoint (VA_FEI_FUNCTION_*).
|
||||
*
|
||||
* Extra configuration for encoding.
|
||||
*/
|
||||
|
@ -71,6 +72,7 @@ struct _GstVaapiConfigInfoEncoder
|
|||
guint packed_headers;
|
||||
gboolean roi_capability;
|
||||
guint roi_num_supported;
|
||||
guint fei_function;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
@ -747,6 +747,7 @@ set_context_info (GstVaapiEncoder * encoder)
|
|||
GstVaapiConfigInfoEncoder *const config = &cip->config.encoder;
|
||||
const GstVideoFormat format =
|
||||
GST_VIDEO_INFO_FORMAT (GST_VAAPI_ENCODER_VIDEO_INFO (encoder));
|
||||
guint fei_function = config->fei_function;
|
||||
|
||||
init_context_info (encoder, cip, get_profile (encoder));
|
||||
|
||||
|
@ -762,6 +763,7 @@ set_context_info (GstVaapiEncoder * encoder)
|
|||
config->packed_headers = get_packed_headers (encoder);
|
||||
config->roi_capability =
|
||||
get_roi_capability (encoder, &config->roi_num_supported);
|
||||
config->fei_function = fei_function;
|
||||
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in a new issue