summaryrefslogtreecommitdiffstats
path: root/video/out/opengl
diff options
context:
space:
mode:
Diffstat (limited to 'video/out/opengl')
-rw-r--r--video/out/opengl/video.c3
-rw-r--r--video/out/opengl/video_shaders.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c
index 013d27c291..3a19858953 100644
--- a/video/out/opengl/video.c
+++ b/video/out/opengl/video.c
@@ -3400,6 +3400,9 @@ void gl_video_configure_queue(struct gl_video *p, struct vo *vo)
const struct filter_kernel *kernel =
mp_find_filter_kernel(p->opts.scaler[SCALER_TSCALE].kernel.name);
if (kernel) {
+ // filter_scale wouldn't be correctly initialized were we to use it here.
+ // This is fine since we're always upsampling, but beware if downsampling
+ // is added!
double radius = kernel->f.radius;
radius = radius > 0 ? radius : p->opts.scaler[SCALER_TSCALE].radius;
queue_size += 1 + ceil(radius);
diff --git a/video/out/opengl/video_shaders.c b/video/out/opengl/video_shaders.c
index 7d668dc4b8..5421589d06 100644
--- a/video/out/opengl/video_shaders.c
+++ b/video/out/opengl/video_shaders.c
@@ -107,8 +107,8 @@ void pass_sample_separated_gen(struct gl_shader_cache *sc, struct scaler *scaler
void pass_sample_polar(struct gl_shader_cache *sc, struct scaler *scaler)
{
- double radius = scaler->kernel->f.radius;
- int bound = (int)ceil(radius);
+ double radius = scaler->kernel->f.radius * scaler->kernel->filter_scale;
+ int bound = ceil(radius);
bool use_ar = scaler->conf.antiring > 0;
GLSL(color = vec4(0.0);)
GLSLF("{\n");