[FFmpeg-devel] [PATCH 6/7] Implement settb filter.
Michael Niedermayer
michaelni
Mon Oct 11 02:09:48 CEST 2010
On Mon, Oct 11, 2010 at 01:15:47AM +0200, Stefano Sabatini wrote:
> On date Wednesday 2010-09-08 15:01:53 +0200, Michael Niedermayer encoded:
> > On Wed, Sep 01, 2010 at 07:49:54PM +0200, Stefano Sabatini wrote:
> > > On date Thursday 2010-07-22 17:25:35 +0200, Michael Niedermayer encoded:
> > > > On Thu, Jul 22, 2010 at 04:34:29PM +0200, Stefano Sabatini wrote:
> > > > > On date Thursday 2010-07-22 14:09:28 +0200, Michael Niedermayer encoded:
> > > > > > On Wed, Jul 21, 2010 at 06:00:05PM +0200, Stefano Sabatini wrote:
> > > > > > > ---
> > > > > > > doc/filters.texi | 19 +++++++++
> > > > > > > libavfilter/Makefile | 1 +
> > > > > > > libavfilter/allfilters.c | 1 +
> > > > > > > libavfilter/vf_settb.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++
> > > > > > > 4 files changed, 113 insertions(+), 0 deletions(-)
> > > > > > > create mode 100644 libavfilter/vf_settb.c
> > > > > >
> > > > > > i think a single filter that can modify timestamps and timebase would make
> > > > > > more sense than spliting this operation?
> > > > > > modifying tb implicates recaling timestamps anyway ...
> > > > >
> > > > > I see these as two different operations, changing timebase is not
> > > > > implying a change of the absolute temporal value of the timestamps.
> > > > >
> > > > > Alternatively we could have a setpts filter which accepts:
> > > > > outpts_expression:tb_num:tb_den
> > > > >
> > > > > but I tend to prefer to keep distinct the two problems (and keep
> > > > > simple both filters). Also note that in the case of settb the
> > > > > rescaling is done implicitely by the filter framework
> > > > > (avfilter_start_frame()).
> > > >
> > > > if the filters are seperate then this will cause 2 rescalings to be
> > > > done, one for settb and one for changing pts. This would make it
> > > > impossible to change both while minimizing rounding errors
> > >
> > > So two possible solutions:
> > > 1) keep settb and setpts separate, and make setpts able to change the
> > > output timebase. This way the settb has to be considered a
> > > simplified version of setpts.
> > >
> > > 2) don't implement a settb filter, setpts can be used instead:
> > > settb=TB <=> setpts=PTS:TB
> > >
> > > I prefer solution 1).
> >
> > whatever you prefer then ...
>
> Patch updated.
> --
> FFmpeg = Free and Fierce Multimedia Ponderous Educated Gadget
> doc/filters.texi | 22 +++++++++
> libavfilter/Makefile | 1
> libavfilter/allfilters.c | 1
> libavfilter/vf_settb.c | 105 +++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 129 insertions(+)
> a5c275960b708704cac91c94c30a953241539ac6 0001-Implement-settb-filter.patch
> From 5601bf67ce862f438c36975f95cefc0ed3ebca4c Mon Sep 17 00:00:00 2001
> From: Stefano Sabatini <stefano.sabatini-lala at poste.it>
> Date: Mon, 19 Jul 2010 11:47:16 +0200
> Subject: [PATCH 1/7] Implement settb filter.
>
> ---
> doc/filters.texi | 22 ++++++++++
> libavfilter/Makefile | 1 +
> libavfilter/allfilters.c | 1 +
> libavfilter/vf_settb.c | 105 ++++++++++++++++++++++++++++++++++++++++++++++
> 4 files changed, 129 insertions(+), 0 deletions(-)
> create mode 100644 libavfilter/vf_settb.c
>
> diff --git a/doc/filters.texi b/doc/filters.texi
> index e4c1851..6f60cc3 100644
> --- a/doc/filters.texi
> +++ b/doc/filters.texi
> @@ -428,6 +428,28 @@ ratio of the input image.
>
> The default value of @var{width} and @var{height} is 0.
>
> + at section settb
> +
> +Set the timebase to use for the output frames timestamps.
> +
> +It accepts in input an arithmetic expression representing a rational.
> +
> +In the case the input is not specified the filter will use for the
> +output the same timebase as used for the input.
> +
> +Follow some examples.
> +
> + at example
> +# set the timebase to 1/25
> +settb=1/25
> +
> +# set the timebase to 1/10
> +settb=0.1
> +
> +#set the timebase to 1001/1000
> +settb=1+0.001
the input timebase should be available in the expression
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In fact, the RIAA has been known to suggest that students drop out
of college or go to community college in order to be able to afford
settlements. -- The RIAA
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101011/e316af11/attachment.pgp>
More information about the ffmpeg-devel
mailing list