[FFmpeg-devel] [PATCH 6/7] Implement settb filter.

Michael Niedermayer michaelni
Wed Sep 8 15:01:53 CEST 2010


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 ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Republics decline into democracies and democracies degenerate into
despotisms. -- Aristotle
-------------- 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/20100908/00605482/attachment.pgp>



More information about the ffmpeg-devel mailing list