diff mbox

[FFmpeg-devel,v4] doc/filters: add 4x4 layout example for xstack filter

Message ID 20190924222609.21514-1-lance.lmwang@gmail.com
State Superseded
Headers show

Commit Message

Lance Wang Sept. 24, 2019, 10:26 p.m. UTC
From: Limin Wang <lance.lmwang@gmail.com>

Reviewed-by: Gyan <ffmpeg@gyani.pro>
Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
---
 doc/filters.texi | 42 +++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 41 insertions(+), 1 deletion(-)

Comments

Gyan Doshi Sept. 25, 2019, 3:56 p.m. UTC | #1
Ok, the formatting is fine except for one. See below.

On 25-09-2019 03:56 AM, lance.lmwang@gmail.com wrote:
> From: Limin Wang <lance.lmwang@gmail.com>
>
> Reviewed-by: Gyan <ffmpeg@gyani.pro>
> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> ---
>   doc/filters.texi | 42 +++++++++++++++++++++++++++++++++++++++++-
>   1 file changed, 41 insertions(+), 1 deletion(-)
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index e41384a..a8342c0 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -19057,6 +19057,13 @@ terminates. Default value is 0.
>   @itemize
>   @item
>   Display 4 inputs into 2x2 grid.
> +
> +Below is the 4 inputs position:
> +@example
> +input1(0, 0)  | input3(w0, 0)
> +input2(0, h0) | input4(w0, h0)
> +@end example
> +
>   Note that if inputs are of different sizes unused gaps might appear,
>   as not all of output video is used.
>   @example
> @@ -19065,6 +19072,12 @@ xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
>   
>   @item
>   Display 4 inputs into 1x4 grid.
> +
> +Below is the 4 inputs position:
> +@example
> +input1(0, 0) | input2(0, h0) | input3(0, h0+h1) | input4(0, h0+h1+h2)
Since this is 1 column x 4 rows, these should be different lines without 
the separator.

> +@end example
> +
>   Note that if inputs are of different sizes unused gaps might appear,
>   as not all of output video is used.
>   @example
> @@ -19073,11 +19086,38 @@ xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
>   
>   @item
>   Display 9 inputs into 3x3 grid.
> +
> +Below is the 9 inputs position:
> +@example
> +input1(0, 0)       | input4(w0, 0)      | input7(w0+w1, 0)
> +input2(0, h0)      | input5(w0, h0)     | input8(w0+w1, h0)
> +input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w1, h0+h1)

Shouldn't the third column be at x = w0+w3? w1 is width of input2, right?

> +@end example
> +
>   Note that if inputs are of different sizes unused gaps might appear,
>   as not all of output video is used.
>   @example
> -xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
> +xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w1_0|w0+w1_h0|w0+w1_h0+h1
>   @end example
> +
> +@item
> +Display 16 inputs into 4x4 grid.
> +
> +Below is the 16 inputs position:
> +@example
> +input1(0, 0)       | input5(w0, 0)       | input9 (w0+w1, 0)       | input13(w0+w1+w2, 0)
> +input2(0, h0)      | input6(w0, h0)      | input10(w0+w1, h0)      | input14(w0+w1+w2, h0)
> +input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w1, h0+h1)   | input15(w0+w1+w2, h0+h1)
> +input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w1, h0+h1+h2)| input16(w0+w1+w2, h0+h1+h2)
Same as above.

You should also note that when videos are of different sizes, the videos 
may overlap e.g. if height of input5 is greater than input1, then input6 
will be overlaid on top of part of input5.

