summaryrefslogtreecommitdiffstats
path: root/video/out/aspect.c
diff options
context:
space:
mode:
authorrr- <rr-@sakuya.pl>2016-08-19 10:24:26 +0200
committerwm4 <wm4@nowhere>2016-08-19 22:51:46 +0200
commited644b0d3373f8ac1b3bf2ef8f797e1d1d8a775d (patch)
tree5b4b9d70268cef014538f99d97b9eeb056b3e8be /video/out/aspect.c
parent23993e91f37f2b15eb1a1103b2444a38b6bd66d3 (diff)
downloadmpv-ed644b0d3373f8ac1b3bf2ef8f797e1d1d8a775d.tar.bz2
mpv-ed644b0d3373f8ac1b3bf2ef8f797e1d1d8a775d.tar.xz
aspect: add --video-unscaled=downscale-big
Diffstat (limited to 'video/out/aspect.c')
-rw-r--r--video/out/aspect.c10
1 files changed, 7 insertions, 3 deletions
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;