1
0
mirror of https://github.com/mpv-player/mpv synced 2025-02-17 13:17:13 +00:00

video: don't drop anamorphic scaling if it's too minor

This played e.g. a 1264x722 file as 1264x720. There was some code which
dropped the aspect ratio if the video (in original resolution) wasn't
scaled by more than 4 pixels. Commit 5f3c3f8c introduced this (although
I'm not really sure what the code replaced by it did).

Just remove this "feature".

(cherry picked from commit d96fad04be)
This commit is contained in:
wm4 2015-03-16 20:39:24 +01:00 committed by Diogo Franco (Kovensky)
parent 4c1b45b5ab
commit 575b631d67

View File

@ -402,6 +402,7 @@ int video_reconfig_filters(struct dec_video *d_video,
if (sh->aspect > 0)
vf_set_dar(&p.d_w, &p.d_h, p.w, p.h, sh->aspect);
} else {
MP_VERBOSE(d_video, "Using bitstream aspect ratio.\n");
// Even if the aspect switches back, don't use container aspect again.
d_video->initial_decoder_aspect = -1;
}
@ -410,14 +411,6 @@ int video_reconfig_filters(struct dec_video *d_video,
if (force_aspect >= 0.0)
vf_set_dar(&p.d_w, &p.d_h, p.w, p.h, force_aspect);
if (abs(p.d_w - p.w) >= 4 || abs(p.d_h - p.h) >= 4) {
MP_VERBOSE(d_video, "Aspect ratio is %.2f:1 - "
"scaling to correct movie aspect.\n", sh->aspect);
} else {
p.d_w = p.w;
p.d_h = p.h;
}
// Apply user overrides
if (opts->requested_colorspace != MP_CSP_AUTO)
p.colorspace = opts->requested_colorspace;