decoder: vc1: fails only on advanced profile
authorVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 6 Sep 2016 09:19:05 +0000 (11:19 +0200)
committerVíctor Manuel Jáquez Leal <victorx.jaquez@intel.com>
Tue, 6 Sep 2016 10:39:22 +0000 (12:39 +0200)
In commit 2eb4394 the frame coding mode was verified for progressive
regardless the profile. But the FCM is only valid in the advanced
profile. This patch checks for the advanced profile before verifying FCM for
progressive.

https://bugzilla.gnome.org/show_bug.cgi?id=769250

gst-libs/gst/vaapi/gstvaapidecoder_vc1.c

index 7cfd4d2..b7929a3 100644 (file)
@@ -957,7 +957,9 @@ decode_frame (GstVaapiDecoderVC1 * decoder, GstVC1BDU * rbdu, GstVC1BDU * ebdu)
     return get_status (result);
   }
 
-  if (frame_hdr->pic.advanced.fcm != GST_VC1_FRAME_PROGRESSIVE) {
+  /* @FIXME: intel-driver cannot handle interlaced frames */
+  if (priv->profile == GST_VAAPI_PROFILE_VC1_ADVANCED
+      && frame_hdr->pic.advanced.fcm != GST_VC1_FRAME_PROGRESSIVE) {
     GST_ERROR ("interlaced video not supported");
     return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE;
   }
@@ -1304,6 +1306,7 @@ gst_vaapi_decoder_vc1_parse (GstVaapiDecoder * base_decoder,
       flags |= GST_VAAPI_DECODER_UNIT_FLAG_SLICE;
       break;
     case GST_VC1_FIELD:
+      /* @FIXME: intel-driver cannot handle interlaced frames */
       GST_ERROR ("interlaced video not supported");
       return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_PROFILE;
   }