mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
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:
parent
67d482f8fb
commit
9becc1fe7e
1 changed files with 8 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue