From: Seungha Yang Date: Fri, 28 Apr 2023 09:52:48 +0000 (+0900) Subject: cudamemory: Fix for semi planar YUV memory size decision X-Git-Tag: 1.22.7~326 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0e8b726843fe232f35cacf64a45f41de9c46e533;p=platform%2Fupstream%2Fgstreamer.git cudamemory: Fix for semi planar YUV memory size decision UV plan of the semi planar format requires only half of Y plane size Part-of: --- 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 50ff67b..4cfdec9 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/cuda/gstcudamemory.c @@ -518,11 +518,13 @@ gst_cuda_allocator_alloc (GstCudaAllocator * allocator, case GST_VIDEO_FORMAT_I420: case GST_VIDEO_FORMAT_YV12: case GST_VIDEO_FORMAT_I420_10LE: + alloc_height *= 2; + break; case GST_VIDEO_FORMAT_NV12: case GST_VIDEO_FORMAT_NV21: case GST_VIDEO_FORMAT_P010_10LE: case GST_VIDEO_FORMAT_P016_LE: - alloc_height *= 2; + alloc_height += alloc_height / 2; break; case GST_VIDEO_FORMAT_Y42B: case GST_VIDEO_FORMAT_I422_10LE: