[xiph-commits] r17910 - trunk/ghost/monty/chirp
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Thu Mar 24 03:57:48 PDT 2011
Author: xiphmont
Date: 2011-03-24 03:57:48 -0700 (Thu, 24 Mar 2011)
New Revision: 17910
Modified:
trunk/ghost/monty/chirp/lpc.c
trunk/ghost/monty/chirp/lpc.h
Log:
Cleanup fixes to lpc so it compiles
Modified: trunk/ghost/monty/chirp/lpc.c
===================================================================
--- trunk/ghost/monty/chirp/lpc.c 2011-03-23 22:15:04 UTC (rev 17909)
+++ trunk/ghost/monty/chirp/lpc.c 2011-03-24 10:57:48 UTC (rev 17910)
@@ -47,11 +47,9 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#include "os.h"
#include "smallft.h"
#include "lpc.h"
#include "scales.h"
-#include "misc.h"
/* Autocorrelation LPC coeff generation algorithm invented by
N. Levinson in 1947, modified by J. Durbin in 1959. */
@@ -141,13 +139,13 @@
y-=work[o++]*coeff[--p];
*data=work[o]=y;
- data+=step
+ data+=step;
}
}
#define ORDER 16
void preextrapolate(float *data, int data_n, float *predata,int pre_n){
- int i,j;
+ int j;
float lpc[ORDER];
float *work=alloca(data_n*sizeof(*work));
@@ -164,10 +162,9 @@
}
void postextrapolate(float *data, int data_n, float *postdata,int post_n){
- int i,j;
float lpc[ORDER];
- lpc_from_data(work,lpc,data_n,ORDER);
+ lpc_from_data(data,lpc,data_n,ORDER);
/* run the predictor filter */
lpc_predict(lpc,data+data_n-ORDER,ORDER,postdata,post_n,1);
Modified: trunk/ghost/monty/chirp/lpc.h
===================================================================
--- trunk/ghost/monty/chirp/lpc.h 2011-03-23 22:15:04 UTC (rev 17909)
+++ trunk/ghost/monty/chirp/lpc.h 2011-03-24 10:57:48 UTC (rev 17910)
@@ -1,12 +1,12 @@
/********************************************************************
* *
- * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
+ * THIS FILE IS PART OF THE OggGhost SOFTWARE CODEC SOURCE CODE. *
* USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS *
* GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
* IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
* *
- * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2002 *
- * by the XIPHOPHORUS Company http://www.xiph.org/ *
+ * THE OggGhost SOURCE CODE IS (C) COPYRIGHT 1994-2011 *
+ * by the Xiph.Org Foundation http://www.xiph.org/ *
* *
********************************************************************
@@ -15,15 +15,10 @@
********************************************************************/
-#ifndef _V_LPC_H_
-#define _V_LPC_H_
+#ifndef _G_LPC_H_
+#define _G_LPC_H_
-#include "vorbis/codec.h"
+extern void preextrapolate(float *data, int data_n, float *predata,int pre_n);
+extern void postextrapolate(float *data, int data_n, float *postdata,int post_n);
-/* simple linear scale LPC code */
-extern float vorbis_lpc_from_data(float *data,float *lpc,int n,int m);
-
-extern void vorbis_lpc_predict(float *coeff,float *prime,int m,
- float *data,long n);
-
#endif
More information about the commits
mailing list