mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-20 08:41:07 +00:00
videopool: take pixel stride into account
When we need to add borders, take the pixel stride into account to move to the right horizintal offset.
This commit is contained in:
parent
fa832bedb8
commit
413cd6dc2e
1 changed files with 4 additions and 3 deletions
|
@ -128,10 +128,11 @@ gst_video_info_align (GstVideoInfo * info, GstVideoAlignment * align)
|
||||||
vedge = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (vinfo, i, align->padding_top);
|
vedge = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (vinfo, i, align->padding_top);
|
||||||
plane = GST_VIDEO_FORMAT_INFO_PLANE (vinfo, i);
|
plane = GST_VIDEO_FORMAT_INFO_PLANE (vinfo, i);
|
||||||
|
|
||||||
GST_DEBUG ("plane %d: hedge %d vedge %d align %d", plane, hedge, vedge,
|
GST_DEBUG ("plane %d: hedge %d vedge %d align %d stride %d", plane, hedge,
|
||||||
align->stride_align[i]);
|
vedge, align->stride_align[i], info->stride[plane]);
|
||||||
|
|
||||||
info->offset[plane] += (vedge * info->stride[plane]) + hedge;
|
info->offset[plane] += (vedge * info->stride[plane]) +
|
||||||
|
(hedge * GST_VIDEO_FORMAT_INFO_PSTRIDE (vinfo, i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue