[FFmpeg-devel] [PATCH] Common ACELP routines (3/3) - LPC decoding routines

Michael Niedermayer michaelni
Wed Apr 23 15:42:11 CEST 2008


On Wed, Apr 23, 2008 at 02:02:50PM +0100, Robert Swain wrote:
> On 23 Apr 2008, at 01:38, Michael Niedermayer wrote:
> > On Tue, Apr 22, 2008 at 01:21:24AM +0700, Vladimir Voroshilov wrote:
> >> This patch contains several routines related to LP filter  
> >> coefficients
> >> decoding (not all, but those which
> >> looks like AMR's).
> >
> > [...]
> >
> >> diff --git a/libavcodec/acelp_lpc.c b/libavcodec/acelp_lpc.c
> >> new file mode 100644
> >> index 0000000..65b870d
> >> --- /dev/null
> >> +++ b/libavcodec/acelp_lpc.c
> >
> > lsp.c
> 
> I'd prefer *lpc.* as the code relates to linear predictive coding  
> functions and not just line spectral pairs. But as you please - what  
> is in a name? :)

they could also be split in lsp.c lpc.c :)


> 
> Isn't there some LPC code in FLAC? Is any of that useful?
> 
> > [...]
> >> +void ff_acelp_reorder_lsf(int16_t* lsfq, int16_t  
> >> lsfq_min_distance, int16_t lsfq_min, int16_t lsfq_max)
> >> +{
> >> +    int i;
> >> +
> >> +    lsfq[0] = FFMAX(lsfq[0], lsfq_min); //Is warning required ?
> >> +
> >> +    for(i=0;i<9; i++)
> >> +        lsfq[i+1] = FFMAX(lsfq[i+1], lsfq[i] + lsfq_min_distance);
> >
> > simplification stolen from soc/amrnbdec.c:
> >
> > for(i=0; i<10; i++){
> >    lsf[i] = FFMAX(lsf[i], lsf_min);
> >    lsf_min = lsf[i] + min_distance;
> > }
> >
> > also id make lsfq_min_distance and lsfq_min/max int
> >
> > ahh, and reorder_lsf() in soc/amrnbdec.c is buggy (uninitalized var)
> 
> Fixed. :)
> 
> I haven't looked at these patches yet. I'll try to take a look now.  
> I've forgotten the fixed point code because I didn't like fixed point,  
> gave up on it, rewrote the spec on the wiki and wrote a float version  
> which is in the debugging phase. I'll see if I have any useful  
> comments on the patches though as I would like to have shared code. :)

great :)

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

It is dangerous to be right in matters on which the established authorities
are wrong. -- Voltaire
-------------- 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/20080423/f2f13605/attachment.pgp>



More information about the ffmpeg-devel mailing list