From 6b779710970a642dae4b7f2181910a6eea491947 Mon Sep 17 00:00:00 2001 From: Nicolas Dufresne Date: Tue, 18 Feb 2014 13:08:09 -0500 Subject: [PATCH] video: Fix NV12_64Z32 default offset and size This was a regression introduced by f52fd7a68, where we started using the stride to encode the dimensions in tiles. This patch simply updates offset and size calculation as described in the documentation, part-mediatype-video-raw.txt. --- gst-libs/gst/video/video-info.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index fa7ec78..907bb69 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -582,9 +582,9 @@ fill_planes (GstVideoInfo * info) GST_VIDEO_TILE_MAKE_STRIDE (GST_ROUND_UP_128 (width) / 64, GST_ROUND_UP_64 (height) / 64); info->offset[0] = 0; - info->offset[1] = info->stride[0] * GST_ROUND_UP_32 (height); - info->size = - info->offset[1] + info->stride[0] * GST_ROUND_UP_64 (height) / 2; + info->offset[1] = GST_ROUND_UP_128 (width) * GST_ROUND_UP_32 (height); + info->size = info->offset[1] + + GST_ROUND_UP_128 (width) * GST_ROUND_UP_64 (height) / 2; break; case GST_VIDEO_FORMAT_ENCODED: break; -- 2.7.4