+static av_cold int config_input(AVFilterLink *inlink)
+{
+ AVFilterContext *avctx = inlink->dst;
+ ChromakeyContext *ctx = avctx->priv;
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(inlink->format);
+
+ ctx->hsub_log2 = desc->log2_chroma_w;
+ ctx->vsub_log2 = desc->log2_chroma_h;
+
+ return 0;
+}
+