diff mbox series

[FFmpeg-devel,11/11] doc/filters.texi: update overlay_vaapi documentation

Message ID 675b5279c3fe4828a9e1abde80d22a4847a0af3a.1665399281.git.ffmpegagent@gmail.com
State New
Headers show
Series Fixes and Enhancements for VAAPI Overlay | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Aman Karmani Oct. 10, 2022, 10:54 a.m. UTC
From: softworkz <softworkz@hotmail.com>

Signed-off-by: softworkz <softworkz@hotmail.com>
---
 doc/filters.texi | 49 +++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 11 deletions(-)

Comments

Gyan Doshi Oct. 10, 2022, 11:08 a.m. UTC | #1
On 2022-10-10 04:24 pm, softworkz wrote:
> From: softworkz <softworkz@hotmail.com>
>
> Signed-off-by: softworkz <softworkz@hotmail.com>
> ---
>   doc/filters.texi | 49 +++++++++++++++++++++++++++++++++++++-----------
>   1 file changed, 38 insertions(+), 11 deletions(-)
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 2d0b5db909..5f4604a834 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -26271,30 +26271,57 @@ It takes two inputs and has one output. The first input is the "main" video on w
>   The filter accepts the following options:
>   
>   @table @option
> -
>   @item x
> -Set the x coordinate of the overlaid video on the main video.
> -Default value is @code{0}.
> -
>   @item y
> -Set the y coordinate of the overlaid video on the main video.
> -Default value is @code{0}.
> +Set expressions for the x and y coordinates of the overlaid video
> +on the main video.
>   
> -@item w
> -Set the width of the overlaid video on the main video.
> -Default value is the width of input overlay video.
> +Default value is "0" for both expressions.
>   
> +@item w
>   @item h
> -Set the height of the overlaid video on the main video.
> -Default value is the height of input overlay video.
> +Set expressions for the width and height the overlaid video
> +on the main video.

The default values should be mentioned here. And also what the default 
value means, if not trivial.

Regards,
Gyan

> +The expressions can contain the following parameters:
> +
> +@table @option
> +
> +@item main_w, W
> +@item main_h, H
> +The main input width and height.
> +
> +@item overlay_iw
> +@item overlay_ih
> +The overlay input width and height.
> +
> +@item overlay_w, w
> +@item overlay_h, h
> +The overlay output width and height.
> +
> +@item overlay_x, x
> +@item overlay_y, y
> +Position of the overlay layer inside of main
> +
> +@end table
>   
>   @item alpha
>   Set transparency of overlaid video. Allowed range is 0.0 to 1.0.
>   Higher value means lower transparency.
>   Default value is @code{1.0}.
>   
> +@item eof_action
> +See @ref{framesync}.
> +
> +@item shortest
> +See @ref{framesync}.
> +
> +@item repeatlast
> +See @ref{framesync}.
> +
>   @end table
>   
> +This filter also supports the @ref{framesync} options.
>   @subsection Examples
>   
>   @itemize
Soft Works Oct. 10, 2022, 11:25 a.m. UTC | #2
> -----Original Message-----
> From: ffmpeg-devel <ffmpeg-devel-bounces@ffmpeg.org> On Behalf Of
> Gyan Doshi
> Sent: Monday, October 10, 2022 1:08 PM
> To: ffmpeg-devel@ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH 11/11] doc/filters.texi: update
> overlay_vaapi documentation
> 
> 
> 
> On 2022-10-10 04:24 pm, softworkz wrote:
> > From: softworkz <softworkz@hotmail.com>
> >
> > Signed-off-by: softworkz <softworkz@hotmail.com>
> > ---
> >   doc/filters.texi | 49 +++++++++++++++++++++++++++++++++++++------
> -----
> >   1 file changed, 38 insertions(+), 11 deletions(-)
> >
> > diff --git a/doc/filters.texi b/doc/filters.texi
> > index 2d0b5db909..5f4604a834 100644
> > --- a/doc/filters.texi
> > +++ b/doc/filters.texi
> > @@ -26271,30 +26271,57 @@ It takes two inputs and has one output.
> The first input is the "main" video on w
> >   The filter accepts the following options:
> >
> >   @table @option
> > -
> >   @item x
> > -Set the x coordinate of the overlaid video on the main video.
> > -Default value is @code{0}.
> > -
> >   @item y
> > -Set the y coordinate of the overlaid video on the main video.
> > -Default value is @code{0}.
> > +Set expressions for the x and y coordinates of the overlaid video
> > +on the main video.
> >
> > -@item w
> > -Set the width of the overlaid video on the main video.
> > -Default value is the width of input overlay video.
> > +Default value is "0" for both expressions.
> >
> > +@item w
> >   @item h
> > -Set the height of the overlaid video on the main video.
> > -Default value is the height of input overlay video.
> > +Set expressions for the width and height the overlaid video
> > +on the main video.
> 
> The default values should be mentioned here. And also what the
> default
> value means, if not trivial.
> 
> Regards,
> Gyan

