decoder: default to YUV 4:2:0 VA surfaces.

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.
This commit is contained in:
Gwenole Beauchesne 2014-04-25 14:16:24 +02:00
parent 1b79049317
commit dbf32a2521
6 changed files with 6 additions and 0 deletions

View file

@ -890,6 +890,7 @@ ensure_context(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
/* XXX: fix surface size when cropping is implemented */ /* XXX: fix surface size when cropping is implemented */
info.profile = priv->profile; info.profile = priv->profile;
info.entrypoint = priv->entrypoint; info.entrypoint = priv->entrypoint;
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
info.width = sps->width; info.width = sps->width;
info.height = sps->height; info.height = sps->height;
info.ref_frames = get_max_dec_frame_buffering(sps); info.ref_frames = get_max_dec_frame_buffering(sps);

View file

@ -191,6 +191,7 @@ ensure_context(GstVaapiDecoderJpeg *decoder)
info.profile = priv->profile; info.profile = priv->profile;
info.entrypoint = entrypoint; info.entrypoint = entrypoint;
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
info.width = priv->width; info.width = priv->width;
info.height = priv->height; info.height = priv->height;
info.ref_frames = 2; info.ref_frames = 2;

View file

@ -435,6 +435,7 @@ ensure_context(GstVaapiDecoderMpeg2 *decoder)
info.profile = priv->hw_profile; info.profile = priv->hw_profile;
info.entrypoint = entrypoint; info.entrypoint = entrypoint;
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
info.width = priv->width; info.width = priv->width;
info.height = priv->height; info.height = priv->height;
info.ref_frames = 2; info.ref_frames = 2;

View file

@ -222,6 +222,7 @@ ensure_context(GstVaapiDecoderMpeg4 *decoder)
info.profile = priv->profile; info.profile = priv->profile;
info.entrypoint = entrypoint; info.entrypoint = entrypoint;
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
info.width = priv->width; info.width = priv->width;
info.height = priv->height; info.height = priv->height;
info.ref_frames = 2; info.ref_frames = 2;

View file

@ -215,6 +215,7 @@ ensure_context(GstVaapiDecoderVC1 *decoder)
info.profile = priv->profile; info.profile = priv->profile;
info.entrypoint = entrypoint; info.entrypoint = entrypoint;
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
info.width = priv->width; info.width = priv->width;
info.height = priv->height; info.height = priv->height;
info.ref_frames = 2; info.ref_frames = 2;

View file

@ -173,6 +173,7 @@ ensure_context (GstVaapiDecoderVp8 * decoder)
info.profile = priv->profile; info.profile = priv->profile;
info.entrypoint = entrypoint; info.entrypoint = entrypoint;
info.chroma_type = GST_VAAPI_CHROMA_TYPE_YUV420;
info.width = priv->width; info.width = priv->width;
info.height = priv->height; info.height = priv->height;
info.ref_frames = 3; info.ref_frames = 3;