+ if (s->nb_planesx != s->nb_planesy) {
+ av_log(ctx, AV_LOG_ERROR, "First input link %s number of planes "
+ "(%d) do not match the corresponding "
+ "second input link %s number of planes (%d)\n",
+ ctx->input_pads[0].name, s->nb_planesx,
+ ctx->input_pads[1].name, s->nb_planesy);
+ return AVERROR(EINVAL);
+ }
+
+ if (s->nb_planesx != s->nb_planes) {
+ av_log(ctx, AV_LOG_ERROR, "First input link %s number of planes "
+ "(%d) do not match the corresponding "
+ "output link %s number of planes (%d)\n",
+ ctx->input_pads[0].name, s->nb_planesx,
+ ctx->output_pads[0].name, s->nb_planes);
+ return AVERROR(EINVAL);
+ }
+
+ if (s->widthx[1] != s->widthy[1] || s->heightx[1] != s->heighty[1]) {
+ av_log(ctx, AV_LOG_ERROR, "First input link %s 2nd plane "
+ "(size %dx%d) do not match the corresponding "
+ "second input link %s 2nd plane (size %dx%d)\n",
+ ctx->input_pads[0].name, s->widthx[1], s->heightx[1],
+ ctx->input_pads[1].name,
+ s->widthy[1], s->heighty[1]);
+ return AVERROR(EINVAL);
+ }
+
+ if (s->widthx[2] != s->widthy[2] || s->heightx[2] != s->heighty[2]) {
+ av_log(ctx, AV_LOG_ERROR, "First input link %s 3rd plane "
+ "(size %dx%d) do not match the corresponding "
+ "second input link %s 3rd plane (size %dx%d)\n",
+ ctx->input_pads[0].name, s->widthx[2], s->heightx[2],
+ ctx->input_pads[1].name,
+ s->widthy[2], s->heighty[2]);
+ return AVERROR(EINVAL);
+ }
+
+ if (s->widthx[1] != s->width[1] || s->heightx[1] != s->height[1]) {
+ av_log(ctx, AV_LOG_ERROR, "First input link %s 2nd plane "
+ "(size %dx%d) do not match the corresponding "
+ "output link %s 2nd plane (size %dx%d)\n",
+ ctx->input_pads[0].name, s->widthx[1], s->heightx[1],
+ ctx->output_pads[0].name, s->width[1], s->height[1]);
+ return AVERROR(EINVAL);
+ }
+
+ if (s->widthx[2] != s->width[2] || s->heightx[2] != s->height[2]) {
+ av_log(ctx, AV_LOG_ERROR, "First input link %s 3rd plane "
+ "(size %dx%d) do not match the corresponding "
+ "output link %s 3rd plane (size %dx%d)\n",
+ ctx->input_pads[0].name, s->widthx[2], s->heightx[2],
+ ctx->output_pads[0].name, s->width[2], s->height[2]);
+ return AVERROR(EINVAL);
+ }