}
}
- last_plane_size =
- GST_VIDEO_INFO_PLANE_STRIDE (info,
- last_plane) * GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info->finfo,
- last_plane, config->height);
+ if (GST_VIDEO_FORMAT_INFO_IS_TILED (info->finfo)) {
+ gint stride = GST_VIDEO_INFO_PLANE_STRIDE (info, last_plane);
+ gint x_tiles = GST_VIDEO_TILE_X_TILES (stride);
+ gint y_tiles = GST_VIDEO_TILE_Y_TILES (stride);
+ gint tile_width = 1 << GST_VIDEO_FORMAT_INFO_TILE_WS (info->finfo);
+ gint tile_height = 1 << GST_VIDEO_FORMAT_INFO_TILE_HS (info->finfo);
+ last_plane_size = x_tiles * y_tiles * tile_width * tile_height;
+ } else {
+ last_plane_size =
+ GST_VIDEO_INFO_PLANE_STRIDE (info,
+ last_plane) * GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (info->finfo,
+ last_plane, config->height);
+ }
GST_VIDEO_INFO_SIZE (info) = last_plane_offset + last_plane_size;