Gyan
Lance Wang Sept. 26, 2019, 6:52 a.m. UTC | #2
On Wed, Sep 25, 2019 at 09:26:58PM +0530, Gyan wrote:
> Ok, the formatting is fine except for one. See below.
> 
> On 25-09-2019 03:56 AM, lance.lmwang@gmail.com wrote:
> >From: Limin Wang <lance.lmwang@gmail.com>
> >
> >Reviewed-by: Gyan <ffmpeg@gyani.pro>
> >Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> >---
> >  doc/filters.texi | 42 +++++++++++++++++++++++++++++++++++++++++-
> >  1 file changed, 41 insertions(+), 1 deletion(-)
> >
> >diff --git a/doc/filters.texi b/doc/filters.texi
> >index e41384a..a8342c0 100644
> >--- a/doc/filters.texi
> >+++ b/doc/filters.texi
> >@@ -19057,6 +19057,13 @@ terminates. Default value is 0.
> >  @itemize
> >  @item
> >  Display 4 inputs into 2x2 grid.
> >+
> >+Below is the 4 inputs position:
> >+@example
> >+input1(0, 0)  | input3(w0, 0)
> >+input2(0, h0) | input4(w0, h0)
> >+@end example
> >+
> >  Note that if inputs are of different sizes unused gaps might appear,
> >  as not all of output video is used.
> >  @example
> >@@ -19065,6 +19072,12 @@ xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
> >  @item
> >  Display 4 inputs into 1x4 grid.
> >+
> >+Below is the 4 inputs position:
> >+@example
> >+input1(0, 0) | input2(0, h0) | input3(0, h0+h1) | input4(0, h0+h1+h2)
> Since this is 1 column x 4 rows, these should be different lines
> without the separator.
> 
> >+@end example
> >+
> >  Note that if inputs are of different sizes unused gaps might appear,
> >  as not all of output video is used.
> >  @example
> >@@ -19073,11 +19086,38 @@ xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
> >  @item
> >  Display 9 inputs into 3x3 grid.
> >+
> >+Below is the 9 inputs position:
> >+@example
> >+input1(0, 0)       | input4(w0, 0)      | input7(w0+w1, 0)
> >+input2(0, h0)      | input5(w0, h0)     | input8(w0+w1, h0)
> >+input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w1, h0+h1)
> 
> Shouldn't the third column be at x = w0+w3? w1 is width of input2, right?
> 
> >+@end example
> >+
> >  Note that if inputs are of different sizes unused gaps might appear,
> >  as not all of output video is used.
> >  @example
> >-xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
> >+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w1_0|w0+w1_h0|w0+w1_h0+h1
> >  @end example
> >+
> >+@item
> >+Display 16 inputs into 4x4 grid.
> >+
> >+Below is the 16 inputs position:
> >+@example
> >+input1(0, 0)       | input5(w0, 0)       | input9 (w0+w1, 0)       | input13(w0+w1+w2, 0)
> >+input2(0, h0)      | input6(w0, h0)      | input10(w0+w1, h0)      | input14(w0+w1+w2, h0)
> >+input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w1, h0+h1)   | input15(w0+w1+w2, h0+h1)
> >+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w1, h0+h1+h2)| input16(w0+w1+w2, h0+h1+h2)
> Same as above.
> 
> You should also note that when videos are of different sizes, the
> videos may overlap e.g. if height of input5 is greater than input1,
> then input6 will be overlaid on top of part of input5.
I have tested with different width videos, it's better to same width for every column.
Please check my last update version, please ignore the first one, it's wrong version.

> 
> Gyan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Gyan Doshi Sept. 26, 2019, 10:37 a.m. UTC | #3
On 26-09-2019 12:22 PM, Limin Wang wrote:
> On Wed, Sep 25, 2019 at 09:26:58PM +0530, Gyan wrote:
>> Ok, the formatting is fine except for one. See below.
>>
>> On 25-09-2019 03:56 AM, lance.lmwang@gmail.com wrote:
>>> From: Limin Wang <lance.lmwang@gmail.com>
>>>
>>> Reviewed-by: Gyan <ffmpeg@gyani.pro>
>>> Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
>>> ---
>>>   doc/filters.texi | 42 +++++++++++++++++++++++++++++++++++++++++-
>>>   1 file changed, 41 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/doc/filters.texi b/doc/filters.texi
>>> index e41384a..a8342c0 100644
>>> --- a/doc/filters.texi
>>> +++ b/doc/filters.texi
>>> @@ -19057,6 +19057,13 @@ terminates. Default value is 0.
>>>   @itemize
>>>   @item
>>>   Display 4 inputs into 2x2 grid.
>>> +
>>> +Below is the 4 inputs position:
>>> +@example
>>> +input1(0, 0)  | input3(w0, 0)
>>> +input2(0, h0) | input4(w0, h0)
>>> +@end example
>>> +
>>>   Note that if inputs are of different sizes unused gaps might appear,
>>>   as not all of output video is used.
>>>   @example
>>> @@ -19065,6 +19072,12 @@ xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
>>>   @item
>>>   Display 4 inputs into 1x4 grid.
>>> +
>>> +Below is the 4 inputs position:
>>> +@example
>>> +input1(0, 0) | input2(0, h0) | input3(0, h0+h1) | input4(0, h0+h1+h2)
>> Since this is 1 column x 4 rows, these should be different lines
>> without the separator.
>>
>>> +@end example
>>> +
>>>   Note that if inputs are of different sizes unused gaps might appear,
>>>   as not all of output video is used.
>>>   @example
>>> @@ -19073,11 +19086,38 @@ xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
>>>   @item
>>>   Display 9 inputs into 3x3 grid.
>>> +
>>> +Below is the 9 inputs position:
>>> +@example
>>> +input1(0, 0)       | input4(w0, 0)      | input7(w0+w1, 0)
>>> +input2(0, h0)      | input5(w0, h0)     | input8(w0+w1, h0)
>>> +input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w1, h0+h1)
>> Shouldn't the third column be at x = w0+w3? w1 is width of input2, right?
>>
>>> +@end example
>>> +
>>>   Note that if inputs are of different sizes unused gaps might appear,
>>>   as not all of output video is used.
>>>   @example
>>> -xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
>>> +xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w1_0|w0+w1_h0|w0+w1_h0+h1
>>>   @end example
>>> +
>>> +@item
>>> +Display 16 inputs into 4x4 grid.
>>> +
>>> +Below is the 16 inputs position:
>>> +@example
>>> +input1(0, 0)       | input5(w0, 0)       | input9 (w0+w1, 0)       | input13(w0+w1+w2, 0)
>>> +input2(0, h0)      | input6(w0, h0)      | input10(w0+w1, h0)      | input14(w0+w1+w2, h0)
>>> +input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w1, h0+h1)   | input15(w0+w1+w2, h0+h1)
>>> +input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w1, h0+h1+h2)| input16(w0+w1+w2, h0+h1+h2)
>> Same as above.
>>
>> You should also note that when videos are of different sizes, the
>> videos may overlap e.g. if height of input5 is greater than input1,
>> then input6 will be overlaid on top of part of input5.
> I have tested with different width videos, it's better to same width for every column.
> Please check my last update version, please ignore the first one, it's wrong version.
That's a user's choice but warn about the possibility of overlapping as 
well.

