Also add a "dar" alias for "a", for avoiding confusion with sar/dar.
Unified · Split
| @@ -1129,9 +1129,12 @@ same as @var{out_w} and @var{out_h} · 1128 unmodified lines | ||
| 1129 | 1129 | x and y offsets as specified by the @var{x} and @var{y} |
| 1130 | 1130 | expressions, or NAN if not yet specified |
| 1131 | 1131 | |
| 1132 | −@item a | |
| 1132 | +@item dar, a | |
| 1133 | 1133 | input display aspect ratio, same as @var{iw} / @var{ih} |
| 1134 | 1134 | |
| 1135 | +@item sar | |
| 1136 | +input sample aspect ratio | |
| 1137 | + | |
| 1135 | 1138 | @item hsub, vsub |
| 1136 | 1139 | horizontal and vertical chroma subsample values. For example for the |
| 1137 | 1140 | pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1. |
| @@ -30,7 +30,7 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 31 | #define LIBAVFILTER_VERSION_MAJOR 2 |
| 32 | 32 | #define LIBAVFILTER_VERSION_MINOR 24 |
| 33 | −#define LIBAVFILTER_VERSION_MICRO 2 | |
| 33 | +#define LIBAVFILTER_VERSION_MICRO 3 | |
| 34 | 34 | |
| 35 | 35 | #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
| 36 | 36 | LIBAVFILTER_VERSION_MINOR, \ |
| @@ -45,7 +45,8 @@ static const char *var_names[] = { · 44 unmodified lines | ||
| 45 | 45 | "out_h", "oh", |
| 46 | 46 | "x", |
| 47 | 47 | "y", |
| 48 | − "a", | |
| 48 | + "a", "dar", | |
| 49 | + "sar", | |
| 49 | 50 | "hsub", |
| 50 | 51 | "vsub", |
| 51 | 52 | NULL |
| @@ -61,7 +62,8 @@ enum var_name { · 9 unmodified lines | ||
| 61 | 62 | VAR_OUT_H, VAR_OH, |
| 62 | 63 | VAR_X, |
| 63 | 64 | VAR_Y, |
| 64 | − VAR_A, | |
| 65 | + VAR_A, VAR_DAR, | |
| 66 | + VAR_SAR, | |
| 65 | 67 | VAR_HSUB, |
| 66 | 68 | VAR_VSUB, |
| 67 | 69 | VARS_NB |
| @@ -156,7 +158,9 @@ static int config_input(AVFilterLink *inlink) · 88 unmodified lines | ||
| 156 | 158 | var_values[VAR_IN_H] = var_values[VAR_IH] = inlink->h; |
| 157 | 159 | var_values[VAR_OUT_W] = var_values[VAR_OW] = NAN; |
| 158 | 160 | var_values[VAR_OUT_H] = var_values[VAR_OH] = NAN; |
| 159 | − var_values[VAR_A] = (float) inlink->w / inlink->h; | |
| 161 | + var_values[VAR_DAR] = var_values[VAR_A] = (float) inlink->w / inlink->h; | |
| 162 | + var_values[VAR_SAR] = inlink->sample_aspect_ratio.num ? | |
| 163 | + (float) inlink->sample_aspect_ratio.num / inlink->sample_aspect_ratio.den : 1; | |
| 160 | 164 | var_values[VAR_HSUB] = 1<<pad->hsub; |
| 161 | 165 | var_values[VAR_VSUB] = 2<<pad->vsub; |
| 162 | 166 | |