64 #if FF_API_OLD_FILTER_OPTS
75 #if FF_API_OLD_FILTER_OPTS
79 "num:den syntax is deprecated, please use num/den or named options instead\n");
101 #define OFFSET(x) offsetof(AspectContext, x)
102 #define FLAGS AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_VIDEO_PARAM
118 double var_values[
VARS_NB], res;
121 var_values[
VAR_W] = inlink->
w;
122 var_values[
VAR_H] = inlink->
h;
123 var_values[
VAR_A] = (double) inlink->
w / inlink->
h;
141 "Error when evaluating the expression '%s'\n", s->
ratio_expr);
144 if (aspect_ratio->
num < 0 || aspect_ratio->
den <= 0) {
146 "Invalid string '%s' for aspect ratio\n", s->
ratio_expr);
152 #if CONFIG_SETDAR_FILTER
162 #if FF_API_OLD_FILTER_OPTS
167 #if FF_API_OLD_FILTER_OPTS
174 s->
dar.
den * inlink->
w, INT_MAX);
184 inlink->
w, inlink->
h, old_dar.
num, old_dar.
den, old_sar.
num, old_sar.
den,
190 static const AVOption setdar_options[] = {
194 #if FF_API_OLD_FILTER_OPTS
197 {
"max",
"set max value for nominator or denominator in the ratio",
OFFSET(max),
AV_OPT_TYPE_INT, {.i64=100}, 1, INT_MAX,
FLAGS },
203 static const AVFilterPad avfilter_vf_setdar_inputs[] = {
207 .config_props = setdar_config_props,
213 static const AVFilterPad avfilter_vf_setdar_outputs[] = {
226 .priv_class = &setdar_class,
227 .
inputs = avfilter_vf_setdar_inputs,
228 .
outputs = avfilter_vf_setdar_outputs,
233 #if CONFIG_SETSAR_FILTER
242 #if FF_API_OLD_FILTER_OPTS
247 #if FF_API_OLD_FILTER_OPTS
256 inlink->
w, inlink->
h, old_sar.
num, old_sar.
den, old_dar.
num, old_dar.
den,
262 static const AVOption setsar_options[] = {
266 #if FF_API_OLD_FILTER_OPTS
269 {
"max",
"set max value for nominator or denominator in the ratio",
OFFSET(max),
AV_OPT_TYPE_INT, {.i64=100}, 1, INT_MAX,
FLAGS },
275 static const AVFilterPad avfilter_vf_setsar_inputs[] = {
279 .config_props = setsar_config_props,
285 static const AVFilterPad avfilter_vf_setsar_outputs[] = {
298 .priv_class = &setsar_class,
299 .
inputs = avfilter_vf_setsar_inputs,
300 .
outputs = avfilter_vf_setsar_outputs,