From 8d4fa46f1f6f867d351ab2869b863ab33ff55358 Mon Sep 17 00:00:00 2001 From: Gwenole Beauchesne Date: Thu, 27 Nov 2014 11:13:20 +0200 Subject: [PATCH 1/1] encoder: h264: fix pixel-aspect-ratio in encoded stream. Really 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. really make sure VUI parameter aspect_ratio_info_present_flag is set to TRUE and that the indication from aspect_ratio_idc is Extended_SAR. This is a leftover from git commit a12662f. https://bugzilla.gnome.org/show_bug.cgi?id=740360 Change-Id: I092ef22038c4862dae645d58c59be0cd5b506fc5 Bug-Tizen: TC-2113/part Origin: upstream --- gst-libs/gst/vaapi/gstvaapiencoder_h264.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c index ee74020..d2afd5f 100644 --- a/gst-libs/gst/vaapi/gstvaapiencoder_h264.c +++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264.c @@ -1701,9 +1701,10 @@ fill_sequence (GstVaapiEncoderH264 * encoder, GstVaapiEncSequence * sequence) /* 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.aspect_ratio_info_present_flag = TRUE; if (seq_param->vui_fields.bits.aspect_ratio_info_present_flag) { const GstVideoInfo *const vip = GST_VAAPI_ENCODER_VIDEO_INFO (encoder); + seq_param->aspect_ratio_idc = 0xff; seq_param->sar_width = GST_VIDEO_INFO_PAR_N (vip); seq_param->sar_height = GST_VIDEO_INFO_PAR_D (vip); } -- 2.7.4