1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avfilter/vf_scale_vulkan: use AVFilterContext for logging

This commit is contained in:
Niklas Haas
2025-08-11 15:54:35 +02:00
committed by Niklas Haas
parent bd59c6651b
commit dee56511b0

View File

@@ -122,9 +122,10 @@ static const char write_444[] = {
C(0, } ) C(0, } )
}; };
static int init_scale_shader(ScaleVulkanContext *s, FFVulkanShader *shd, static int init_scale_shader(AVFilterContext *ctx, FFVulkanShader *shd,
FFVulkanDescriptorSetBinding *desc, AVFrame *in) FFVulkanDescriptorSetBinding *desc, AVFrame *in)
{ {
ScaleVulkanContext *s = ctx->priv;
GLSLD( scale_bilinear ); GLSLD( scale_bilinear );
if (s->vkctx.output_format != s->vkctx.input_format) { if (s->vkctx.output_format != s->vkctx.input_format) {
@@ -179,7 +180,7 @@ static int init_scale_shader(ScaleVulkanContext *s, FFVulkanShader *shd,
lcoeffs = av_csp_luma_coeffs_from_avcsp(in->colorspace); lcoeffs = av_csp_luma_coeffs_from_avcsp(in->colorspace);
if (!lcoeffs) { if (!lcoeffs) {
av_log(s, AV_LOG_ERROR, "Unsupported colorspace\n"); av_log(ctx, AV_LOG_ERROR, "Unsupported colorspace\n");
return AVERROR(EINVAL); return AVERROR(EINVAL);
} }
@@ -305,7 +306,7 @@ static av_cold int init_filter(AVFilterContext *ctx, AVFrame *in)
if (debayer) if (debayer)
err = init_debayer_shader(s, shd, desc, in); err = init_debayer_shader(s, shd, desc, in);
else else
err = init_scale_shader(s, shd, desc, in); err = init_scale_shader(ctx, shd, desc, in);
if (err < 0) if (err < 0)
goto fail; goto fail;