summaryrefslogtreecommitdiff
path: root/doc/filters.texi
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-02-25 21:21:29 +0100
committerAnton Khirnov <anton@khirnov.net>2013-04-09 19:04:45 +0200
commitc334c113d4d9e9a41bc38a3e4458d7ab21010401 (patch)
treeef17c5c25e3760fc8f6ce00acd981ab19d7540e4 /doc/filters.texi
parent5aa1a668cfae7f617e1a06efad20f87283badd8a (diff)
vf_scale: switch to an AVOptions-based system.
Diffstat (limited to 'doc/filters.texi')
-rw-r--r--doc/filters.texi36
1 files changed, 24 insertions, 12 deletions
diff --git a/doc/filters.texi b/doc/filters.texi
index 8ac0f2958d..51f7833216 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -1645,9 +1645,21 @@ can be used to test the monowhite pixel format descriptor definition.
@section scale
-Scale the input video to @var{width}:@var{height} and/or convert the image format.
+Scale the input video and/or convert the image format.
-The parameters @var{width} and @var{height} are expressions containing
+This filter accepts the following options:
+
+@table @option
+
+@item w
+Output video width.
+
+@item h
+Output video height.
+
+@end table
+
+The parameters @var{w} and @var{h} are expressions containing
the following constants:
@table @option
@@ -1682,27 +1694,27 @@ If the input image format is different from the format requested by
the next filter, the scale filter will convert the input to the
requested format.
-If the value for @var{width} or @var{height} is 0, the respective input
+If the value for @var{w} or @var{h} is 0, the respective input
size is used for the output.
-If the value for @var{width} or @var{height} is -1, the scale filter will
-use, for the respective output size, a value that maintains the aspect
-ratio of the input image.
+If the value for @var{w} or @var{h} is -1, the scale filter will use, for the
+respective output size, a value that maintains the aspect ratio of the input
+image.
-The default value of @var{width} and @var{height} is 0.
+The default value of @var{w} and @var{h} is 0.
Some examples follow:
@example
# scale the input video to a size of 200x100.
-scale=200:100
+scale=w=200:h=100
# scale the input to 2x
-scale=2*iw:2*ih
+scale=w=2*iw:h=2*ih
# the above is the same as
scale=2*in_w:2*in_h
# scale the input to half size
-scale=iw/2:ih/2
+scale=w=iw/2:h=ih/2
# increase the width, and set the height to the same size
scale=3/2*iw:ow
@@ -1712,13 +1724,13 @@ scale=iw:1/PHI*iw
scale=ih*PHI:ih
# increase the height, and set the width to 3/2 of the height
-scale=3/2*oh:3/5*ih
+scale=w=3/2*oh:h=3/5*ih
# increase the size, but make the size a multiple of the chroma
scale="trunc(3/2*iw/hsub)*hsub:trunc(3/2*ih/vsub)*vsub"
# increase the width to a maximum of 500 pixels, keep the same input aspect ratio
-scale='min(500\, iw*3/2):-1'
+scale=w='min(500\, iw*3/2):h=-1'
@end example
@section select