[FFmpeg-devel] [PATCH] Implement pixdesctest filter

Stefano Sabatini stefano.sabatini-lala
Sat Feb 6 00:48:47 CET 2010


On date Tuesday 2010-02-02 12:34:04 +0100, Michael Niedermayer encoded:
> On Tue, Feb 02, 2010 at 12:08:14AM +0100, Stefano Sabatini wrote:
> > Hi, this filter is useful for testing/pedagogical purposes, so I'd
> > like to commit it even if we don't still have a test for lavfi.
> [...]
> > +static av_cold void uninit(AVFilterContext *ctx)
> > +{
> > +    PixdescTestContext *priv = ctx->priv;
> > +    av_free(priv->line);
> 
> please use av_freep() for everything except local variables
> avoids double frees and access to freed memory
> 
> 
> [...]
> > +static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
> > +{
> > +    PixdescTestContext *priv = inlink->dst->priv;
> > +    int i, c, w = inlink->w;
> > +
> > +    AVFilterPicRef *inpic  = inlink->cur_pic;
> > +    AVFilterPicRef *outpic = inlink->dst->outputs[0]->outpic;
> > +
> > +    /* clear destination picture */
> > +    for (c = 0; c < priv->pix_desc->nb_components; c++) {
> > +        int h1 = c == 1 || c == 2 ? h>>priv->pix_desc->log2_chroma_h : h;
> > +        int y1 = c == 1 || c == 2 ? y>>priv->pix_desc->log2_chroma_h : y;
> 
> does that work with odd y/h ?

Tested, we have them the same problem as in the pad filter, so I'll
suspend this review until I'll have fixed somehow the problem in lsws.

In attachment an updated patch.

Regards.
-- 
FFmpeg = Fantastic and Foolish Mega Philosophical Elastic Glue
-------------- next part --------------
A non-text attachment was scrubbed...
Name: implement-pixdesctest.patch
Type: text/x-diff
Size: 6276 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100206/a40e76b6/attachment.patch>



More information about the ffmpeg-devel mailing list