Gyan
Lance Wang Sept. 26, 2019, 2:38 p.m. UTC | #4
On Thu, Sep 26, 2019 at 04:07:14PM +0530, Gyan wrote:
> 
> 
> On 26-09-2019 12:22 PM, Limin Wang wrote:
> >On Wed, Sep 25, 2019 at 09:26:58PM +0530, Gyan wrote:
> >>Ok, the formatting is fine except for one. See below.
> >>
> >>On 25-09-2019 03:56 AM, lance.lmwang@gmail.com wrote:
> >>>From: Limin Wang <lance.lmwang@gmail.com>
> >>>
> >>>Reviewed-by: Gyan <ffmpeg@gyani.pro>
> >>>Signed-off-by: Limin Wang <lance.lmwang@gmail.com>
> >>>---
> >>>  doc/filters.texi | 42 +++++++++++++++++++++++++++++++++++++++++-
> >>>  1 file changed, 41 insertions(+), 1 deletion(-)
> >>>
> >>>diff --git a/doc/filters.texi b/doc/filters.texi
> >>>index e41384a..a8342c0 100644
> >>>--- a/doc/filters.texi
> >>>+++ b/doc/filters.texi
> >>>@@ -19057,6 +19057,13 @@ terminates. Default value is 0.
> >>>  @itemize
> >>>  @item
> >>>  Display 4 inputs into 2x2 grid.
> >>>+
> >>>+Below is the 4 inputs position:
> >>>+@example
> >>>+input1(0, 0)  | input3(w0, 0)
> >>>+input2(0, h0) | input4(w0, h0)
> >>>+@end example
> >>>+
> >>>  Note that if inputs are of different sizes unused gaps might appear,
> >>>  as not all of output video is used.
> >>>  @example
> >>>@@ -19065,6 +19072,12 @@ xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
> >>>  @item
> >>>  Display 4 inputs into 1x4 grid.
> >>>+
> >>>+Below is the 4 inputs position:
> >>>+@example
> >>>+input1(0, 0) | input2(0, h0) | input3(0, h0+h1) | input4(0, h0+h1+h2)
> >>Since this is 1 column x 4 rows, these should be different lines
> >>without the separator.
> >>
> >>>+@end example
> >>>+
> >>>  Note that if inputs are of different sizes unused gaps might appear,
> >>>  as not all of output video is used.
> >>>  @example
> >>>@@ -19073,11 +19086,38 @@ xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
> >>>  @item
> >>>  Display 9 inputs into 3x3 grid.
> >>>+
> >>>+Below is the 9 inputs position:
> >>>+@example
> >>>+input1(0, 0)       | input4(w0, 0)      | input7(w0+w1, 0)
> >>>+input2(0, h0)      | input5(w0, h0)     | input8(w0+w1, h0)
> >>>+input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w1, h0+h1)
> >>Shouldn't the third column be at x = w0+w3? w1 is width of input2, right?
> >>
> >>>+@end example
> >>>+
> >>>  Note that if inputs are of different sizes unused gaps might appear,
> >>>  as not all of output video is used.
> >>>  @example
> >>>-xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
> >>>+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w1_0|w0+w1_h0|w0+w1_h0+h1
> >>>  @end example
> >>>+
> >>>+@item
> >>>+Display 16 inputs into 4x4 grid.
> >>>+
> >>>+Below is the 16 inputs position:
> >>>+@example
> >>>+input1(0, 0)       | input5(w0, 0)       | input9 (w0+w1, 0)       | input13(w0+w1+w2, 0)
> >>>+input2(0, h0)      | input6(w0, h0)      | input10(w0+w1, h0)      | input14(w0+w1+w2, h0)
> >>>+input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w1, h0+h1)   | input15(w0+w1+w2, h0+h1)
> >>>+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w1, h0+h1+h2)| input16(w0+w1+w2, h0+h1+h2)
> >>Same as above.
> >>
> >>You should also note that when videos are of different sizes, the
> >>videos may overlap e.g. if height of input5 is greater than input1,
> >>then input6 will be overlaid on top of part of input5.
> >I have tested with different width videos, it's better to same width for every column.
> >Please check my last update version, please ignore the first one, it's wrong version.
> That's a user's choice but warn about the possibility of overlapping
> as well.
OK, so it's better to add the note to the document also. I'll try to
update the old note section, please help to check if it's accuate.

