41 #define OFFSET(x) offsetof(AspectContext, x)
42 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
45 {
"max",
"set max value for nominator or denominator in the ratio",
OFFSET(max),
AV_OPT_TYPE_INT, {.i64=100}, 1, INT_MAX,
FLAGS },
54 static const char *shorthand[] = {
"ratio",
"max",
NULL };
59 aspect->
class =
class;
62 if (sscanf(args,
"%d:%d%c", &q.
num, &q.
den, &c) == 2) {
65 "num:den syntax is deprecated, please use num/den or named options instead\n");
72 if (ret < 0 || aspect->ratio.num < 0 || aspect->
ratio.
den <= 0) {
74 "Invalid string '%s' for aspect ratio\n", args);
98 #if CONFIG_SETDAR_FILTER
100 #define setdar_options options
105 return init(ctx, args, &setdar_class);
125 static const AVFilterPad avfilter_vf_setdar_inputs[] = {
129 .config_props = setdar_config_props,
136 static const AVFilterPad avfilter_vf_setdar_outputs[] = {
153 .
inputs = avfilter_vf_setdar_inputs,
155 .
outputs = avfilter_vf_setdar_outputs,
156 .priv_class = &setdar_class,
161 #if CONFIG_SETSAR_FILTER
163 #define setsar_options options
168 return init(ctx, args, &setsar_class);
180 static const AVFilterPad avfilter_vf_setsar_inputs[] = {
184 .config_props = setsar_config_props,
191 static const AVFilterPad avfilter_vf_setsar_outputs[] = {
208 .
inputs = avfilter_vf_setsar_inputs,
210 .
outputs = avfilter_vf_setsar_outputs,
211 .priv_class = &setsar_class,