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

Submitted by lance.lmwang@gmail.com on Sept. 26, 2019, 2:57 p.m.

Details

Message ID 20190926145742.28621-1-lance.lmwang@gmail.com
State New
Headers show

Commit Message

lance.lmwang@gmail.com Sept. 26, 2019, 2:57 p.m.
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 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 52 insertions(+), 3 deletions(-)

Comments

Gyan Sept. 26, 2019, 4:20 p.m.
On 26-09-2019 08:27 PM, 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 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
>   1 file changed, 52 insertions(+), 3 deletions(-)
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index e6f8bf0..581a96b 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -19060,6 +19060,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
> @@ -19068,6 +19075,15 @@ 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
> @@ -19076,11 +19092,44 @@ xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
>   
>   @item
>   Display 9 inputs into 3x3 grid.
> -Note that if inputs are of different sizes unused gaps might appear,
> -as not all of output video is used.
> +
> +Below is the 9 inputs position:
>   @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
> +input1(0, 0)       | input4(w0, 0)      | input7(w0+w3, 0)
> +input2(0, h0)      | input5(w0, h0)     | input8(w0+w3, h0)
> +input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w3, h0+h1)
>   @end example
> +
> +Note that if the input size is different, there may be unused gaps or
> +overlaps.  For example, if the height of input4 is greater than input1,
> +input5 will overlaid the top of input4, if the width of input5 is less
> +than input4, then input5 will have unused gaps.
> +
> +@example
> +xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_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+w4, 0)       | input13(w0+w4+w8, 0)
> +input2(0, h0)      | input6(w0, h0)      | input10(w0+w4, h0)      | input14(w0+w4+w8, h0)
> +input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w4, h0+h1)   | input15(w0+w4+w8, h0+h1)
> +input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
> +@end example
> +
> +Note that if the input size is different, there may be unused gaps or
> +overlaps. For example, if the height of input5 is greater than input1,
> +input6 will overlaid the top of input5, if the width of input6 is less
> +than input5, then input6 will have unused gaps.
> +
> +@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+w4_0|
> +w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
> +@end example
> +
>   @end itemize
>   
>   @anchor{yadif}

Pushed with minor changes as af007e36d1590d431282fd760175d92f631dc48f

Thanks,
Gyan
lance.lmwang@gmail.com Sept. 27, 2019, 2:32 p.m.
On Thu, Sep 26, 2019 at 09:50:16PM +0530, Gyan wrote:
> 
> 
> On 26-09-2019 08:27 PM, 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 | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++---
> >  1 file changed, 52 insertions(+), 3 deletions(-)
> >
> >diff --git a/doc/filters.texi b/doc/filters.texi
> >index e6f8bf0..581a96b 100644
> >--- a/doc/filters.texi
> >+++ b/doc/filters.texi
> >@@ -19060,6 +19060,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
> >@@ -19068,6 +19075,15 @@ 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
> >@@ -19076,11 +19092,44 @@ xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
> >  @item
> >  Display 9 inputs into 3x3 grid.
> >-Note that if inputs are of different sizes unused gaps might appear,
> >-as not all of output video is used.
> >+
> >+Below is the 9 inputs position:
> >  @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
> >+input1(0, 0)       | input4(w0, 0)      | input7(w0+w3, 0)
> >+input2(0, h0)      | input5(w0, h0)     | input8(w0+w3, h0)
> >+input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w3, h0+h1)
> >  @end example
> >+
> >+Note that if the input size is different, there may be unused gaps or
> >+overlaps.  For example, if the height of input4 is greater than input1,
> >+input5 will overlaid the top of input4, if the width of input5 is less
> >+than input4, then input5 will have unused gaps.
> >+
> >+@example
> >+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_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+w4, 0)       | input13(w0+w4+w8, 0)
> >+input2(0, h0)      | input6(w0, h0)      | input10(w0+w4, h0)      | input14(w0+w4+w8, h0)
> >+input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w4, h0+h1)   | input15(w0+w4+w8, h0+h1)
> >+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
> >+@end example
> >+
> >+Note that if the input size is different, there may be unused gaps or
> >+overlaps. For example, if the height of input5 is greater than input1,
> >+input6 will overlaid the top of input5, if the width of input6 is less
> >+than input5, then input6 will have unused gaps.
> >+
> >+@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+w4_0|
> >+w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
> >+@end example
> >+
> >  @end itemize
> >  @anchor{yadif}
> 
> Pushed with minor changes as af007e36d1590d431282fd760175d92f631dc48f

Gyan, thanks, I think the current layout is difficult to understand for user, how do you think if
I will change implementaion of the layout with the following setting?
1x2, 2x1, 2x2, 3x3, 4x4, 5x5 ...

