[FFmpeg-devel] [PATCH 2/2] doc/filters: Reformat scale filter doc

Timothy Gu timothygu99 at gmail.com
Sat Aug 3 03:42:08 CEST 2013


---
 doc/filters.texi | 74 +++++++++++++++++++++++++++++++-------------------------
 1 file changed, 41 insertions(+), 33 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index d78c4ca..26ee19f 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -6294,33 +6294,45 @@ Scale (resize) the input video, using the libswscale library.
 The scale filter forces the output display aspect ratio to be the same
 of the input, by changing the output sample aspect ratio.
 
+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.
+
+ at subsection Options
 The filter accepts the following options:
 
 @table @option
 @item width, w
-Set the output video width expression. Default value is @code{iw}. See
-below for the list of accepted constants.
-
 @item height, h
-Set the output video height expression. Default value is @code{ih}.
-See below for the list of accepted constants.
+Set the output video dimension expression. Default value is the input
+dimension.
+
+If the value is 0, the input width is used for the output.
+
+If one of the values is -1, the scale filter will use a value that
+maintains the aspect ratio of the input image, calculated from the
+other specified dimension. If both of them are -1, the input size is
+used
+
+See the next subsection for the list of accepted constants for use
+in the dimension expression.
 
 @item interl
-Set the interlacing. It accepts the following values:
+Set the interlacing mode. It accepts the following values:
 
- at table @option
+ at table @samp
 @item 1
-force interlaced aware scaling
+Force interlaced aware scaling
 
 @item 0
-do not apply interlaced scaling
+Do not apply interlaced scaling
 
 @item -1
-select interlaced aware scaling depending on whether the source frames
+Select interlaced aware scaling depending on whether the source frames
 are flagged as interlaced or not
 @end table
 
-Default value is @code{0}.
+Default value is @samp{0}.
 
 @item flags
 Set libswscale scaling flags. If not explictly specified the filter
@@ -6333,9 +6345,14 @@ form @var{width}x at var{height}.
 @item in_color_matrix
 @item out_color_matrix
 Set in/output YCbCr colorspace type.
+
 This allows the autodetected value to be overridden as well as allows forcing
 a specific value used for the output and encoder.
+
 If not specified, the colorspace type depends on the pixel format.
+
+Possible values;
+
 @table @samp
 @item auto
 Choose automatically
@@ -6370,7 +6387,7 @@ Choose automatically
 Full range (0-255 in case of 8bit luma)
 
 @item mpeg/tv
-"Mpeg" range (16-235 in case of 8bit luma)
+"MPEG" range (16-235 in case of 8bit luma)
 @end table
 
 @item force_original_aspect_ratio
@@ -6390,52 +6407,43 @@ to work.
 
 @end table
 
-The values of the @var{w} and @var{h} options are expressions
+ at subsection Available constants
+
+The values of the @option{w} and @option{h} options are expressions
 containing the following constants:
 
- at table @option
+ at table @var
 @item in_w
 @item in_h
-the input width and height
+The input width and height
 
 @item iw
 @item ih
-same as @var{in_w} and @var{in_h}
+Same as @var{in_w} and @var{in_h}
 
 @item out_w
 @item out_h
-the output (cropped) width and height
+The output (scaled) width and height
 
 @item ow
 @item oh
-same as @var{out_w} and @var{out_h}
+Same as @var{out_w} and @var{out_h}
 
 @item a
-same as @var{iw} / @var{ih}
+Same as @var{iw} / @var{ih}
 
 @item sar
-input sample aspect ratio
+Input sample aspect ratio
 
 @item dar
-input display aspect ratio, it is the same as (@var{iw} / @var{ih}) * @var{sar}
+Input display aspect ratio. Calculated from @code{(iw / ih) * sar}.
 
 @item hsub
 @item vsub
-horizontal and vertical chroma subsample values. For example for the
+Horizontal and vertical chroma subsample values. For example for the
 pixel format "yuv422p" @var{hsub} is 2 and @var{vsub} is 1.
 @end table
 
-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{w} or @var{h} is 0, the respective input
-size is used for the output.
-
-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.
-
 @subsection Examples
 
 @itemize
-- 
1.8.1.2



More information about the ffmpeg-devel mailing list