[FFmpeg-devel] [PATCH] Add pad filter

Michael Niedermayer michaelni
Sun Dec 6 14:30:20 CET 2009


On Sat, Dec 05, 2009 at 12:07:11PM +0100, Stefano Sabatini wrote:
> On date Monday 2009-11-30 23:53:54 +0100, Stefano Sabatini encoded:
> > On date Monday 2009-11-30 20:18:35 +0100, Michael Niedermayer encoded:
> > > On Mon, Nov 30, 2009 at 09:17:18AM +0100, Stefano Sabatini wrote:
> > > > On date Monday 2009-11-30 01:28:41 +0100, Michael Niedermayer encoded:
> > [...]
> > > > > i think the code is too complex and messy now for what it does.
> > > > > Also it now partly duplicates slicify 
> > > > 
> > > > What about to issue just a single slice for the top and bottom bars?
> > > 
> > > ok
> > 
> > Simplified.
> 
> Updated.
[...]
> +    case PIX_FMT_BGRA:
> +        rgba_map[BLUE] = 0; rgba_map[GREEN] = 1; rgba_map[RED] = 2; rgba_map[ALPHA] = 3;
> +        break;
[...]
> +    case PIX_FMT_BGR24:
> +        rgba_map[BLUE] = 0; rgba_map[GREEN] = 1; rgba_map[RED] = 2; rgba_map[ALPHA] = 3;
> +        break;

code duplication
and why dont you extract that information out of pix_desc ?


[...]
> +    if (!(pad->w))

superflous ()


[...]
> +#define DRAW_TOP_BAR()                                                                       \
> +    draw_rectangle(outpic, pad->line, pad->line_step, pad->hsub, pad->vsub,                  \
> +                   0, 0, pad->w, pad->y);                                                    \
> +    avfilter_draw_slice(link->dst->outputs[0], 0, pad->y, slice_dir)
> +
> +#define DRAW_BOTTOM_BAR()                                                                    \
> +    draw_rectangle(outpic, pad->line, pad->line_step, pad->hsub, pad->vsub,                  \
> +                   0, pad->y + link->h, pad->w, pad->h - link->h - pad->y);                  \
> +    avfilter_draw_slice(link->dst->outputs[0], pad->y + link->h, pad->h - link->h - pad->y, slice_dir)

iam against the use of macros for this.
please write clean code, code stays duplicated in the object file by using
macros

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 2
"100% positive feedback" - "All either got their money back or didnt complain"
"Best seller ever, very honest" - "Seller refunded buyer after failed scam"
-------------- 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/20091206/90d22eef/attachment.pgp>



More information about the ffmpeg-devel mailing list