History

lavfi/vf_libplacebo: allow pos_w to depend on pos_h

Ditto for crop_w/crop_h. Requires simply repeating the evaluation of the first variable to be evaluated.

Niklas Haas committed 3 years ago

Commit e998d0a1 parent f998a611 file · +4 −0Browse files

Unified · Split

libavfilter/vf_libplacebo.c+4−0
@@ -775,10 +775,14 @@ static void update_crops(AVFilterContext *ctx, LibplaceboInput *in, · 774 unmodified lines
775775 av_expr_eval(s->crop_w_pexpr, s->var_values, NULL);
776776 s->var_values[VAR_CROP_H] = s->var_values[VAR_CH] =
777777 av_expr_eval(s->crop_h_pexpr, s->var_values, NULL);
778+ s->var_values[VAR_CROP_W] = s->var_values[VAR_CW] =
779+ av_expr_eval(s->crop_w_pexpr, s->var_values, NULL);
778780 s->var_values[VAR_POS_W] = s->var_values[VAR_PW] =
779781 av_expr_eval(s->pos_w_pexpr, s->var_values, NULL);
780782 s->var_values[VAR_POS_H] = s->var_values[VAR_PH] =
781783 av_expr_eval(s->pos_h_pexpr, s->var_values, NULL);
784+ s->var_values[VAR_POS_W] = s->var_values[VAR_PW] =
785+ av_expr_eval(s->pos_w_pexpr, s->var_values, NULL);
782786
783787 image->crop.x0 = av_expr_eval(s->crop_x_pexpr, s->var_values, NULL);
784788 image->crop.y0 = av_expr_eval(s->crop_y_pexpr, s->var_values, NULL);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t