decoder: h264: add support for grayscale encoded clips.

Fix support for grayscale encoded video clips, and possibly others if
the underlying driver supports the non-YUV 4:2:0 formats. i.e. defer
the decision that a surface with the desired chroma format is not
supported to the actual VA driver implementation.

https://bugzilla.gnome.org/show_bug.cgi?id=728144
This commit is contained in:
Gwenole Beauchesne 2014-04-25 14:23:11 +02:00
parent dbf32a2521
commit fa7f9cd08c

View file

@ -851,7 +851,7 @@ ensure_context(GstVaapiDecoderH264 *decoder, GstH264SPS *sps)
}
chroma_type = gst_vaapi_utils_h264_get_chroma_type(sps->chroma_format_idc);
if (!chroma_type || chroma_type != GST_VAAPI_CHROMA_TYPE_YUV420) {
if (!chroma_type) {
GST_ERROR("unsupported chroma_format_idc %u", sps->chroma_format_idc);
return GST_VAAPI_DECODER_STATUS_ERROR_UNSUPPORTED_CHROMA_FORMAT;
}