Skip to content
Snippets Groups Projects
Commit f7498f6b authored by Steve Lhomme's avatar Steve Lhomme
Browse files

vout_subpictures: handle margin from the center alignment in subpicture regions

The margin is added, so to shift to the left/top the margin (i_x/i_y) should be negative.
parent 72f534b2
No related branches found
No related tags found
1 merge request!5162vout_subpictures: handle margin from the center alignment in subpicture regions
Pipeline #455460 passed with warnings with stage
in 26 minutes and 16 seconds
......@@ -707,7 +707,7 @@ static void SpuRegionPlace(int *x, int *y,
if (i_align & SUBPICTURE_ALIGN_BOTTOM)
*y = subpic->i_original_picture_height - region->fmt.i_visible_height - region->i_y;
else
*y = subpic->i_original_picture_height / 2 - region->fmt.i_visible_height / 2;
*y = subpic->i_original_picture_height / 2 - region->fmt.i_visible_height / 2 + region->i_y;
}
if (i_align & SUBPICTURE_ALIGN_LEFT)
......@@ -718,7 +718,7 @@ static void SpuRegionPlace(int *x, int *y,
if (i_align & SUBPICTURE_ALIGN_RIGHT)
*x = subpic->i_original_picture_width - region->fmt.i_visible_width - region->i_x;
else
*x = subpic->i_original_picture_width / 2 - region->fmt.i_visible_width / 2;
*x = subpic->i_original_picture_width / 2 - region->fmt.i_visible_width / 2 + region->i_x;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment