... | ... |
@@ -1363,21 +1363,6 @@ The parameters for @var{x} and @var{y} are expressions containing the |
1363 | 1363 |
following constants: |
1364 | 1364 |
|
1365 | 1365 |
@table @option |
1366 |
-@item W, H |
|
1367 |
-the input width and height |
|
1368 |
- |
|
1369 |
-@item tw, text_w |
|
1370 |
-the width of the rendered text |
|
1371 |
- |
|
1372 |
-@item th, text_h |
|
1373 |
-the height of the rendered text |
|
1374 |
- |
|
1375 |
-@item lh, line_h |
|
1376 |
-the height of each text line |
|
1377 |
- |
|
1378 |
-@item sar |
|
1379 |
-input sample aspect ratio |
|
1380 |
- |
|
1381 | 1366 |
@item dar |
1382 | 1367 |
input display aspect ratio, it is the same as (@var{w} / @var{h}) * @var{sar} |
1383 | 1368 |
|
... | ... |
@@ -1385,17 +1370,16 @@ input display aspect ratio, it is the same as (@var{w} / @var{h}) * @var{sar} |
1385 | 1385 |
horizontal and vertical chroma subsample values. For example for the |
1386 | 1386 |
pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1. |
1387 | 1387 |
|
1388 |
-@item max_glyph_w |
|
1389 |
-maximum glyph width, that is the maximum width for all the glyphs |
|
1390 |
-contained in the rendered text |
|
1388 |
+@item line_h, lh |
|
1389 |
+the height of each text line |
|
1391 | 1390 |
|
1392 |
-@item max_glyph_h |
|
1393 |
-maximum glyph height, that is the maximum height for all the glyphs |
|
1394 |
-contained in the rendered text, it is equivalent to @var{ascent} - |
|
1395 |
-@var{descent}. |
|
1391 |
+@item main_h, h, H |
|
1392 |
+the input height |
|
1396 | 1393 |
|
1397 |
-@item max_glyph_a, ascent |
|
1394 |
+@item main_w, w, W |
|
1395 |
+the input width |
|
1398 | 1396 |
|
1397 |
+@item max_glyph_a, ascent |
|
1399 | 1398 |
the maximum distance from the baseline to the highest/upper grid |
1400 | 1399 |
coordinate used to place a glyph outline point, for all the rendered |
1401 | 1400 |
glyphs. |
... | ... |
@@ -1408,12 +1392,30 @@ used to place a glyph outline point, for all the rendered glyphs. |
1408 | 1408 |
This is a negative value, due to the grid's orientation, with the Y axis |
1409 | 1409 |
upwards. |
1410 | 1410 |
|
1411 |
+@item max_glyph_h |
|
1412 |
+maximum glyph height, that is the maximum height for all the glyphs |
|
1413 |
+contained in the rendered text, it is equivalent to @var{ascent} - |
|
1414 |
+@var{descent}. |
|
1415 |
+ |
|
1416 |
+@item max_glyph_w |
|
1417 |
+maximum glyph width, that is the maximum width for all the glyphs |
|
1418 |
+contained in the rendered text |
|
1419 |
+ |
|
1411 | 1420 |
@item n |
1412 | 1421 |
the number of input frame, starting from 0 |
1413 | 1422 |
|
1423 |
+@item sar |
|
1424 |
+input sample aspect ratio |
|
1425 |
+ |
|
1414 | 1426 |
@item t |
1415 | 1427 |
timestamp expressed in seconds, NAN if the input timestamp is unknown |
1416 | 1428 |
|
1429 |
+@item text_h, th |
|
1430 |
+the height of the rendered text |
|
1431 |
+ |
|
1432 |
+@item text_w, tw |
|
1433 |
+the width of the rendered text |
|
1434 |
+ |
|
1417 | 1435 |
@item timecode |
1418 | 1436 |
initial timecode representation in "hh:mm:ss[:;.]ff" format. It can be used |
1419 | 1437 |
with or without text parameter. @var{rate} option must be specified. |
... | ... |
@@ -53,23 +53,22 @@ |
53 | 53 |
#endif |
54 | 54 |
|
55 | 55 |
static const char *const var_names[] = { |
56 |
- "main_w", "w", "W", ///< width of the input video |
|
56 |
+ "dar", |
|
57 |
+ "hsub", "vsub", |
|
58 |
+ "line_h", "lh", ///< line height, same as max_glyph_h |
|
57 | 59 |
"main_h", "h", "H", ///< height of the input video |
58 |
- "tw", "text_w", ///< width of the rendered text |
|
59 |
- "th", "text_h", ///< height of the rendered text |
|
60 |
- "max_glyph_w", ///< max glyph width |
|
61 |
- "max_glyph_h", ///< max glyph height |
|
60 |
+ "main_w", "w", "W", ///< width of the input video |
|
62 | 61 |
"max_glyph_a", "ascent", ///< max glyph ascent |
63 | 62 |
"max_glyph_d", "descent", ///< min glyph descent |
64 |
- "line_h", "lh", ///< line height, same as max_glyph_h |
|
63 |
+ "max_glyph_h", ///< max glyph height |
|
64 |
+ "max_glyph_w", ///< max glyph width |
|
65 |
+ "n", ///< number of frame |
|
65 | 66 |
"sar", |
66 |
- "dar", |
|
67 |
- "hsub", |
|
68 |
- "vsub", |
|
67 |
+ "t", ///< timestamp expressed in seconds |
|
68 |
+ "text_h", "th", ///< height of the rendered text |
|
69 |
+ "text_w", "tw", ///< width of the rendered text |
|
69 | 70 |
"x", |
70 | 71 |
"y", |
71 |
- "n", ///< number of frame |
|
72 |
- "t", ///< timestamp expressed in seconds |
|
73 | 72 |
NULL |
74 | 73 |
}; |
75 | 74 |
|
... | ... |
@@ -90,23 +89,22 @@ static const eval_func2 fun2[] = { |
90 | 90 |
}; |
91 | 91 |
|
92 | 92 |
enum var_name { |
93 |
- VAR_MAIN_W, VAR_w, VAR_W, |
|
93 |
+ VAR_DAR, |
|
94 |
+ VAR_HSUB, VAR_VSUB, |
|
95 |
+ VAR_LINE_H, VAR_LH, |
|
94 | 96 |
VAR_MAIN_H, VAR_h, VAR_H, |
95 |
- VAR_TW, VAR_TEXT_W, |
|
96 |
- VAR_TH, VAR_TEXT_H, |
|
97 |
- VAR_MAX_GLYPH_W, |
|
98 |
- VAR_MAX_GLYPH_H, |
|
97 |
+ VAR_MAIN_W, VAR_w, VAR_W, |
|
99 | 98 |
VAR_MAX_GLYPH_A, VAR_ASCENT, |
100 | 99 |
VAR_MAX_GLYPH_D, VAR_DESCENT, |
101 |
- VAR_LINE_H, VAR_LH, |
|
100 |
+ VAR_MAX_GLYPH_H, |
|
101 |
+ VAR_MAX_GLYPH_W, |
|
102 |
+ VAR_N, |
|
102 | 103 |
VAR_SAR, |
103 |
- VAR_DAR, |
|
104 |
- VAR_HSUB, |
|
105 |
- VAR_VSUB, |
|
104 |
+ VAR_T, |
|
105 |
+ VAR_TEXT_H, VAR_TH, |
|
106 |
+ VAR_TEXT_W, VAR_TW, |
|
106 | 107 |
VAR_X, |
107 | 108 |
VAR_Y, |
108 |
- VAR_N, |
|
109 |
- VAR_T, |
|
110 | 109 |
VAR_VARS_NB |
111 | 110 |
}; |
112 | 111 |
|