[MPlayer-cvslog] CVS: main/libmpcodecs vf_pp.c,1.30,1.31

Michael Niedermayer michaelni at gmx.at
Wed Dec 1 17:33:29 CET 2004


Hi

On Wednesday 01 December 2004 16:30, Michael Niedermayer wrote:
> Hi
>
> On Wednesday 01 December 2004 15:20, Jindrich Makovicka CVS wrote:
> > CVS change done by Jindrich Makovicka CVS
> >
> > Update of /cvsroot/mplayer/main/libmpcodecs
> > In directory mail:/var2/tmp/cvs-serv4626
> >
> > Modified Files:
> >  vf_pp.c
> > Log Message:
> > call vf_get_image with aligned dimensions when doing DR
> >
> > don't try the direct rendering when the requester doesn't accept stride
> > and the image dimensions are odd
> >
> >
> > Index: vf_pp.c
> > ===================================================================
> > RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_pp.c,v
> > retrieving revision 1.30
> > retrieving revision 1.31
> > diff -u -r1.30 -r1.31
> > --- vf_pp.c 31 Aug 2003 22:18:27 -0000 1.30
> > +++ vf_pp.c 1 Dec 2004 14:20:45 -0000 1.31
> > @@ -95,9 +95,10 @@
> >   mpi->flags&MP_IMGFLAG_PRESERVE) return; // don't change
> >      if(!(mpi->flags&MP_IMGFLAG_ACCEPT_STRIDE) &&
> > mpi->imgfmt!=vf->priv->outfmt) return; // colorspace differ
> > +    if (mpi->w&7 && !(mpi->flags&MP_IMGFLAG_ACCEPT_STRIDE)) return; //
> > width is not a multiple of 8 // ok, we can do pp in-place (or pp
> > disabled): vf->dmpi=vf_get_image(vf->next,mpi->imgfmt,
> > -        mpi->type, mpi->flags, mpi->w, mpi->h);
> > +        mpi->type, mpi->flags, (mpi->w+7)&(~7),(mpi->h+7)&(~7));
>
> violation of cvs policy rule 9
> revert this!

just to clarify why this change is bad
the pp code does NOT need a multiple of 8 height
instead the available width for both luma and chroma must be larger or equal 
to the next multiple of 8
furthermore the stride must be a multiple of 8, to ensure aligned accesses, 
besides that it is slow if this isnt the case some SIMD instructions require 
it

[...]
-- 
Michael

"I do not agree with what you have to say, but I'll defend to the death your
right to say it." -- Voltaire




More information about the MPlayer-cvslog mailing list