video: Fix NV12_64Z32 default offset and size
authorNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 18 Feb 2014 18:08:09 +0000 (13:08 -0500)
committerNicolas Dufresne <nicolas.dufresne@collabora.com>
Tue, 18 Feb 2014 18:09:21 +0000 (13:09 -0500)
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

index fa7ec78..907bb69 100644 (file)
@@ -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;