encoder: h264: always emit VUI parameters for framerate.

Always emit VUI parameters for timing_info, which includes framerate
information.
This commit is contained in:
Gwenole Beauchesne 2014-01-15 15:46:19 +01:00
parent 5f5df3f723
commit 391ad15ba0

View file

@ -1014,14 +1014,12 @@ fill_va_sequence_param (GstVaapiEncoderH264 * encoder,
GST_VAAPI_ENCODER_HEIGHT (encoder)) / CropUnitY;
}
/* vui not set */
seq_param->vui_parameters_present_flag =
(base_encoder->bitrate > 0 ? TRUE : FALSE);
/* VUI parameters are always set, at least for timing_info (framerate) */
seq_param->vui_parameters_present_flag = TRUE;
if (seq_param->vui_parameters_present_flag) {
seq_param->vui_fields.bits.aspect_ratio_info_present_flag = FALSE;
seq_param->vui_fields.bits.bitstream_restriction_flag = FALSE;
seq_param->vui_fields.bits.timing_info_present_flag =
(base_encoder->bitrate > 0 ? TRUE : FALSE);
seq_param->vui_fields.bits.timing_info_present_flag = TRUE;
if (seq_param->vui_fields.bits.timing_info_present_flag) {
seq_param->num_units_in_tick = GST_VAAPI_ENCODER_FPS_D (encoder);
seq_param->time_scale = GST_VAAPI_ENCODER_FPS_N (encoder) * 2;