[vlc-commits] Scale subpictures without AR to fill up the whole display.
Laurent Aimar
git at videolan.org
Thu Jan 5 23:02:55 CET 2012
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Thu Jan 5 21:50:46 2012 +0100| [705d11a4de11c5ab20941f36f93589b855a5c3ce] | committer: Laurent Aimar
Scale subpictures without AR to fill up the whole display.
It closes #5683
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=705d11a4de11c5ab20941f36f93589b855a5c3ce
---
src/video_output/vout_subpictures.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/video_output/vout_subpictures.c b/src/video_output/vout_subpictures.c
index 70a7008..6434772 100644
--- a/src/video_output/vout_subpictures.c
+++ b/src/video_output/vout_subpictures.c
@@ -1042,8 +1042,10 @@ static subpicture_t *SpuRenderSubpictures(spu_t *spu,
/* Compute region scale AR */
video_format_t region_fmt = region->fmt;
if (region_fmt.i_sar_num <= 0 || region_fmt.i_sar_den <= 0) {
- region_fmt.i_sar_num = fmt_src->i_sar_num;
- region_fmt.i_sar_den = fmt_src->i_sar_den;
+ region_fmt.i_sar_num = (int64_t)fmt_dst->i_width * fmt_dst->i_sar_num * subpic->i_original_picture_height;
+ region_fmt.i_sar_den = (int64_t)fmt_dst->i_height * fmt_dst->i_sar_den * subpic->i_original_picture_width;
+ vlc_ureduce(®ion_fmt.i_sar_num, ®ion_fmt.i_sar_den,
+ region_fmt.i_sar_num, region_fmt.i_sar_den, 65536);
}
/* Compute scaling from original size to destination size
More information about the vlc-commits
mailing list