[FFmpeg-devel] [PATCH 4/4] Make the crop filter accept parametric expressions.
Michael Niedermayer
michaelni
Thu Sep 9 15:29:20 CEST 2010
On Thu, Sep 09, 2010 at 12:06:16PM +0200, Stefano Sabatini wrote:
> On date Thursday 2010-09-09 01:11:42 +0200, Stefano Sabatini encoded:
> > On date Wednesday 2010-09-08 15:56:27 +0200, Michael Niedermayer encoded:
> > > On Thu, Jul 22, 2010 at 07:52:35PM +0200, Stefano Sabatini wrote:
> > [...]
> > > > diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
> > > > index 6a7ae70..df9b5a2 100644
> > > > --- a/libavfilter/vf_crop.c
> > > > +++ b/libavfilter/vf_crop.c
> > > > @@ -24,7 +24,31 @@
> > > > */
> > > >
> > > > #include "avfilter.h"
> > > > +#include "libavutil/eval.h"
> > > > #include "libavutil/pixdesc.h"
> > > > +#include "libavutil/avstring.h"
> > > > +
> > > > +static const char *var_names[] = {
> > > > + "E",
> > > > + "PHI",
> > > > + "PI",
> > > > + "x",
> > > > + "y",
> > > > + "w", ///< width of the input video
> > > > + "h", ///< height of the input video
> > >
> > > t for timestamp in seconds
> > > f for frame number
> >
> > This will be only possible for x and y, as w and h cannot (yet) be
> > dynamically changed.
>
> Another idea would be to implement a separate cropeval filter in the
no
> same file partly sharing the crop code, and perform x/y evaluation and
> validity checks in start_frame() (this to avoid to slow down the crop
> filter, which currently does just one evaluation during the
> configuration stage).
mplayer has a filter that does a eval per pixel so i dont think one per
frame will kill you
>
> In the same way we could also add a cropfile filter which takes the
> crop values to be applied from a file, that would be useful for a
allow eval to read from a file, more generic more flexible and more usefull
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- 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/20100909/15461f89/attachment.pgp>
More information about the ffmpeg-devel
mailing list