mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
cuda: Add YUY2 and UYVY formats for GL interop
Those formats are not supported conversion formats by CUDA convert/scale elements but would be useful for GL <-> CUDA interop use case. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2691>
This commit is contained in:
parent
d9f08e17f1
commit
ce82c0570e
3 changed files with 12 additions and 4 deletions
|
@ -185,6 +185,8 @@ gst_cuda_allocator_alloc_internal (GstCudaAllocator * self,
|
|||
case GST_VIDEO_FORMAT_BGR:
|
||||
case GST_VIDEO_FORMAT_BGR10A2_LE:
|
||||
case GST_VIDEO_FORMAT_RGB10A2_LE:
|
||||
case GST_VIDEO_FORMAT_YUY2:
|
||||
case GST_VIDEO_FORMAT_UYVY:
|
||||
alloc_info->stride[0] = pitch;
|
||||
alloc_info->offset[0] = 0;
|
||||
break;
|
||||
|
|
|
@ -40,18 +40,22 @@
|
|||
GST_DEBUG_CATEGORY_STATIC (gst_cuda_base_filter_debug);
|
||||
#define GST_CAT_DEFAULT gst_cuda_base_filter_debug
|
||||
|
||||
#define GST_CUDA_FILTER_FORMATS \
|
||||
"{ I420, YV12, NV12, NV21, P010_10LE, P016_LE, I420_10LE, Y444, Y444_16LE, " \
|
||||
"BGRA, RGBA, RGBx, BGRx, ARGB, ABGR, RGB, BGR, BGR10A2_LE, RGB10A2_LE, Y42B, I422_10LE, I422_12LE }"
|
||||
|
||||
static GstStaticPadTemplate sink_template = GST_STATIC_PAD_TEMPLATE ("sink",
|
||||
GST_PAD_SINK,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
|
||||
(GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, GST_CUDA_FORMATS))
|
||||
(GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, GST_CUDA_FILTER_FORMATS))
|
||||
);
|
||||
|
||||
static GstStaticPadTemplate src_template = GST_STATIC_PAD_TEMPLATE ("src",
|
||||
GST_PAD_SRC,
|
||||
GST_PAD_ALWAYS,
|
||||
GST_STATIC_CAPS (GST_VIDEO_CAPS_MAKE_WITH_FEATURES
|
||||
(GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, GST_CUDA_FORMATS))
|
||||
(GST_CAPS_FEATURE_MEMORY_CUDA_MEMORY, GST_CUDA_FILTER_FORMATS))
|
||||
);
|
||||
|
||||
#define gst_cuda_base_filter_parent_class parent_class
|
||||
|
|
|
@ -25,11 +25,13 @@ G_BEGIN_DECLS
|
|||
|
||||
#define GST_CUDA_FORMATS \
|
||||
"{ I420, YV12, NV12, NV21, P010_10LE, P016_LE, I420_10LE, Y444, Y444_16LE, " \
|
||||
"BGRA, RGBA, RGBx, BGRx, ARGB, ABGR, RGB, BGR, BGR10A2_LE, RGB10A2_LE, Y42B, I422_10LE, I422_12LE }"
|
||||
"BGRA, RGBA, RGBx, BGRx, ARGB, ABGR, RGB, BGR, BGR10A2_LE, RGB10A2_LE, " \
|
||||
"Y42B, I422_10LE, I422_12LE, YUY2, UYVY }"
|
||||
|
||||
#define GST_CUDA_GL_FORMATS \
|
||||
"{ I420, YV12, NV12, NV21, P010_10LE, P016_LE, Y444, " \
|
||||
"BGRA, RGBA, RGBx, BGRx, ARGB, ABGR, RGB, BGR, BGR10A2_LE, RGB10A2_LE }"
|
||||
"BGRA, RGBA, RGBx, BGRx, ARGB, ABGR, RGB, BGR, BGR10A2_LE, RGB10A2_LE, " \
|
||||
"YUY2, UYVY }"
|
||||
|
||||
#define GST_CUDA_D3D11_FORMATS \
|
||||
"{ I420, YV12, I420_10LE, Y444, Y444_16LE, " \
|
||||
|
|
Loading…
Reference in a new issue