diff options
author | dec05eba <dec05eba@protonmail.com> | 2025-03-30 13:46:06 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2025-03-30 13:46:06 +0200 |
commit | ad26bc77db6bbc91a71db656060af514ff061a21 (patch) | |
tree | c43d909f4e215d44ccac3e7538d94ee1e32a4e7c /src/encoder | |
parent | 74865fad78618439510035deaba47b68a0886603 (diff) |
Fix incorrect compute size when scaling image
Diffstat (limited to 'src/encoder')
-rw-r--r-- | src/encoder/video/vaapi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/encoder/video/vaapi.c b/src/encoder/video/vaapi.c index 1d5dae0..0607a79 100644 --- a/src/encoder/video/vaapi.c +++ b/src/encoder/video/vaapi.c @@ -120,9 +120,11 @@ static bool gsr_video_encoder_vaapi_setup_textures(gsr_video_encoder_vaapi *self return false; } + const float border_color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; self->params.egl->glBindTexture(GL_TEXTURE_2D, self->target_textures[i]); - self->params.egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - self->params.egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); + self->params.egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER); + self->params.egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER); + self->params.egl->glTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, border_color); self->params.egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); self->params.egl->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); |