decoder: default to YUV 4:2:0 VA surfaces.
authorGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 25 Apr 2014 12:16:24 +0000 (14:16 +0200)
committerGwenole Beauchesne <gwenole.beauchesne@intel.com>
Fri, 25 Apr 2014 17:24:07 +0000 (19:24 +0200)
Cope with context changes to support non-YUV 4:2:0 VA surfaces. Still,
make sure all codecs use YUV 4:2:0 output format for now, by default.

gst-libs/gst/vaapi/gstvaapidecoder_h264.c
gst-libs/gst/vaapi/gstvaapidecoder_jpeg.c
gst-libs/gst/vaapi/gstvaapidecoder_mpeg2.c
gst-libs/gst/vaapi/gstvaapidecoder_mpeg4.c
gst-libs/gst/vaapi/gstvaapidecoder_vc1.c
gst-libs/gst/vaapi/gstvaapidecoder_vp8.c

index 69bef66..71979a6 100644 (file)
@@ -890,6 +890,7 @@ ensure_context(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
     /* XXX: fix surface size when cropping is implemented */
     info.profile    = priv->profile;
     info.entrypoint = priv->entrypoint;
+    info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
     info.width      = sps->width;
     info.height     = sps->height;
     info.ref_frames = get_max_dec_frame_buffering(sps);
index 5f68096..a45ab8f 100644 (file)
@@ -191,6 +191,7 @@ ensure_context(GstVaapiDecoderJpeg *decoder)
 
         info.profile    = priv->profile;
         info.entrypoint = entrypoint;
+        info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
         info.width      = priv->width;
         info.height     = priv->height;
         info.ref_frames = 2;
index 39b6737..3f30f0b 100644 (file)
@@ -435,6 +435,7 @@ ensure_context(GstVaapiDecoderMpeg2 *decoder)
 
         info.profile    = priv->hw_profile;
         info.entrypoint = entrypoint;
+        info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
         info.width      = priv->width;
         info.height     = priv->height;
         info.ref_frames = 2;
index a4fd9ef..b461877 100644 (file)
@@ -222,6 +222,7 @@ ensure_context(GstVaapiDecoderMpeg4 *decoder)
 
         info.profile    = priv->profile;
         info.entrypoint = entrypoint;
+        info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
         info.width      = priv->width;
         info.height     = priv->height;
         info.ref_frames = 2;
index bdddbea..780e15d 100644 (file)
@@ -215,6 +215,7 @@ ensure_context(GstVaapiDecoderVC1 *decoder)
 
         info.profile    = priv->profile;
         info.entrypoint = entrypoint;
+        info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
         info.width      = priv->width;
         info.height     = priv->height;
         info.ref_frames = 2;
index c7d2285..0b371b3 100644 (file)
@@ -173,6 +173,7 @@ ensure_context (GstVaapiDecoderVp8 * decoder)
 
     info.profile = priv->profile;
     info.entrypoint = entrypoint;
+    info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
     info.width = priv->width;
     info.height = priv->height;
     info.ref_frames = 3;