[FFmpeg-devel] [PATCH] doc/filters: itemize examples for pad filter, and fix a few typos

Stefano Sabatini stefasab at gmail.com
Tue Aug 21 13:28:50 CEST 2012


---
 doc/filters.texi |   55 ++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 39 insertions(+), 16 deletions(-)

diff --git a/doc/filters.texi b/doc/filters.texi
index 8847990..9226d5a 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -2795,36 +2795,59 @@ The default value of @var{color} is "black".
 
 @end table
 
-Some examples follow:
+ at section Examples
 
+ at itemize
+ at item
+Add paddings with color "violet" to the input video. Output video
+size is 640x480, the top-left corner of the input video is placed at
+column 0, row 40:
 @example
-# Add paddings with color "violet" to the input video. Output video
-# size is 640x480, the top-left corner of the input video is placed at
-# column 0, row 40.
 pad=640:480:0:40:violet
+ at end example
 
-# pad the input to get an output with dimensions increased bt 3/2,
-# and put the input video at the center of the padded area
+ at item
+Pad the input to get an output with dimensions increased by 3/2,
+and put the input video at the center of the padded area:
+ at example
 pad="3/2*iw:3/2*ih:(ow-iw)/2:(oh-ih)/2"
+ at end example
 
-# pad the input to get a squared output with size equal to the maximum
-# value between the input width and height, and put the input video at
-# the center of the padded area
+ at item
+Pad the input to get a squared output with size equal to the maximum
+value between the input width and height, and put the input video at
+the center of the padded area:
+ at example
 pad="max(iw\,ih):ow:(ow-iw)/2:(oh-ih)/2"
+ at end example
 
-# pad the input to get a final w/h ratio of 16:9
+ at item
+Pad the input to get a final w/h ratio of 16:9:
+ at example
 pad="ih*16/9:ih:(ow-iw)/2:(oh-ih)/2"
+ at end example
+
+ at item
+In case of anamorphic video, in order to set the output display aspect
+correctly, it is necessary to use @var{sar} in the expression,
+according to the relation:
+ at example
+(ih * X / ih) * sar = output_dar
+X = output_dar / sar
+ at end example
 
-# for anamorphic video, in order to set the output display aspect ratio,
-# it is necessary to use sar in the expression, according to the relation:
-# (ih * X / ih) * sar = output_dar
-# X = output_dar / sar
+So the previous example needs to be modified to:
+ at example
 pad="ih*16/9/sar:ih:(ow-iw)/2:(oh-ih)/2"
+ at end example
 
-# double output size and put the input video in the bottom-right
-# corner of the output padded area
+ at item
+Double output size and put the input video in the bottom-right
+corner of the output padded area:
+ at example
 pad="2*iw:2*ih:ow-iw:oh-ih"
 @end example
+ at end itemize
 
 @section pixdesctest
 
-- 
1.7.5.4



More information about the ffmpeg-devel mailing list