History

vf_pad: add support for a "sar" variable

Also add a "dar" alias for "a", for avoiding confusion with sar/dar.

Stefano Sabatini committed 15 years ago

Commit 0bf02fb1 parent 01151a23 files · +12 −5Browse files

Unified · Split

3 files
  1. doc/filters.texi +4 −1
  2. libavfilter/avfilter.h +1 −1
  3. libavfilter/vf_pad.c +7 −3
doc/filters.texi+4−1
@@ -1129,9 +1129,12 @@ same as @var{out_w} and @var{out_h} · 1128 unmodified lines
1129x and y offsets as specified by the @var{x} and @var{y}1129x and y offsets as specified by the @var{x} and @var{y}
1130expressions, or NAN if not yet specified1130expressions, or NAN if not yet specified
1131 1131
1132@item a1132@item dar, a
1133input display aspect ratio, same as @var{iw} / @var{ih}1133input display aspect ratio, same as @var{iw} / @var{ih}
1134 1134
1135@item sar
1136input sample aspect ratio
1137
1135@item hsub, vsub1138@item hsub, vsub
1136horizontal and vertical chroma subsample values. For example for the1139horizontal and vertical chroma subsample values. For example for the
1137pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1.1140pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1.
libavfilter/avfilter.h+1−1
@@ -30,7 +30,7 @@ · 29 unmodified lines
30 30
31#define LIBAVFILTER_VERSION_MAJOR 231#define LIBAVFILTER_VERSION_MAJOR 2
32#define LIBAVFILTER_VERSION_MINOR 2432#define LIBAVFILTER_VERSION_MINOR 24
33#define LIBAVFILTER_VERSION_MICRO 233#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, \
libavfilter/vf_pad.c+7−3
@@ -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 NULL52 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_NB69 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

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