diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.c b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.c index 06adc4b09d..3cddb30fb3 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.c @@ -146,6 +146,17 @@ gst_cuda_allocator_alloc_internal (GstCudaAllocator * self, alloc_info->offset[2] = alloc_info->offset[1] + alloc_info->stride[1] * height / 2; break; + case GST_VIDEO_FORMAT_Y42B: + case GST_VIDEO_FORMAT_I422_10LE: + case GST_VIDEO_FORMAT_I422_12LE: + alloc_info->stride[0] = pitch; + alloc_info->stride[1] = pitch; + alloc_info->stride[2] = pitch; + alloc_info->offset[0] = 0; + alloc_info->offset[1] = alloc_info->stride[0] * height; + alloc_info->offset[2] = alloc_info->offset[1] + + alloc_info->stride[1] * height; + break; case GST_VIDEO_FORMAT_NV12: case GST_VIDEO_FORMAT_NV21: case GST_VIDEO_FORMAT_P010_10LE: @@ -498,6 +509,9 @@ gst_cuda_allocator_alloc (GstCudaAllocator * allocator, case GST_VIDEO_FORMAT_P016_LE: alloc_height *= 2; break; + case GST_VIDEO_FORMAT_Y42B: + case GST_VIDEO_FORMAT_I422_10LE: + case GST_VIDEO_FORMAT_I422_12LE: case GST_VIDEO_FORMAT_Y444: case GST_VIDEO_FORMAT_Y444_16LE: alloc_height *= 3; diff --git a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaformat.h b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaformat.h index e96c275132..9140c3bc6e 100644 --- a/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaformat.h +++ b/subprojects/gst-plugins-bad/sys/nvcodec/gstcudaformat.h @@ -25,7 +25,7 @@ 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 }" + "BGRA, RGBA, RGBx, BGRx, ARGB, ABGR, RGB, BGR, BGR10A2_LE, RGB10A2_LE, Y42B, I422_10LE, I422_12LE }" #define GST_CUDA_GL_FORMATS \ "{ I420, YV12, NV12, NV21, P010_10LE, P016_LE, Y444, " \