[FFmpeg-soc] [soc]: r921 - qcelp/qcelpdec.c
reynaldo
subversion at mplayerhq.hu
Fri Aug 17 20:55:15 CEST 2007
Author: reynaldo
Date: Fri Aug 17 20:55:15 2007
New Revision: 921
Log:
TRIVIAL
LSP to LPC conversion is wrong, spec is not clear in this regard but
luckily enough this is a somewaht universal process. Im reviewing that
part of the code hard, this are some minor corrections in the (hopefully)
right direction.
Modified:
qcelp/qcelpdec.c
Modified: qcelp/qcelpdec.c
==============================================================================
--- qcelp/qcelpdec.c (original)
+++ qcelp/qcelpdec.c Fri Aug 17 20:55:15 2007
@@ -523,11 +523,11 @@ void qcelp_do_interpolate_lspf(qcelp_pac
/**
* 2.4.3.3.5-1/2
*/
-static void qcelp_lsp2paqa(float *lspf, float *pa, float *qa)
+static void qcelp_lsp2poly(float *lspf, float *pa, float *qa)
{
int i,j;
- for(i=0; i<10; i++)
+ for(i=0; i<5; i++)
{
pa[i]=1.0+1.0/(i+1);
qa[i]=1.0-1.0/(i+1);
@@ -545,10 +545,10 @@ static void qcelp_lsp2paqa(float *lspf,
*/
static void qcelp_lsp2lpc(AVCodecContext *avctx, float *lspf, float *lpc)
{
- float pa[10],qa[10];
+ float pa[5],qa[5];
int i;
- qcelp_lsp2paqa(lspf, pa, qa);
+ qcelp_lsp2poly(lspf, pa, qa);
for(i=0; i< 5; i++)
lpc[i]=-(pa[i]+qa[i])/2.0;
More information about the FFmpeg-soc
mailing list