mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-02 20:42:30 +00:00
rawvideoparse: Fix tiling support
When using tile format, the stride has a different meaning. It used
the MSB and LSB 16bits to encode respectively the width and height in
number of tiles.
This issue was introduce with commit e5b70d384c
which was fixing
missing size recalculation when strides and offset is updated.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/753>
This commit is contained in:
parent
7d1028424c
commit
02c10e5bab
1 changed files with 13 additions and 4 deletions
|
@ -1154,10 +1154,19 @@ gst_raw_video_parse_update_info (GstRawVideoParseConfig * config)
|
|||
}
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue