libs: macro to get a renamed value in VA-API 1.0

In VA-API 1.0 the union bits in VAEncMiscParameterBufferROI has
renamed one member from roi_value_is_qp_delat to
roi_value_is_qp_delta, which is the correct name.

In order to keep back compatibility a macro has added to access this
union member.

https://bugzilla.gnome.org/show_bug.cgi?id=784398
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-08-17 12:44:40 +02:00
parent 466c0548dc
commit e8148cea0d
3 changed files with 9 additions and 3 deletions

View file

@ -37,6 +37,12 @@
#define vaAssociateSubpicture vaAssociateSubpicture2
#endif
#if VA_CHECK_VERSION(1,0,0)
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delta_support
#else
#define VA_ROI_RC_QP_DELTA_SUPPORT(x) x->bits.roi_rc_qp_delat_support
#endif
/* Compatibility glue with VA-API 0.34 */
#if VA_CHECK_VERSION(0,34,0)
# include <va/va_compat.h>

View file

@ -317,10 +317,10 @@ config_create (GstVaapiContext * context)
goto cleanup;
roi_config = (VAConfigAttribValEncROI *) & value;
if (roi_config->bits.num_roi_regions != config->roi_num_supported ||
roi_config->bits.roi_rc_qp_delat_support == 0) {
VA_ROI_RC_QP_DELTA_SUPPORT (roi_config) == 0) {
GST_ERROR ("ROI unsupported - number of regions supported: %d"
" ROI delta QP: %d", roi_config->bits.num_roi_regions,
roi_config->bits.roi_rc_qp_delat_support);
VA_ROI_RC_QP_DELTA_SUPPORT (roi_config));
goto cleanup;
}
attrib->value = value;

View file

@ -657,7 +657,7 @@ get_roi_capability (GstVaapiEncoder * encoder, guint * num_roi_supported)
roi_config = (VAConfigAttribValEncROI *) & value;
if (roi_config->bits.num_roi_regions == 0 ||
roi_config->bits.roi_rc_qp_delat_support == 0)
VA_ROI_RC_QP_DELTA_SUPPORT (roi_config) == 0)
return FALSE;
GST_INFO ("Support for ROI - number of regions supported: %d",