+
+ if (s->evaluate_per_mb) {
+ int y, x;
+
+ for (y = 0; y < s->h; y++)
+ for (x = 0; x < s->qstride; x++) {
+ int qp = in_qp_table ? in_qp_table[x + stride * y] : NAN;
+ double var_values[] = { !!in_qp_table, qp, x, y, s->qstride, s->h, 0};
+ static const char *var_names[] = { "known", "qp", "x", "y", "w", "h", NULL };
+ double temp_val;
+ int ret;
+
+ ret = av_expr_parse_and_eval(&temp_val, s->qp_expr_str,
+ var_names, var_values,
+ NULL, NULL, NULL, NULL, 0, 0, ctx);
+ if (ret < 0)
+ return ret;
+ out_qp_table_buf->data[x + s->qstride * y] = lrintf(temp_val);
+ }
+ } else if (in_qp_table) {