diff options
author | wm4 <wm4@nowhere> | 2015-12-19 20:04:31 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-12-19 20:45:36 +0100 |
commit | 0a0bb9059f42671c267ea5d0c8faa3ac71a8c742 (patch) | |
tree | 89cbdee7748d36f98cc5d0efbfc8a3fc810b2016 /sub/sd_ass.c | |
parent | 1f7c099dc0feb9a160d9018ad6ad068e0295341a (diff) | |
download | mpv-0a0bb9059f42671c267ea5d0c8faa3ac71a8c742.tar.bz2 mpv-0a0bb9059f42671c267ea5d0c8faa3ac71a8c742.tar.xz |
video: switch from using display aspect to sample aspect
MPlayer traditionally always used the display aspect ratio, e.g. 16:9,
while FFmpeg uses the sample (aka pixel) aspect ratio.
Both have a bunch of advantages and disadvantages. Actually, it seems
using sample aspect ratio is generally nicer. The main reason for the
change is making mpv closer to how FFmpeg works in order to make life
easier. It's also nice that everything uses integer fractions instead
of floats now (except --video-aspect option/property).
Note that there is at least 1 user-visible change: vf_dsize now does
not set the display size, only the display aspect ratio. This is
because the image_params d_w/d_h fields did not just set the display
aspect, but also the size (except in encoding mode).
Diffstat (limited to 'sub/sd_ass.c')
-rw-r--r-- | sub/sd_ass.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sub/sd_ass.c b/sub/sd_ass.c index baf35b5d30..32179c843d 100644 --- a/sub/sd_ass.c +++ b/sub/sd_ass.c @@ -343,11 +343,9 @@ static void get_bitmaps(struct sd *sd, struct mp_osd_res dim, double pts, opts->ass_vsfilter_aspect_compat)) { // Let's use the original video PAR for vsfilter compatibility: - double par = scale - * (ctx->video_params.d_w / (double)ctx->video_params.d_h) - / (ctx->video_params.w / (double)ctx->video_params.h); + double par = ctx->video_params.p_w / (double)ctx->video_params.p_h; if (isnormal(par)) - scale = par; + scale *= par; } configure_ass(sd, &dim, converted, track); ass_set_pixel_aspect(renderer, scale); |