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). --- player/video.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'player/video.c') diff --git a/player/video.c b/player/video.c index 9be4f6a9a0..1178557e24 100644 --- a/player/video.c +++ b/player/video.c @@ -1186,8 +1186,11 @@ void write_video(struct MPContext *mpctx, double endpts) const struct vo_driver *info = mpctx->video_out->driver; char extra[20] = {0}; - if (p.w != p.d_w || p.h != p.d_h) - snprintf(extra, sizeof(extra), " => %dx%d", p.d_w, p.d_h); + if (p.p_w != p.p_h) { + int d_w, d_h; + mp_image_params_get_dsize(&p, &d_w, &d_h); + snprintf(extra, sizeof(extra), " => %dx%d", d_w, d_h); + } MP_INFO(mpctx, "VO: [%s] %dx%d%s %s\n", info->name, p.w, p.h, extra, vo_format_name(p.imgfmt)); MP_VERBOSE(mpctx, "VO: Description: %s\n", info->description); -- cgit v1.2.3