summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Farnsworth <simon.farnsworth@onelan.co.uk>2012-09-27 18:05:46 +0100
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>2012-11-16 16:50:30 +0100
commitbad1dde737691252b25b9c540fa2ec9fde74efa1 (patch)
tree139b16f28d1a8243cfc7fd99c0a433c4c97b0a94
parent3eeea114b246466f90cf6807269a31a4bd1ec1b2 (diff)
vc1: use pixel-aspect-ratio from bitstream parser.
Signed-off-by: Simon Farnsworth <simon.farnsworth@onelan.co.uk> Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
-rw-r--r--gst-libs/gst/vaapi/gstvaapidecoder_vc1.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
index d54a18ae..96a58deb 100644
--- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
+++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
@@ -248,7 +248,7 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
GstVC1SeqStructC * const structc = &seq_hdr->struct_c;
GstVC1ParserResult result;
GstVaapiProfile profile;
- guint width, height, fps_n, fps_d;
+ guint width, height, fps_n, fps_d, par_n, par_d;
result = gst_vc1_parse_sequence_header(
rbdu->data + rbdu->offset,
@@ -275,6 +275,8 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
fps_n = 0;
fps_d = 0;
+ par_n = 0;
+ par_d = 0;
switch (seq_hdr->profile) {
case GST_VC1_PROFILE_SIMPLE:
case GST_VC1_PROFILE_MAIN:
@@ -321,6 +323,8 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
fps_d = frameratedr_table[adv_hdr->frameratedr];
}
}
+ par_n = adv_hdr->par_n;
+ par_d = adv_hdr->par_d;
break;
default:
g_assert(0 && "XXX: we already validated the profile above");
@@ -332,6 +336,9 @@ decode_sequence(GstVaapiDecoderVC1 *decoder, GstVC1BDU *rbdu, GstVC1BDU *ebdu)
gst_vaapi_decoder_set_framerate(base_decoder, priv->fps_n, priv->fps_d);
}
+ if (par_n > 0 && par_d > 0)
+ gst_vaapi_decoder_set_pixel_aspect_ratio(base_decoder, par_n, par_d);
+
switch (seq_hdr->profile) {
case GST_VC1_PROFILE_SIMPLE:
case GST_VC1_PROFILE_MAIN: