gst_buffer_unref (frame->buffer);
}
-static void
-scale_tile_shifts (const GstVideoFormatInfo * finfo, gint plane, guint * ws,
- guint * hs)
-{
- gint comp[GST_VIDEO_MAX_COMPONENTS];
- gint i;
-
- gst_video_format_info_component (finfo, plane, comp);
-
- /* scale the tile size according to the subsampling */
- *ws -= finfo->w_sub[comp[0]];
- *hs -= finfo->h_sub[comp[0]];
-
- /* for each additional component in the same plane, double the tile width,
- * this should provide the appropriate tile size when the tile size varies
- * base on the subsampling. */
- for (i = 1; i < GST_VIDEO_MAX_COMPONENTS && comp[i] >= 0; i++)
- *ws += 1;
-}
-
-
/**
* gst_video_frame_copy_plane:
* @dest: a #GstVideoFrame
guint i, j, ws, hs, ts;
GstVideoTileMode mode;
- ws = GST_VIDEO_FORMAT_INFO_TILE_WS (finfo);
- hs = GST_VIDEO_FORMAT_INFO_TILE_HS (finfo);
-
- if (GST_VIDEO_FORMAT_INFO_HAS_SUBTILES (finfo))
- scale_tile_shifts (finfo, plane, &ws, &hs);
-
+ tile_size = gst_video_format_info_get_tile_sizes (finfo, plane, &ws, &hs);
ts = ws + hs;
- tile_size = 1 << ts;
-
mode = GST_VIDEO_FORMAT_INFO_TILE_MODE (finfo);
sx_tiles = GST_VIDEO_TILE_X_TILES (ss);