From ed644b0d3373f8ac1b3bf2ef8f797e1d1d8a775d Mon Sep 17 00:00:00 2001 From: rr- Date: Fri, 19 Aug 2016 10:24:26 +0200 Subject: aspect: add --video-unscaled=downscale-big --- video/out/aspect.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'video/out/aspect.c') diff --git a/video/out/aspect.c b/video/out/aspect.c index 205ee3b89f..5cd5b32573 100644 --- a/video/out/aspect.c +++ b/video/out/aspect.c @@ -27,10 +27,12 @@ #include "sub/osd.h" static void aspect_calc_panscan(struct mp_vo_opts *opts, - int w, int h, int d_w, int d_h, bool unscaled, + int w, int h, int d_w, int d_h, int unscaled, int window_w, int window_h, double monitor_par, int *out_w, int *out_h) { + w *= monitor_par; + int fwidth = window_w; int fheight = (float)window_w / d_w * d_h / monitor_par; if (fheight > window_h || fheight < h) { @@ -51,9 +53,11 @@ static void aspect_calc_panscan(struct mp_vo_opts *opts, } if (unscaled) { - fwidth = w * monitor_par; - fheight = h; vo_panscan_area = 0; + if (unscaled != 2 || (w <= window_w && h <= window_h)) { + fwidth = w; + fheight = h; + } } *out_w = fwidth + vo_panscan_area * opts->panscan * f_w; -- cgit v1.2.3