From 0a0bb9059f42671c267ea5d0c8faa3ac71a8c742 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 19 Dec 2015 20:04:31 +0100 Subject: 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). --- sub/sd_ass.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'sub/sd_ass.c') 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); -- cgit v1.2.3