[FFmpeg-devel] [PATCH/DRAFT] MonkeyAudio Demuxer/Decoder

Michael Niedermayer michaelni
Mon Jun 25 17:27:36 CEST 2007


Hi

On Mon, Jun 25, 2007 at 06:07:06PM +0300, Uoti Urpala wrote:
> On Mon, 2007-06-25 at 15:28 +0200, Michael Niedermayer wrote:
> > On Mon, Jun 25, 2007 at 02:59:31PM +0300, Kostya wrote:
> > [...]
> > > [...] 
> > > > > > +
> > > > > > +static inline void vector_add (int16_t* v1, int16_t* v2, int order)
> > > > > > +{
> > > > > > +  int or = 1;
> > > > > > +  if (order > 32)
> > > > > > +    or = (order >> 5);
> > > > > > +
> > > > > > +  while (or--)
> > > > > > +  {
> > > > > > +    int i;
> > > > > > +
> > > > > > +    for (i = 0; i < 16; i++)
> > > > > > +      *v1++ += *v2++;
> > > > > > +
> > > > > > +    if (order > 16)
> > > > > > +      for (i = 0; i < 16; i++)
> > > > > > +        *v1++ += *v2++;
> > > > > > +  }
> > > > > > +}
> > > > 
> > > > > and this whole function is just
> > > > > for (i = 0; i < order; i++)
> > > > >     *v1++ += *v2++;
> > > > 
> > > > I've tested it and it's not :-(
> > > 
> > > it does this fixed number of times:
> > > order <= 16: 16 times;
> > > order <= 32: 32 times;
> > > order > 32: (order >> 5) * 32 times or order & ~31 times. 
> > 
> > this function isnt called with any order which is not a multiple of 16 
> > or at least i thouhght so when i wrote my suggestion about simplifying
> > it
> 
> Values greater than 32 are rounded down to the nearest multiple of 32,
> so (2n+1)*16 becomes (2n)*16.

all values larger than 32 with which the function is called are multiples
of 32 at least i cant see anyplace where its called with other values

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Asymptotically faster algorithms should always be preferred if you have
asymptotical amounts of data
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070625/fea11796/attachment.pgp>



More information about the ffmpeg-devel mailing list