+ ctx->internal->execute(ctx, compute_images_mse, &td, NULL, FFMIN(s->planeheight[1], s->nb_threads));
+
+ for (int j = 0; j < s->nb_threads; j++) {
+ for (int c = 0; c < s->nb_components; c++)
+ comp_sum[c] += s->score[j][c];
+ }
+
+ for (int c = 0; c < s->nb_components; c++)
+ comp_mse[c] = comp_sum[c] / ((double)s->planewidth[c] * s->planeheight[c]);
+
+ for (int c = 0; c < s->nb_components; c++)
+ mse += comp_mse[c] * s->planeweight[c];