[MPlayer-cvslog] r24966 - trunk/libvo/vo_directfb2.c

Ivan Kalvachev ikalvachev at gmail.com
Mon Nov 5 00:58:25 CET 2007


2007/11/4, Diego Biurrun <diego at biurrun.de>:
> On Sun, Nov 04, 2007 at 03:25:49PM +0100, Reimar Döffinger wrote:
> > On Sun, Nov 04, 2007 at 03:18:03PM +0100, Diego Biurrun wrote:
> > > On Sun, Nov 04, 2007 at 03:13:13PM +0100, Reimar Döffinger wrote:
> > > > On Sun, Nov 04, 2007 at 02:41:07PM +0100, diego wrote:
> > > > >
> > > > > Log:
> > > > > Fix previous incorrect commit, +/- has higher precedence than shifts.
> > > > >
> > > > > --- trunk/libvo/vo_directfb2.c  (original)
> > > > > +++ trunk/libvo/vo_directfb2.c  Sun Nov  4 14:41:07 2007
> > > > > @@ -1186,8 +1186,8 @@ static uint32_t get_image(mp_image_t *mp
> > > > >         if (!frame) {
> > > > >              if(mpi->flags&MP_IMGFLAG_PLANAR){
> > > > >                 mpi->planes[0]= dst + yoffset * pitch + xoffset;
> > > > > -               mpi->planes[1]+= ((yoffset * pitch) >> 2) + (xoffset >> 1);
> > > > > -               mpi->planes[2]+= ((yoffset * pitch) >> 2) + (xoffset >> 1);
> > > > > +               mpi->planes[1]+= (yoffset * pitch) >> (2 + xoffset) >> 1;
> > > > > +               mpi->planes[2]+= (yoffset * pitch) >> (2 + xoffset) >> 1;
> > > >
> > > > Uh... No idea what the previous commit was, and maybe this really
> > > > restores the same behaviour as originally, but I can't imagine this is
> > > > correct...
> > >
> > > It restores the original behavior, fishy as it may look.  Here is my
> > > previous incorrect commit:
> >
> > Yes, I thought so. Still I am really sure that the previous version was
> > right. And at least one other person thinks so as well ;-)
>
> I never meant to disagree.  Feel free to commit the change.

Reverted.

The original code produced warning. That warning indicated possible
bug. And there is really a bug. This commit restores code behavior,
but hides the warning and this makes finding the bug much harder.

Instead of refusing to revert this bug reintroduction because you
don't know what you are doing, you had to revert both of your commits
and let others fix the original code.



More information about the MPlayer-cvslog mailing list