mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
Add mapping for Macroblock level rate control (VA_RC_MB)
This commit is contained in:
parent
c1abf37d0b
commit
8c1cfbaa1e
3 changed files with 12 additions and 0 deletions
|
@ -146,6 +146,7 @@ typedef enum {
|
|||
* @GST_VAAPI_RATECONTROL_VBR: Variable bitrate
|
||||
* @GST_VAAPI_RATECONTROL_VBR_CONSTRAINED: Variable bitrate with peak
|
||||
* rate higher than average bitrate
|
||||
* @GST_VAAPI_RATECONTROL_MB: Macroblock based rate control
|
||||
*
|
||||
* The set of allowed rate control values for #GstVaapiRateControl.
|
||||
* Note: this is only valid for encoders.
|
||||
|
@ -157,6 +158,7 @@ typedef enum {
|
|||
GST_VAAPI_RATECONTROL_VCM,
|
||||
GST_VAAPI_RATECONTROL_VBR,
|
||||
GST_VAAPI_RATECONTROL_VBR_CONSTRAINED,
|
||||
GST_VAAPI_RATECONTROL_MB,
|
||||
} GstVaapiRateControl;
|
||||
|
||||
/* Define a mask for GstVaapiRateControl */
|
||||
|
|
|
@ -543,6 +543,10 @@ from_GstVaapiRateControl (guint value)
|
|||
#ifdef VA_RC_VBR_CONSTRAINED
|
||||
case GST_VAAPI_RATECONTROL_VBR_CONSTRAINED:
|
||||
return VA_RC_VBR_CONSTRAINED;
|
||||
#endif
|
||||
#ifdef VA_RC_MB
|
||||
case GST_VAAPI_RATECONTROL_MB:
|
||||
return VA_RC_MB;
|
||||
#endif
|
||||
}
|
||||
GST_ERROR ("unsupported GstVaapiRateControl value %u", value);
|
||||
|
@ -568,6 +572,10 @@ to_GstVaapiRateControl (guint value)
|
|||
#ifdef VA_RC_VBR_CONSTRAINED
|
||||
case VA_RC_VBR_CONSTRAINED:
|
||||
return GST_VAAPI_RATECONTROL_VBR_CONSTRAINED;
|
||||
#endif
|
||||
#ifdef VA_RC_MB
|
||||
case VA_RC_MB:
|
||||
return GST_VAAPI_RATECONTROL_MB;
|
||||
#endif
|
||||
}
|
||||
GST_ERROR ("unsupported VA-API Rate Control value %u", value);
|
||||
|
|
|
@ -143,6 +143,8 @@ gst_vaapi_rate_control_get_type (void)
|
|||
"Variable bitrate", "vbr"},
|
||||
{GST_VAAPI_RATECONTROL_VBR_CONSTRAINED,
|
||||
"Variable bitrate - Constrained", "vbr_constrained"},
|
||||
{GST_VAAPI_RATECONTROL_MB,
|
||||
"Macroblock based rate control", "mb"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue