mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
encoder: h264: add pixel-aspect-ratio to VUI parameters.
Report sample aspect ratio (SAR) as present, and make it match what we have obtained from the user as pixel-aspect-ratio (PAR). i.e. the VUI parameter aspect_ratio_info_present_flag now defaults to TRUE.
This commit is contained in:
parent
a4bd8450f7
commit
a12662fd3e
1 changed files with 5 additions and 0 deletions
|
@ -1697,6 +1697,11 @@ fill_sequence (GstVaapiEncoderH264 * encoder, GstVaapiEncSequence * sequence)
|
|||
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;
|
||||
if (seq_param->vui_fields.bits.aspect_ratio_info_present_flag) {
|
||||
const GstVideoInfo *const vip = GST_VAAPI_ENCODER_VIDEO_INFO (encoder);
|
||||
seq_param->sar_width = GST_VIDEO_INFO_PAR_N (vip);
|
||||
seq_param->sar_height = GST_VIDEO_INFO_PAR_D (vip);
|
||||
}
|
||||
seq_param->vui_fields.bits.bitstream_restriction_flag = FALSE;
|
||||
/* if vui_parameters_present_flag is TRUE and sps data belongs to
|
||||
* subset sps, timing_info_preset_flag should be zero (H.7.4.2.1.1) */
|
||||
|
|
Loading…
Reference in a new issue