mfvideoenc: Disable RGB format support

Some GPUs support BGRA format and it will be converted to subsampled
YUV format by GPU internally. Disable this implicit conversion
since the conversion parameters such as input/output colorimetry
are not exposed nor it's written in bitstream (e.g., VUI).
We prefer explicit conversion via our conversion elements.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2410>
This commit is contained in:
Seungha Yang 2021-07-15 16:44:18 +09:00 committed by GStreamer Marge Bot
parent 67d482f8fb
commit 9becc1fe7e

View file

@ -1528,12 +1528,20 @@ gst_mf_video_enc_enum_internal (GstMFTransform * transform, GUID & subtype,
for (i = 0; i < info_size / sizeof (MFT_REGISTER_TYPE_INFO); i++) {
GstVideoFormat format;
const GstVideoFormatInfo *format_info;
GValue val = G_VALUE_INIT;
format = gst_mf_video_subtype_to_video_format (&infos[i].guidSubtype);
if (format == GST_VIDEO_FORMAT_UNKNOWN)
continue;
format_info = gst_video_format_get_info (format);
if (GST_VIDEO_FORMAT_INFO_IS_RGB (format_info)) {
GST_DEBUG_OBJECT (transform, "Skip %s format",
GST_VIDEO_FORMAT_INFO_NAME (format_info));
continue;
}
if (!supported_formats) {
supported_formats = g_new0 (GValue, 1);
g_value_init (supported_formats, GST_TYPE_LIST);