mirror of
https://github.com/mpv-player/mpv
synced 2025-04-25 21:01:48 +00:00
vo_opengl: fancy-downscaling: enable also for anamorphic clips
This commit is contained in:
parent
6bbb1e4cf9
commit
0062c98dff
@ -545,9 +545,9 @@ Available video output drivers are:
|
|||||||
When using convolution based filters, extend the filter size
|
When using convolution based filters, extend the filter size
|
||||||
when downscaling. Trades quality for reduced downscaling performance.
|
when downscaling. Trades quality for reduced downscaling performance.
|
||||||
|
|
||||||
This is automatically disabled for anamorphic video, because this
|
This will perform slightly sub-optimally for anamorphic video (but still
|
||||||
feature doesn't work correctly with different scale factors in
|
better than without it) since it will extend the size to match only the
|
||||||
different directions.
|
milder of the scale factors between the axes.
|
||||||
|
|
||||||
``prescale=<filter>``
|
``prescale=<filter>``
|
||||||
This option provides non-convolution-based filters for upscaling. These
|
This option provides non-convolution-based filters for upscaling. These
|
||||||
|
@ -1592,11 +1592,16 @@ static void pass_scale_main(struct gl_video *p)
|
|||||||
scaler = &p->scaler[1];
|
scaler = &p->scaler[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
double f = MPMIN(xy[0], xy[1]);
|
// When requesting fancy-downscaling and the clip is anamorphic, and because
|
||||||
if (p->opts.fancy_downscaling && f < 1.0 &&
|
// only a single fancy scale factor is used for both axes, enable fancy only
|
||||||
fabs(xy[0] - f) < 0.01 && fabs(xy[1] - f) < 0.01)
|
// 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
|
// Pre-conversion, like linear light/sigmoidization
|
||||||
|
Loading…
Reference in New Issue
Block a user