[FFmpeg-devel] [PATCH 4/4] Make the crop filter accept parametric expressions.

Michael Niedermayer michaelni
Tue Sep 14 18:01:00 CEST 2010


On Tue, Sep 14, 2010 at 05:48:16PM +0200, Stefano Sabatini wrote:
> On date Tuesday 2010-09-14 16:58:11 +0200, Michael Niedermayer encoded:
> > On Tue, Sep 14, 2010 at 12:30:46PM +0200, Stefano Sabatini wrote:
> [...]
> > > diff --git a/libavfilter/vf_crop.c b/libavfilter/vf_crop.c
> > > index 4f8a382..e7d798a 100644
> > > --- a/libavfilter/vf_crop.c
> > > +++ b/libavfilter/vf_crop.c
> > > @@ -24,8 +24,42 @@
> > >   */
> > >  
> > >  #include "avfilter.h"
> > > +#include "libavutil/eval.h"
> > > +#include "libavutil/avstring.h"
> > >  #include "libavcore/imgutils.h"
> > >  
> > > +static const char *var_names[] = {
> > > +    "E",
> > > +    "PHI",
> > > +    "PI",
> > 
> > > +    "w",      ///< width  of the input video
> > > +    "h",      ///< height of the input video
> > > +    "crop_w", ///< width  of the cropped video
> > > +    "crop_h", ///< height of the cropped video
> > 
> > i think these are poorly named as every filter (not just crop) has in and
> > out width/height and we should be consistent amongth all filters
> > iw/ow could be in/out with
> 
> Are in_w/h out_w/h OK?

no, they are  too long

> 
> I don't like to interpret enigmatic acronyms.

there are like 5 variables only ...
feel free to add longer duplicated ones

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

Rewriting code that is poorly written but fully understood is good.
Rewriting code that one doesnt understand is a sign that one is less smart
then the original author, trying to rewrite it will not make it better.
-------------- 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/20100914/a8ba3a67/attachment.pgp>



More information about the ffmpeg-devel mailing list