[FFmpeg-devel] [PATCH] libavfilter-soc?: implement fish filter

Stefano Sabatini stefano.sabatini-lala
Mon Jun 1 14:04:05 CEST 2009


On date Monday 2009-06-01 13:56:14 +0200, Stefano Sabatini encoded:
> On date Monday 2009-06-01 11:51:56 +0200, Michael Niedermayer encoded:
> > On Sun, May 31, 2009 at 05:12:56PM +0200, Stefano Sabatini wrote:
> > > On date Saturday 2009-05-30 22:04:52 +0200, Michael Niedermayer encoded:
> > [...]
> > > > > +
> > > > > +typedef struct {
> > > > > +    const AVClass *class;
> > > > > +
> > > > > +    int w, h;
> > > > 
> > > > > +    char *h_range, *s_range, *v_range;
> > > > 
> > > > They are ultimately not strings
> > > 
> > > Yes, but then how should I put them in the context when using
> > > av_set_options_string()? (BTW this is the same "trick" used to set an
> > > expression).
> > 
> > the ranges can be set to expressions that get evaluated for each frame?
> 
> I believe so and that would be cool, that could be:
> expr='between(h, 100, 200) * between(v, 100, 255)'
> or
> expr='between(h, mod(N), N+100) * between(v, 100, 255)'
> 
> I'm supposing speed is not an issue for this filter, right?

After one minute of thinking, having h_first, h_second, v_first,
v_second, ...

would require just a per-frame evaluation, that's better than to
evaluate an expression for each pixel.
-- 
FFmpeg = Frenzy & Frightening Meaningless Powered Erotic God



More information about the ffmpeg-devel mailing list