[FFmpeg-devel] [PATCH] Add pad filter

Michael Niedermayer michaelni
Mon Nov 30 01:28:41 CET 2009


On Sun, Nov 29, 2009 at 02:13:51AM +0100, Stefano Sabatini wrote:
> On date Friday 2009-11-27 02:42:59 +0100, Michael Niedermayer encoded:
> > On Fri, Nov 27, 2009 at 01:09:28AM +0100, Stefano Sabatini wrote:
> > [...]
> > > +static void draw_slice(AVFilterLink *link, int y, int h)
> [...]
> > > +    }
> > 
> > a draw_rectangle() function could simplify above
> 
> Implemented and used.
>  
> > > +
> > > +    y1 = y == 0 ? 0 : y + pad->y;
> > > +    h1 = h;
> > > +    if (y == 0)
> > > +        h1 += pad->y;
> > > +    if (y+h >= link->h)
> > > +        h1 += pad->h - pad->y - link->h;
> > > +
> > > +    avfilter_draw_slice(link->dst->outputs[0], y1, h1);
> > 
> > this draw slice behaves quite odd, i would have expectd that slices didnt grow
> 
> Also this was wrong as it was misbehaving when in combination with
> vflip, since the slices direction order wasn't respected.
> 
> Now the filter send slices with dimension not greater than those of
> the input slice, and keep in consideration the slices direction (which
> unfortunately complicates the code).

i think the code is too complex and messy now for what it does.
Also it now partly duplicates slicify 

[...]

> +        pad->color[ridx] = rgba_color[0];
> +        pad->color[gidx] = rgba_color[1];
> +        pad->color[bidx] = rgba_color[2];
> +        pad->color[aidx] = rgba_color[3];

for(4)
    pad->color[map[i]]= rgba_color[i];



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

No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091130/dbe17468/attachment.pgp>



More information about the ffmpeg-devel mailing list