autovideoconvert: Use cudaconvert for formats not allowed by glcolorconverts

There are some pixel formats supported by `cudaconvert` but not `glcolorconvert`
so prefer using `cudaconvert` for those cases rather than using
`videoconvertscale` and system memory

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/899>
This commit is contained in:
Thibault Saunier 2023-04-29 00:33:26 +02:00 committed by GStreamer Marge Bot
parent 9908d11dab
commit 9821c0ae96

View file

@ -134,6 +134,13 @@ gst_auto_video_convert_init (GstAutoVideoConvert * autovideoconvert)
.filters = { NULL },
.rank = GST_RANK_PRIMARY,
},
{ /* FIXME: Generically make it so we go through cudaconvert for formats not supported by `glcolorconvert` */
.first_elements = { "capsfilter caps=video/x-raw(ANY),format={I420_10LE,I422_10LE,I422_12LE}", "cudaupload", NULL },
.colorspace_converters = { "cudaconvert", NULL },
.last_elements = { "cudadownload", "capsfilter caps=video/x-raw(memory:GLMemory)", NULL },
.filters = { NULL },
.rank = GST_RANK_SECONDARY + 2,
},
{ /* CUDA -> GL */
.first_elements = { "capsfilter caps=video/x-raw(memory:CUDAMemory)", "cudadownload", NULL },
.colorspace_converters = { "glcolorconvert", "glcolorscale", "glcolorconvert", NULL },