[FFmpeg-devel] [PATCH] Common fixed-point ACELP routines (1/3) - math
Michael Niedermayer
michaelni
Fri Apr 25 17:02:18 CEST 2008
On Fri, Apr 25, 2008 at 07:14:18PM +0700, Vladimir Voroshilov wrote:
> Michael Niedermayer wrote:
> > On Fri, Apr 25, 2008 at 02:20:46PM +0700, Vladimir Voroshilov wrote:
>
> [...]
>
> > > +/**
> > > + * \brief Calculates sum of array elements multiplications
> > > + * \param speech array with input data
> > > + * \param cycles number elements to proceed
> > > + * \param offset offset for calculation sum of s[i]*s[i+offset]
> > > + * \param shift right shift by this value will be done before multiplication
> > > + *
> > > + * \return sum of multiplications
> > > + *
> > > + * \note array must be at least length+offset long!
> > ^^^^^^
> > its called cycles in the function, and yes i agree length is a better name
> >
> >
> > > + */
> > > +static int sum_of_squares(const int16_t* speech, int cycles, int offset, int shift)
> > > +{
> > > + const int16_t* speech_end;
> > > + int sum = 0;
> > > +
> >
> > > + shift <<= 1;
> >
> > I would prefer if this is done outside of the function, doing it inside
> > means only even shift values can be used.
> v>
>
> All above fixed.
looks ok
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have never wished to cater to the crowd; for what I know they do not
approve, and what they approve I do not know. -- Epicurus
-------------- 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/20080425/127b2360/attachment.pgp>
More information about the ffmpeg-devel
mailing list