Revision 77a78e9b libavcodec/lpc.h
libavcodec/lpc.h  

37  37  
38  38  
39  39 
typedef struct LPCContext { 
40 
int blocksize; 

41 
int max_order; 

42 
enum AVLPCType lpc_type; 

43 
double *windowed_samples; 

44  
45 
/** 

46 
* Apply a Welch window to an array of input samples. 

47 
* The output samples have the same scale as the input, but are in double 

48 
* sample format. 

49 
* @param data input samples 

50 
* @param len number of input samples 

51 
* @param w_data output samples 

52 
*/ 

53 
void (*lpc_apply_welch_window)(const int32_t *data, int len, 

54 
double *w_data); 

40  55 
/** 
41  56 
* Perform autocorrelation on input samples with delay of 0 to lag. 
42  57 
* @param data input samples. 
43 
* no alignment needed. 

58 
* constraints: no alignment needed, but must have have at 

59 
* least lag*sizeof(double) valid bytes preceeding it, and 

60 
* size must be at least (len+1)*sizeof(double) if data is 

61 
* 16byte aligned or (len+2)*sizeof(double) if data is 

62 
* unaligned. 

44  63 
* @param len number of input samples to process 
45  64 
* @param lag maximum delay to calculate 
46  65 
* @param autoc output autocorrelation coefficients. 
47  66 
* constraints: array size must be at least lag+1. 
48  67 
*/ 
49 
void (*lpc_compute_autocorr)(const int32_t *data, int len, int lag,


68 
void (*lpc_compute_autocorr)(const double *data, int len, int lag,


50  69 
double *autoc); 
51  70 
} LPCContext; 
52  71  
...  ...  
64  83 
/** 
65  84 
* Initialize LPCContext. 
66  85 
*/ 
67 
void ff_lpc_init(LPCContext *s); 

86 
int ff_lpc_init(LPCContext *s, int blocksize, int max_order, 

87 
enum AVLPCType lpc_type); 

68  88 
void ff_lpc_init_x86(LPCContext *s); 
69  89  
90 
/** 

91 
* Uninitialize LPCContext. 

92 
*/ 

93 
void ff_lpc_end(LPCContext *s); 

94  
70  95 
#ifdef LPC_USE_DOUBLE 
71  96 
#define LPC_TYPE double 
72  97 
#else 
Also available in: Unified diff