libs: encoder: h264,h265: guard rate control's macroblock

macroblock parameter appear on VA-API 1.0.0. It should be guarded.
This commit is contained in:
Víctor Manuel Jáquez Leal 2017-11-27 12:18:56 +01:00
parent a7472ec4e8
commit bfc7f66708
2 changed files with 6 additions and 0 deletions

View file

@ -2497,8 +2497,11 @@ ensure_control_rate_params (GstVaapiEncoderH264 * encoder)
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).window_size = encoder->cpb_length;
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).initial_qp = encoder->init_qp;
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).min_qp = encoder->min_qp;
#if VA_CHECK_VERSION(1,0,0)
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).rc_flags.bits.mb_rate_control =
(guint) encoder->mbbrc;
#endif
/* HRD params */
fill_hrd_params (encoder, &GST_VAAPI_ENCODER_VA_HRD (encoder));

View file

@ -1833,8 +1833,11 @@ ensure_control_rate_params (GstVaapiEncoderH265 * encoder)
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).window_size = encoder->cpb_length;
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).initial_qp = encoder->init_qp;
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).min_qp = encoder->min_qp;
#if VA_CHECK_VERSION(1,0,0)
GST_VAAPI_ENCODER_VA_RATE_CONTROL (encoder).rc_flags.bits.mb_rate_control =
(guint) encoder->mbbrc;
#endif
/* HRD params */
fill_hrd_params (encoder, &GST_VAAPI_ENCODER_VA_HRD (encoder));