libavcodec/lpc.c File Reference

#include "libavutil/lls.h"
#include "lpc.h"

Go to the source code of this file.

Defines

#define LPC_USE_DOUBLE
 LPC utility code Copyright (c) 2006 Justin Ruggles <justin.ruggles@gmail.com>.

Functions

static void lpc_apply_welch_window_c (const int32_t *data, int len, double *w_data)
 Apply Welch window function to audio block.
static void lpc_compute_autocorr_c (const double *data, int len, int lag, double *autoc)
 Calculate autocorrelation data from audio samples A Welch window function is applied before calculation.
static void quantize_lpc_coefs (double *lpc_in, int order, int precision, int32_t *lpc_out, int *shift, int max_shift, int zero_shift)
 Quantize LPC coefficients.
static int estimate_best_order (double *ref, int min_order, int max_order)
int ff_lpc_calc_coefs (LPCContext *s, const int32_t *samples, int blocksize, int min_order, int max_order, int precision, int32_t coefs[][MAX_LPC_ORDER], int *shift, enum FFLPCType lpc_type, int lpc_passes, int omethod, int max_shift, int zero_shift)
 Calculate LPC coefficients for multiple orders.
av_cold int ff_lpc_init (LPCContext *s, int blocksize, int max_order, enum FFLPCType lpc_type)
 Initialize LPCContext.
av_cold void ff_lpc_end (LPCContext *s)
 Uninitialize LPCContext.


Define Documentation

#define LPC_USE_DOUBLE

LPC utility code Copyright (c) 2006 Justin Ruggles <justin.ruggles@gmail.com>.

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

Definition at line 24 of file lpc.c.


Function Documentation

static int estimate_best_order ( double *  ref,
int  min_order,
int  max_order 
) [static]

Definition at line 135 of file lpc.c.

Referenced by ff_lpc_calc_coefs().

int ff_lpc_calc_coefs ( LPCContext s,
const int32_t *  samples,
int  blocksize,
int  min_order,
int  max_order,
int  precision,
int32_t  coefs[][MAX_LPC_ORDER],
int *  shift,
enum FFLPCType  lpc_type,
int  lpc_passes,
int  omethod,
int  max_shift,
int  zero_shift 
)

Calculate LPC coefficients for multiple orders.

Parameters:
lpc_type LPC method for determining coefficients, see FFLPCType for details

Definition at line 155 of file lpc.c.

Referenced by calc_predictor_params(), encode_residual_ch(), and ra144_encode_frame().

av_cold void ff_lpc_end ( LPCContext s  ) 

Uninitialize LPCContext.

Definition at line 266 of file lpc.c.

Referenced by alac_encode_close(), ff_lpc_calc_coefs(), flac_encode_close(), and ra144_encode_close().

av_cold int ff_lpc_init ( LPCContext s,
int  blocksize,
int  max_order,
enum FFLPCType  lpc_type 
)

Initialize LPCContext.

Definition at line 241 of file lpc.c.

Referenced by alac_encode_init(), ff_lpc_calc_coefs(), flac_encode_init(), and ra144_encode_init().

static void lpc_apply_welch_window_c ( const int32_t *  data,
int  len,
double *  w_data 
) [static]

Apply Welch window function to audio block.

Definition at line 31 of file lpc.c.

Referenced by ff_lpc_init().

static void lpc_compute_autocorr_c ( const double *  data,
int  len,
int  lag,
double *  autoc 
) [static]

Calculate autocorrelation data from audio samples A Welch window function is applied before calculation.

Definition at line 58 of file lpc.c.

Referenced by ff_lpc_init().

static void quantize_lpc_coefs ( double *  lpc_in,
int  order,
int  precision,
int32_t *  lpc_out,
int *  shift,
int  max_shift,
int  zero_shift 
) [static]

Quantize LPC coefficients.

Definition at line 86 of file lpc.c.

Referenced by ff_lpc_calc_coefs().


Generated on Fri Oct 26 02:43:48 2012 for FFmpeg by  doxygen 1.5.8