summaryrefslogtreecommitdiffstats
path: root/video/out/aspect.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-21 19:27:54 +0200
committerwm4 <wm4@nowhere>2015-05-21 19:27:54 +0200
commitaf667643a0a7939c2cdb0d5e1451f45e376a0449 (patch)
tree3cfa8189a153f1d8faf6062f49abe66d8a106afc /video/out/aspect.c
parentcf023e1f3aeccc4e8b04edf5fc5fd2d9bd96e620 (diff)
downloadmpv-af667643a0a7939c2cdb0d5e1451f45e376a0449.tar.bz2
mpv-af667643a0a7939c2cdb0d5e1451f45e376a0449.tar.xz
video: do not align source position to 2
vo_direct3d still seems to require this (tested on Windows 8.1 with Intel graphics). Do it in vo_direct3d instead of messing with all VOs.
Diffstat (limited to 'video/out/aspect.c')
-rw-r--r--video/out/aspect.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/video/out/aspect.c b/video/out/aspect.c
index 851cca975a..42c94918d7 100644
--- a/video/out/aspect.c
+++ b/video/out/aspect.c
@@ -67,10 +67,6 @@ static void clamp_size(int size, int *start, int *end)
}
}
-// Round source to a multiple of 2, this is at least needed for vo_direct3d
-// and ATI cards.
-#define VID_SRC_ROUND_UP(x) (((x) + 1) & ~1)
-
static void src_dst_split_scaling(int src_size, int dst_size,
int scaled_src_size, bool unscaled,
float zoom, float align, float pan,
@@ -100,12 +96,12 @@ static void src_dst_split_scaling(int src_size, int dst_size,
int s_dst = *dst_end - *dst_start;
if (*dst_start < 0) {
int border = -(*dst_start) * s_src / s_dst;
- *src_start += VID_SRC_ROUND_UP(border);
+ *src_start += border;
*dst_start = 0;
}
if (*dst_end > dst_size) {
int border = (*dst_end - dst_size) * s_src / s_dst;
- *src_end -= VID_SRC_ROUND_UP(border);
+ *src_end -= border;
*dst_end = dst_size;
}