> 
> Thanks,
> 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".
Paul B Mahol Sept. 27, 2019, 2:40 p.m.
On 9/27/19, Limin Wang <lance.lmwang@gmail.com> wrote:
> On Thu, Sep 26, 2019 at 09:50:16PM +0530, Gyan wrote:
>>
>>
>> On 26-09-2019 08:27 PM, 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 | 55
>> > ++++++++++++++++++++++++++++++++++++++++++++++++++++---
>> >  1 file changed, 52 insertions(+), 3 deletions(-)
>> >
>> >diff --git a/doc/filters.texi b/doc/filters.texi
>> >index e6f8bf0..581a96b 100644
>> >--- a/doc/filters.texi
>> >+++ b/doc/filters.texi
>> >@@ -19060,6 +19060,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
>> >@@ -19068,6 +19075,15 @@ 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
>> >@@ -19076,11 +19092,44 @@
>> > xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
>> >  @item
>> >  Display 9 inputs into 3x3 grid.
>> >-Note that if inputs are of different sizes unused gaps might appear,
>> >-as not all of output video is used.
>> >+
>> >+Below is the 9 inputs position:
>> >  @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
>> >+input1(0, 0)       | input4(w0, 0)      | input7(w0+w3, 0)
>> >+input2(0, h0)      | input5(w0, h0)     | input8(w0+w3, h0)
>> >+input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w3, h0+h1)
>> >  @end example
>> >+
>> >+Note that if the input size is different, there may be unused gaps or
>> >+overlaps.  For example, if the height of input4 is greater than input1,
>> >+input5 will overlaid the top of input4, if the width of input5 is less
>> >+than input4, then input5 will have unused gaps.
>> >+
>> >+@example
>> >+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_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+w4, 0)       |
>> > input13(w0+w4+w8, 0)
>> >+input2(0, h0)      | input6(w0, h0)      | input10(w0+w4, h0)      |
>> > input14(w0+w4+w8, h0)
>> >+input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w4, h0+h1)   |
>> > input15(w0+w4+w8, h0+h1)
>> >+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)|
>> > input16(w0+w4+w8, h0+h1+h2)
>> >+@end example
>> >+
>> >+Note that if the input size is different, there may be unused gaps or
>> >+overlaps. For example, if the height of input5 is greater than input1,
>> >+input6 will overlaid the top of input5, if the width of input6 is less
>> >+than input5, then input6 will have unused gaps.
>> >+
>> >+@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+w4_0|
>> >+w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
>> >+@end example
>> >+
>> >  @end itemize
>> >  @anchor{yadif}
>>
>> Pushed with minor changes as af007e36d1590d431282fd760175d92f631dc48f
>
> Gyan, thanks, I think the current layout is difficult to understand for
> user, how do you think if
> I will change implementaion of the layout with the following setting?
> 1x2, 2x1, 2x2, 3x3, 4x4, 5x5 ...

Please do not. If you want dumb filters use something else.


>
>>
>> Thanks,
>> 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".
> _______________________________________________
> 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".

Patch hide | download patch | download mbox

diff --git a/doc/filters.texi b/doc/filters.texi
index e6f8bf0..581a96b 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -19060,6 +19060,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
@@ -19068,6 +19075,15 @@  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
@@ -19076,11 +19092,44 @@  xstack=inputs=4:layout=0_0|0_h0|0_h0+h1|0_h0+h1+h2
 
 @item
 Display 9 inputs into 3x3 grid.
-Note that if inputs are of different sizes unused gaps might appear,
-as not all of output video is used.
+
+Below is the 9 inputs position:
 @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
+input1(0, 0)       | input4(w0, 0)      | input7(w0+w3, 0)
+input2(0, h0)      | input5(w0, h0)     | input8(w0+w3, h0)
+input3(0, h0+h1)   | input6(w0, h0+h1)  | input9(w0+w3, h0+h1)
 @end example
+
+Note that if the input size is different, there may be unused gaps or
+overlaps.  For example, if the height of input4 is greater than input1,
+input5 will overlaid the top of input4, if the width of input5 is less
+than input4, then input5 will have unused gaps.
+
+@example
+xstack=inputs=9:layout=0_0|0_h0|0_h0+h1|w0_0|w0_h0|w0_h0+h1|w0+w3_0|w0+w3_h0|w0+w3_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+w4, 0)       | input13(w0+w4+w8, 0)
+input2(0, h0)      | input6(w0, h0)      | input10(w0+w4, h0)      | input14(w0+w4+w8, h0)
+input3(0, h0+h1)   | input7(w0, h0+h1)   | input11(w0+w4, h0+h1)   | input15(w0+w4+w8, h0+h1)
+input4(0, h0+h1+h2)| input8(w0, h0+h1+h2)| input12(w0+w4, h0+h1+h2)| input16(w0+w4+w8, h0+h1+h2)
+@end example
+
+Note that if the input size is different, there may be unused gaps or
+overlaps. For example, if the height of input5 is greater than input1,
+input6 will overlaid the top of input5, if the width of input6 is less
+than input5, then input6 will have unused gaps.
+
+@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+w4_0|
+w0+w4_h0|w0+w4_h0+h1|w0+w4_h0+h1+h2|w0+w4+w8_0|w0+w4+w8_h0|w0+w4+w8_h0+h1|w0+w4+w8_h0+h1+h2
+@end example
+
 @end itemize
 
 @anchor{yadif}