[FFmpeg-devel] [PATCH] avfilter/vf_tile: add skip option

Nicolas George george at nsup.org
Fri Nov 10 11:16:32 EET 2017


Le septidi 17 brumaire, an CCXXVI, Paul B Mahol a écrit :
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  doc/filters.texi      |  5 +++++
>  libavfilter/vf_tile.c | 53 ++++++++++++++++++++++++++++++++++++++++++---------
>  2 files changed, 49 insertions(+), 9 deletions(-)
> 
> diff --git a/doc/filters.texi b/doc/filters.texi
> index 2ba6e04166..a6d537485b 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -14439,6 +14439,11 @@ refer to the pad video filter.
>  Specify the color of the unused area. For the syntax of this option, check the
>  "Color" section in the ffmpeg-utils manual. The default value of @var{color}
>  is "black".
> +

> + at item skip
> +Set the number of frames to skip from input before rendering output frame.
> +The default value is @code{0}, meaning skip @var{nb_frames} frames. If it is more
> +than @var{nb_frames} its is set to @var{nb_frames}.

I had trouble understanding the logic of the code, until I realized the
problem was here: I think the documentation does not explain well what
the option is meant to do.

If I understand correctly, using an example: if a 5x4 tile, the normal
mapping is:

out  0 <- in  0 .. in 19
out  1 <- in 20 .. in 39
out  2 <- in 40 .. in 59
out  3 <- in 60 .. in 79

But if "skip" is set to 15, it becomes:

out  0 <- in  0 .. in 19
out  1 <- in 15 .. in 34
out  2 <- in 30 .. in 49
out  3 <- in 45 .. in 64

In other words, the output frames overlap by nb_frames - skip input
frames.

Is it what you intended?

If so, then the doc needs to be clarified. And I think the name of the
option is misleading. What about "step"? Or maybe "period"?

Or possibly even better: reverse the direction of the option "overlap=5"
instead of "step=15".

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20171110/98e62bfa/attachment.sig>


More information about the ffmpeg-devel mailing list