> 
> Gyan
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox

Patch

diff --git a/doc/filters.texi b/doc/filters.texi
index e41384a..a8342c0 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -19057,6 +19057,13 @@  terminates. Default value is 0.
 @itemize
 @item
 Display 4 inputs into 2x2 grid.
+
+Below is the 4 inputs position:
+@example
+input1(0, 0)  | input3(w0, 0)
+input2(0, h0) | input4(w0, h0)
+@end example
+
 Note that if inputs are of different sizes unused gaps might appear,
 as not all of output video is used.
 @example
@@ -19065,6 +19072,12 @@  xstack=inputs=4:layout=0_0|0_h0|w0_0|w0_h0
 
 @item
 Display 4 inputs into 1x4 grid.
+
+Below is the 4 inputs position:
+@example
+input1(0, 0) | input2(0, h0) | input3(0, h0+h1) | input4(0, h0+h1+h2)
+@end example
+
 Note that if inputs are of different sizes unused gaps might appear,
 as not all of output video is used.
 @example
@@ -19073,11 +19086,38 @@  xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
 
 @item
 Display 9 inputs into 3x3 grid.
+
+Below is the 9 inputs position:
+@example
+input1(0, 0)       | input4(w0, 0)      | input7(w0+w1, 0)
+input2(0, h0)      | input5(w0, h0)     | input8(w0+w1, h0)
+input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w1, h0+h1)
+@end example
+
 Note that if inputs are of different sizes unused gaps might appear,
 as not all of output video is used.
 @example
-xstack=inputs=9:layout=w3_0|w3_h0+h2|w3_h0|0_h4|0_0|w3+w1_0|0_h1+h2|w3+w1_h0|w3+w1_h1+h2
+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w1_0|w0+w1_h0|w0+w1_h0+h1
 @end example
+
+@item
+Display 16 inputs into 4x4 grid.
+
+Below is the 16 inputs position:
+@example
+input1(0, 0)       | input5(w0, 0)       | input9 (w0+w1, 0)       | input13(w0+w1+w2, 0)
+input2(0, h0)      | input6(w0, h0)      | input10(w0+w1, h0)      | input14(w0+w1+w2, h0)
+input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w1, h0+h1)   | input15(w0+w1+w2, h0+h1)
+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w1, h0+h1+h2)| input16(w0+w1+w2, h0+h1+h2)
+@end example
+
+Note that if inputs are of different sizes unused gaps might appear,
+as not all of output video is used.
+@example
+xstack=inputs=16:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2|w0_0|w0_h0|w0_h0+h1|w0_h0+h1+h2|w0+w1_0|
+  w0+w1_h0|w0+w1_h0+h1|w0+w1_h0+h1+h2|w0+w1+w2_0|w0+w1+w2_h0|w0+w1+w2_h0+h1|w0+w1+w2_h0+h1+h2
+@end example
+
 @end itemize
 
 @anchor{yadif}