[FFmpeg-devel] [PATCH] Move lpc utility code from flacenc.c to?lpc.{c|h}
Michael Niedermayer
michaelni
Fri Aug 15 13:10:59 CEST 2008
On Fri, Aug 15, 2008 at 03:44:25PM +0530, Jai Menon wrote:
> Hi,
>
> On Friday 15 Aug 2008 3:28:26 pm Michael Niedermayer wrote:
> > On Fri, Aug 15, 2008 at 11:44:10AM +0530, Jai Menon wrote:
> > > Hi,
> > >
> > > Attached patch moves a few functions from the flac encoder so that it can
> > > be shared by the alac encoder.
> > >
> > > FWIW, 'make test' was successful.
> > >
> > > Regards,
> > >
> > > Jai Menon
> > > <realityman at gmx.net>
> > >
> > > Index: libavcodec/lpc.c
> > > ===================================================================
> > > --- libavcodec/lpc.c (revision 0)
> > > +++ libavcodec/lpc.c (revision 0)
> > > @@ -0,0 +1,117 @@
> > > +/**
> > > + * LPC utility code
> > > + * Copyright (c) 2006 Justin Ruggles <jruggle at earthlink.net>
> > > + *
> > > + * This file is part of FFmpeg.
> > > + *
> > > + * FFmpeg is free software; you can redistribute it and/or
> > > + * modify it under the terms of the GNU Lesser General Public
> > > + * License as published by the Free Software Foundation; either
> > > + * version 2.1 of the License, or (at your option) any later version.
> > > + *
> > > + * FFmpeg is distributed in the hope that it will be useful,
> > > + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> > > + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> > > + * Lesser General Public License for more details.
> > > + *
> > > + * You should have received a copy of the GNU Lesser General Public
> > > + * License along with FFmpeg; if not, write to the Free Software
> > > + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
> > > 02110-1301 USA + */
> > > +
> > > +#include <inttypes.h>
> > > +#include "libavutil/avutil.h"
> > > +#include "lpc.h"
> > > +
> > > +/**
> > > + * Levinson-Durbin recursion.
> > > + * Produces LPC coefficients from autocorrelation data.
> > > + */
> > > +void compute_lpc_coefs(const double *autoc, int max_order,
> > > + double lpc[][MAX_LPC_ORDER], double *ref)
> >
> > global functions require a ff_ prefix to avoid name clashes with other libs
> > when libavcodec happens to be linked to an application that also links to
> > various other stuff.
> >
> > Also ideally there should be no fixed MAX_LPC_ORDER
> >
>
> So is is okay to allocate memory dynamically for the lpc_tmp buffer?
> I was concerned about the extra overhead.
good point, leave MAX_LPC_ORDER for now
[...]
--
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/20080815/7a9a5005/attachment.pgp>
More information about the ffmpeg-devel
mailing list