[FFmpeg-soc] [soc]: r1511 - amr/amrnbfloatdec.c

Robert Swain robert.swain at gmail.com
Tue Dec 4 01:49:33 CET 2007


On Tue, 2007-12-04 at 01:38 +0100, Diego Biurrun wrote:
> On Tue, Dec 04, 2007 at 01:35:28AM +0100, superdump wrote:
> > 
> > --- amr/amrnbfloatdec.c	(original)
> > +++ amr/amrnbfloatdec.c	Tue Dec  4 01:35:28 2007
> > @@ -722,16 +722,16 @@ static void decode_8_pulses_31bits(int16
> >      // coded using 7+3 bits with the 3 LSBs being, individually, the LSB of 1 of
> >      // the 3 pulses and the upper 7 bits being coded in base 5
> >      temp = fixed_index[4] >> 3;
> > -    pulse_position[0] = (temp    %5)<<1 +  fixed_index[4]    &1;
> > -    pulse_position[4] = (temp /5)%5)<<1 + (fixed_index[4]>>1)&1;
> > -    pulse_position[1] = (temp/25)%5)<<1 + (fixed_index[4]>>2)&1;
> > +    pulse_position[0] = ((temp    %5)<<1) + ( fixed_index[4]    &1);
> > +    pulse_position[4] = ((temp /5)%5)<<1) + ((fixed_index[4]>>1)&1);
> > +    pulse_position[1] = ((temp/25)%5)<<1) + ((fixed_index[4]>>2)&1);
> 
> Here (and everywhere else) I think some spaces around operators would
> improve readability.

I thought you were asleep. ;)

I have a habit of putting spaces around + and - but not * and /.
Probably because that's how I would write mathematics.

Admittedly this bit of code in particular looks disgusting and
formatting suggestions will certainly be welcome.

Right now, however, I'm on the warpath of making the code compile as
this is my first attempt after writing it all, hence the barrage of
commits of fixes for silly mistakes.

Rob




More information about the FFmpeg-soc mailing list