aboutsummaryrefslogtreecommitdiffhomepage
path: root/video
diff options
context:
space:
mode:
authorGravatar Avi Halachmi (:avih) <avihpit@yahoo.com>2015-08-10 03:57:53 +0300
committerGravatar wm4 <wm4@nowhere>2015-11-07 17:44:50 +0100
commit0062c98dfffcb667b9d0cd739abc107e0145df63 (patch)
tree671a9f8a9de05ec2b2ad104412d219b7d0690fbc /video
parent6bbb1e4cf9a0a77b6cceeab15338172183878f30 (diff)
vo_opengl: fancy-downscaling: enable also for anamorphic clips
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/video.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index d69d58f5e3..55f0e70476 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -1592,11 +1592,16 @@ static void pass_scale_main(struct gl_video *p)
scaler = &p->scaler[1];
}
- double f = MPMIN(xy[0], xy[1]);
- if (p->opts.fancy_downscaling && f < 1.0 &&
- fabs(xy[0] - f) < 0.01 && fabs(xy[1] - f) < 0.01)
+ // When requesting fancy-downscaling and the clip is anamorphic, and because
+ // only a single fancy scale factor is used for both axes, enable fancy only
+ // when both axes are downscaled, and use the milder of the factors to not
+ // end up with too much blur on one axis (even if we end up with sub-optimal
+ // fancy factor on the other axis).
+ // This is better than not respecting fancy at all for anamorphic clips.
+ double f = MPMAX(xy[0], xy[1]);
+ if (p->opts.fancy_downscaling && f < 1.0)
{
- scale_factor = FFMAX(1.0, 1.0 / f);
+ scale_factor = 1.0 / f;
}
// Pre-conversion, like linear light/sigmoidization