gldownload: download RGB, BGR and BGRA with dmabuf

Allow these formats to be downloaded using ION backed dmabufs,
which is orders of magnitude faster than PBO transfers.

This change depends on an updated imx-gpu-viv and allows for GPU
based conversions from YUV (camera, VPU) to inference friendly
RGB (not RGBA) at the native source rate (30 fps).

Change-Id: I04c3ca9261d9ba911dff14c0df9b996637b481fb
diff --git a/ext/gl/gstgldownloadelement.c b/ext/gl/gstgldownloadelement.c
index 8b4ea4b..d3c2290 100644
--- a/ext/gl/gstgldownloadelement.c
+++ b/ext/gl/gstgldownloadelement.c
@@ -518,8 +518,11 @@
 
   GST_DEBUG_OBJECT (bt, "video format is %s", gst_video_format_to_string (fmt));
 
-#if GST_GL_HAVE_IONDMA
-  if (fmt == GST_VIDEO_FORMAT_RGBA || fmt == GST_VIDEO_FORMAT_RGB16) {
+  #if GST_GL_HAVE_IONDMA
+  if (fmt == GST_VIDEO_FORMAT_RGBA || fmt == GST_VIDEO_FORMAT_RGB16 ||
+      fmt == GST_VIDEO_FORMAT_RGB ||
+      fmt == GST_VIDEO_FORMAT_BGRA ||
+      fmt == GST_VIDEO_FORMAT_BGR ) {
     allocator = gst_gl_memory_dma_allocator_obtain ();
     GST_DEBUG_OBJECT (bt, "obtain dma memory allocator %p.", allocator);
   }