On Sun, Aug 19, 2012 at 07:00:32PM +0200, Hendrik Leppkes wrote:
> On Sun, Aug 19, 2012 at 6:52 PM, Diego Biurrun <[email protected]> wrote:
> >
> > > --- a/libavcodec/vc1dec.c
> > > +++ b/libavcodec/vc1dec.c
> > > @@ -1164,177 +1164,57 @@ static av_always_inline void
> > get_mvdata_interlaced(VC1Context *v, int *dmv_x,
> > >
> > > +static void scale_field_mv(VC1Context *v, int16_t *mv, int opp, int dir)
> > >  {
> > > +        px = (px * scale) >> 8;
> > > +        py = (py * scale) >> 8;
> > > +
> > > +            if (FFABS(px) < scalezone1_x)
> > > +                px = (px * scale1) >> 8;
> > > +            else if (px < 0)
> > > +                px = ((px * scale2) >> 8) - zone1offset_x;
> > > +             else
> > > +                px = ((px * scale2) >> 8) + zone1offset_x;
> > > +
> > > +            if (FFABS(py) < scalezone1_y)
> > > +                py = (py * scale1) >> 8;
> > > +            else if (py < 0)
> > > +                py = ((py * scale2) >> 8) - zone1offset_y;
> > > +             else
> > > +                py = ((py * scale2) >> 8) + zone1offset_y;
> >
> > many unnecessary ()
> 
> Just because they are not necessary for the syntax does not mean that they
> don't greatly help the readability of the code.

Sure, but clearly not the case here IMO.  The () around the multiplications
just clutter the code, which will in any case be evaluated left to right,
matching reading direction.  Myself I looked twice to see why the () were
added, only to note that they were added for no reason.

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to