[FFmpeg-devel] [PATCH] QCELP decoder

Michael Niedermayer michaelni
Wed Oct 29 01:09:31 CET 2008


On Tue, Oct 28, 2008 at 04:26:36PM -0700, Kenan Gillet wrote:
> On Oct 24, 2008, at 6:00 PM, Michael Niedermayer wrote:
[...]
> >
> >> Index: libavcodec/celp_math.c
> >> ===================================================================
> >> --- libavcodec/celp_math.c	(revision 0)
> >> +++ libavcodec/celp_math.c	(revision 0)
> >> @@ -0,0 +1,40 @@
> >> +/*
> > [...]
> >> + */
> >> +
> >> +/**
> >> + * returns the dot product.
> >> + * @param a input data array
> >> + * @param b input data array
> >> + * @param length number of elements
> >> + *
> >> + * @return dot product = sum of elementwise products
> >> + */
> >> +float ff_dot_product(const float* a, const float* b, int length)
> >> +{
> >> +    float sum = 0;
> >> +    int i;
> >> +
> >> +    for(i=0; i<length; i++)
> >> +        sum += (a[i] * b[i]);
> >> +
> >> +    return sum;
> >> +}
> >
> > superflous () and a dot product is not a celp specific thing
> > the doxy belongs in the header not the c file
> 
> done,
> should it go in libavutil/mathematic.[ch] or somewhere else ?

hmm, good question ...
iam slightly against libavutil/mathematic.[ch] though as libavutil should
stay simple and such loop is so trivial that it would border on bloat for
libavutil IMHO

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I am the wisest man alive, for I know one thing, and that is that I know
nothing. -- Socrates
-------------- 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/20081029/ae1a5558/attachment.pgp>



More information about the ffmpeg-devel mailing list