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