[FFmpeg-devel] [PATCH] Implement pixdesctest filter

Michael Niedermayer michaelni
Tue Jun 8 01:56:50 CEST 2010


On Mon, Jun 07, 2010 at 10:41:50PM +0200, Stefano Sabatini wrote:
> On date Saturday 2010-02-06 00:48:47 +0100, Stefano Sabatini encoded:
> > 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.
> 
> The problem was fixed after Michael fix to libswscale (which we have
> still to document...).
> 
> Filter and test in attachment.
> 
> Note that I have a problem with this test, the generated list of
> input/output formats currently depends on the endianness of the
> system, that also means that the reference file should be generated
> accordingly.

fix the code then so the lists dont depend on the system endianness

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- 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/20100608/492ee6f1/attachment.pgp>



More information about the ffmpeg-devel mailing list