diff options
author | Scott D Phillips <scott.d.phillips@intel.com> | 2016-08-26 14:55:17 -0700 |
---|---|---|
committer | Víctor Manuel Jáquez Leal <victorx.jaquez@intel.com> | 2016-09-05 12:33:03 +0200 |
commit | 2eb439416de641c56d09efa4a33671ab983eac12 (patch) | |
tree | e2fd740323dfba1ab8b578013f11d7b21b5cf601 | |
parent | 58d5d6068171c7543016d427d93277d36c8af262 (diff) |
decoder: vc1: Fail only on actual interlaced frames
In the earlier patch:
f31d9f3 decoder: vc1: Print error on interlaced content
Decoding would error out if the interlace flag was set in the
sequence bdu. This isn't quite right because a video can have this
flag set and yet not have any interlaced pictures.
Here instead we error out when either parsing a field bdu or
decoding a frame bdu which has fcm set to anything other than
progressive.
Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
https://bugzilla.gnome.org/show_bug.cgi?id=769250
-rw-r--r-- | gst-libs/gst/vaapi/gstvaapidecoder_vc1.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c index 00ee16ae..7cfd4d28 100644 --- a/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c +++ b/gst-libs/gst/vaapi/gstvaapidecoder_vc1.c @@ -276,11 +276,6 @@ decode_sequence (GstVaapiDecoderVC1 * decoder, GstVC1BDU * rbdu, priv->has_entrypoint = FALSE; - if (adv_hdr->interlace != 0) { - GST_ERROR ("interlaced sequence unsupported"); - return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE; - } - /* Reset POC */ if (priv->last_non_b_picture) { if (priv->last_non_b_picture->poc == priv->next_poc) @@ -962,6 +957,11 @@ decode_frame (GstVaapiDecoderVC1 * decoder, GstVC1BDU * rbdu, GstVC1BDU * ebdu) return get_status (result); } + if (frame_hdr->pic.advanced.fcm != GST_VC1_FRAME_PROGRESSIVE) { + GST_ERROR ("interlaced video not supported"); + return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE; + } + switch (frame_hdr->ptype) { case GST_VC1_PICTURE_TYPE_I: picture->type = GST_VAAPI_PICTURE_TYPE_I; @@ -1303,6 +1303,9 @@ gst_vaapi_decoder_vc1_parse (GstVaapiDecoder * base_decoder, case GST_VC1_SLICE: flags |= GST_VAAPI_DECODER_UNIT_FLAG_SLICE; break; + case GST_VC1_FIELD: + GST_ERROR ("interlaced video not supported"); + return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE; } GST_VAAPI_DECODER_UNIT_FLAG_SET (unit, flags); return GST_VAAPI_DECODER_STATUS_SUCCESS; |