mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
vapostproc: Consider video orientation for border calculation.
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1261>
This commit is contained in:
parent
78df7ae771
commit
cbca0bb06e
1 changed files with 12 additions and 0 deletions
|
@ -422,6 +422,18 @@ gst_va_vpp_set_info (GstVaBaseTransform * btrans, GstCaps * incaps,
|
|||
to_dar_n = to_dar_d = -1;
|
||||
}
|
||||
|
||||
/* if video-orientation changes consider it for borders */
|
||||
switch (gst_va_filter_get_orientation (btrans->filter)) {
|
||||
case GST_VIDEO_ORIENTATION_90R:
|
||||
case GST_VIDEO_ORIENTATION_90L:
|
||||
case GST_VIDEO_ORIENTATION_UL_LR:
|
||||
case GST_VIDEO_ORIENTATION_UR_LL:
|
||||
SWAP (from_dar_n, from_dar_d);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
self->borders_h = self->borders_w = 0;
|
||||
if (to_dar_n != from_dar_n || to_dar_d != from_dar_d) {
|
||||
if (self->add_borders) {
|
||||
|
|
Loading…
Reference in a new issue