mirror of
https://github.com/mpv-player/mpv
synced 2024-10-02 16:25:33 +02:00
vo_opengl: add tscale-interpolates-only sub-option
This commit is contained in:
parent
bd1fb6f9b1
commit
521110054d
@ -28,6 +28,7 @@ Interface changes
|
||||
- VO opengl custom shaders must now use "sample_pixel" as function name,
|
||||
instead of "sample"
|
||||
- change VO opengl scaler-resizes-only default to enabled
|
||||
- add VO opengl "tscale-interpolates-only" suboption
|
||||
--- mpv 0.15.0 ---
|
||||
- change "yadif" video filter defaults
|
||||
--- mpv 0.14.0 ---
|
||||
|
@ -549,6 +549,10 @@ Available video output drivers are:
|
||||
manifest themselves as short flashes or fringes of black, mostly
|
||||
around moving edges) in exchange for potentially adding more blur.
|
||||
|
||||
``tscale-interpolates-only=<yes|no>``
|
||||
If set, then don't perform interpolation if the playback rate matches
|
||||
the the display refresh rate (default: yes).
|
||||
|
||||
``dscale-radius``, ``cscale-radius``, ``tscale-radius``, etc.
|
||||
Set filter parameters for ``dscale``, ``cscale`` and ``tscale``,
|
||||
respectively.
|
||||
|
@ -338,6 +338,7 @@ const struct gl_video_opts gl_video_opts_def = {
|
||||
.clamp = 1, }, // tscale
|
||||
},
|
||||
.scaler_resizes_only = 1,
|
||||
.tscale_interpolates_only = 1,
|
||||
.scaler_lut_size = 6,
|
||||
.alpha_mode = 3,
|
||||
.background = {0, 0, 0, 255},
|
||||
@ -363,6 +364,7 @@ const struct gl_video_opts gl_video_opts_hq_def = {
|
||||
.clamp = 1, }, // tscale
|
||||
},
|
||||
.scaler_resizes_only = 1,
|
||||
.tscale_interpolates_only = 1,
|
||||
.scaler_lut_size = 6,
|
||||
.alpha_mode = 3,
|
||||
.background = {0, 0, 0, 255},
|
||||
@ -406,6 +408,7 @@ const struct m_sub_options gl_video_conf = {
|
||||
SCALER_OPTS("tscale", 3),
|
||||
OPT_INTRANGE("scaler-lut-size", scaler_lut_size, 0, 4, 10),
|
||||
OPT_FLAG("scaler-resizes-only", scaler_resizes_only, 0),
|
||||
OPT_FLAG("tscale-interpolates-only", tscale_interpolates_only, 0),
|
||||
OPT_FLAG("linear-scaling", linear_scaling, 0),
|
||||
OPT_FLAG("correct-downscaling", correct_downscaling, 0),
|
||||
OPT_FLAG("sigmoid-upscaling", sigmoid_upscaling, 0),
|
||||
@ -2182,8 +2185,11 @@ void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo)
|
||||
if (has_frame) {
|
||||
gl_sc_set_vao(p->sc, &p->vao);
|
||||
|
||||
bool same_rate = !(frame->repeat || frame->num_vsyncs > 1);
|
||||
|
||||
if (p->opts.interpolation && frame->display_synced &&
|
||||
(p->frames_drawn || !frame->still))
|
||||
(p->frames_drawn || !frame->still) &&
|
||||
(!same_rate || !p->opts.tscale_interpolates_only))
|
||||
{
|
||||
gl_video_interpolate_frame(p, frame, fbo);
|
||||
} else {
|
||||
|
@ -83,6 +83,7 @@ struct gl_video_opts {
|
||||
float sigmoid_center;
|
||||
float sigmoid_slope;
|
||||
int scaler_resizes_only;
|
||||
int tscale_interpolates_only;
|
||||
int pbo;
|
||||
int dither_depth;
|
||||
int dither_algo;
|
||||
|
Loading…
Reference in New Issue
Block a user