Yea, you are hitting a point that I had left out because
I wasn't sure how detailed this should be explained:

The expression handling is done analog to overlay_qsv and I've taken
the same defaults which are:

    { "w", "Overlay width",      OFFSET(overlay_ow), AV_OPT_TYPE_STRING, { .str="overlay_iw"}, 0, 255, .flags = FLAGS},
    { "h", "Overlay height",     OFFSET(overlay_oh), AV_OPT_TYPE_STRING, { .str="overlay_ih*w/overlay_iw"}, 0, 255, .flags = FLAGS},


Essentially, the values are defaulting to the frame size of the
overlay input. This is because both, w and overlay_iw are initialized
to the overlay size. The default expression allows to set the width
only and have the height be adjusted proportionally.
But it doesn't work the other way round (setting h only), so 
I'm not sure whether it's a good default at all - I just wanted 
to have it equal to overlay_qsv..

Thanks,
softworkz
diff mbox series

Patch

diff --git a/doc/filters.texi b/doc/filters.texi
index 2d0b5db909..5f4604a834 100644
--- a/doc/filters.texi
+++ b/doc/filters.texi
@@ -26271,30 +26271,57 @@  It takes two inputs and has one output. The first input is the "main" video on w
 The filter accepts the following options:
 
 @table @option
-
 @item x
-Set the x coordinate of the overlaid video on the main video.
-Default value is @code{0}.
-
 @item y
-Set the y coordinate of the overlaid video on the main video.
-Default value is @code{0}.
+Set expressions for the x and y coordinates of the overlaid video
+on the main video.
 
-@item w
-Set the width of the overlaid video on the main video.
-Default value is the width of input overlay video.
+Default value is "0" for both expressions.
 
+@item w
 @item h
-Set the height of the overlaid video on the main video.
-Default value is the height of input overlay video.
+Set expressions for the width and height the overlaid video
+on the main video.
+
+The expressions can contain the following parameters:
+
+@table @option
+
+@item main_w, W
+@item main_h, H
+The main input width and height.
+
+@item overlay_iw
+@item overlay_ih
+The overlay input width and height.
+
+@item overlay_w, w
+@item overlay_h, h
+The overlay output width and height.
+
+@item overlay_x, x
+@item overlay_y, y
+Position of the overlay layer inside of main
+
+@end table
 
 @item alpha
 Set transparency of overlaid video. Allowed range is 0.0 to 1.0.
 Higher value means lower transparency.
 Default value is @code{1.0}.
 
+@item eof_action
+See @ref{framesync}.
+
+@item shortest
+See @ref{framesync}.
+
+@item repeatlast
+See @ref{framesync}.
+
 @end table
 
+This filter also supports the @ref{framesync} options.
 @subsection Examples
 
 @itemize