History

lavfi/vf_libplacebo: add corner_rounding option

For what use it may be.

Niklas Haas committed 3 years ago

Commit c4cdd791 parent 098b3382 files · +11 −0Browse files

Showing the changes to libavfilter (1 of 2 files). Show all

Unified · Split

libavfilter/vf_libplacebo.c+5−0
@@ -148,6 +148,7 @@ typedef struct LibplaceboContext { · 147 unmodified lines
148 AVExpr *pos_x_pexpr, *pos_y_pexpr, *pos_w_pexpr, *pos_h_pexpr;148 AVExpr *pos_x_pexpr, *pos_y_pexpr, *pos_w_pexpr, *pos_h_pexpr;
149 AVRational target_sar;149 AVRational target_sar;
150 float pad_crop_ratio;150 float pad_crop_ratio;
151 float corner_rounding;
151 int force_original_aspect_ratio;152 int force_original_aspect_ratio;
152 int force_divisible_by;153 int force_divisible_by;
153 int normalize_sar;154 int normalize_sar;
@@ -440,6 +441,9 @@ static int update_settings(AVFilterContext *ctx) · 286 unmodified lines
440 (float) color_rgba[1] / UINT8_MAX,441 (float) color_rgba[1] / UINT8_MAX,
441 (float) color_rgba[2] / UINT8_MAX,442 (float) color_rgba[2] / UINT8_MAX,
442 },443 },
444#if PL_API_VER >= 277
445 .corner_rounding = s->corner_rounding,
446#endif
443 447
444 .deband_params = s->deband ? &s->deband_params : NULL,448 .deband_params = s->deband ? &s->deband_params : NULL,
445 .sigmoid_params = s->sigmoid ? &pl_sigmoid_default_params : NULL,449 .sigmoid_params = s->sigmoid ? &pl_sigmoid_default_params : NULL,
@@ -1154,6 +1158,7 @@ static const AVOption libplacebo_options[] = { · 708 unmodified lines
1154 { "normalize_sar", "force SAR normalization to 1:1 by adjusting pos_x/y/w/h", OFFSET(normalize_sar), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, STATIC },1158 { "normalize_sar", "force SAR normalization to 1:1 by adjusting pos_x/y/w/h", OFFSET(normalize_sar), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, STATIC },
1155 { "pad_crop_ratio", "ratio between padding and cropping when normalizing SAR (0=pad, 1=crop)", OFFSET(pad_crop_ratio), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, 1.0, DYNAMIC },1159 { "pad_crop_ratio", "ratio between padding and cropping when normalizing SAR (0=pad, 1=crop)", OFFSET(pad_crop_ratio), AV_OPT_TYPE_FLOAT, {.dbl=0.0}, 0.0, 1.0, DYNAMIC },
1156 { "fillcolor", "Background fill color", OFFSET(fillcolor), AV_OPT_TYPE_STRING, {.str = "black"}, .flags = DYNAMIC },1160 { "fillcolor", "Background fill color", OFFSET(fillcolor), AV_OPT_TYPE_STRING, {.str = "black"}, .flags = DYNAMIC },
1161 { "corner_rounding", "Corner rounding radius", OFFSET(corner_rounding), AV_OPT_TYPE_FLOAT, {.dbl = 0.0}, 0.0, 1.0, .flags = DYNAMIC },
1157 1162
1158 {"colorspace", "select colorspace", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_SPC_NB-1, DYNAMIC, "colorspace"},1163 {"colorspace", "select colorspace", OFFSET(colorspace), AV_OPT_TYPE_INT, {.i64=-1}, -1, AVCOL_SPC_NB-1, DYNAMIC, "colorspace"},
1159 {"auto", "keep the same colorspace", 0, AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX, STATIC, "colorspace"},1164 {"auto", "keep the same colorspace", 0, AV_OPT_TYPE_CONST, {.i64=-1}, INT_MIN, INT_MAX, STATIC, "colorspace"},

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