FFmpeg
Loading...
Searching...
No Matches
lpc.h File Reference
#include <stdint.h>
#include <stddef.h>
#include "libavutil/lls.h"

Go to the source code of this file.

Data Structures

struct  LPCContext
 

Macros

#define ORDER_METHOD_EST   0
 
#define ORDER_METHOD_2LEVEL   1
 
#define ORDER_METHOD_4LEVEL   2
 
#define ORDER_METHOD_8LEVEL   3
 
#define ORDER_METHOD_SEARCH   4
 
#define ORDER_METHOD_LOG   5
 
#define MIN_LPC_ORDER   1
 
#define MAX_LPC_ORDER   32
 

Enumerations

enum  FFLPCType {
  FF_LPC_TYPE_DEFAULT = -1 , FF_LPC_TYPE_NONE = 0 , FF_LPC_TYPE_FIXED = 1 , FF_LPC_TYPE_LEVINSON = 2 ,
  FF_LPC_TYPE_CHOLESKY = 3 , FF_LPC_TYPE_NB
}
 LPC analysis type. More...
 

Functions

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 min_shift, int max_shift, int zero_shift)
 Calculate LPC coefficients for multiple orders.
 
int ff_lpc_calc_ref_coefs (LPCContext *s, const int32_t *samples, int order, double *ref)
 
double ff_lpc_calc_ref_coefs_f (LPCContext *s, const float *samples, int len, int order, double *ref, int apply_window)
 
int ff_lpc_init (LPCContext *s, int blocksize, int max_order, enum FFLPCType lpc_type)
 Initialize LPCContext.
 
void ff_lpc_init_riscv (LPCContext *s)
 
void ff_lpc_init_x86 (LPCContext *s)
 
void ff_lpc_end (LPCContext *s)
 Uninitialize LPCContext.
 

Macro Definition Documentation

◆ ORDER_METHOD_EST

#define ORDER_METHOD_EST   0

◆ ORDER_METHOD_2LEVEL

#define ORDER_METHOD_2LEVEL   1

Definition at line 30 of file lpc.h.

Referenced by dprint_compression_options(), and encode_residual_ch().

◆ ORDER_METHOD_4LEVEL

#define ORDER_METHOD_4LEVEL   2

Definition at line 31 of file lpc.h.

Referenced by dprint_compression_options(), encode_residual_ch(), and flac_encode_init().

◆ ORDER_METHOD_8LEVEL

#define ORDER_METHOD_8LEVEL   3

Definition at line 32 of file lpc.h.

Referenced by dprint_compression_options(), and encode_residual_ch().

◆ ORDER_METHOD_SEARCH

#define ORDER_METHOD_SEARCH   4

Definition at line 33 of file lpc.h.

Referenced by dprint_compression_options(), encode_residual_ch(), and flac_encode_init().

◆ ORDER_METHOD_LOG

#define ORDER_METHOD_LOG   5

Definition at line 34 of file lpc.h.

Referenced by dprint_compression_options(), encode_residual_ch(), and flac_encode_init().

◆ MIN_LPC_ORDER

#define MIN_LPC_ORDER   1

Definition at line 36 of file lpc.h.

Referenced by ff_lpc_calc_coefs().

◆ MAX_LPC_ORDER

Enumeration Type Documentation

◆ FFLPCType

enum FFLPCType

LPC analysis type.

Enumerator
FF_LPC_TYPE_DEFAULT 

use the codec default LPC type

FF_LPC_TYPE_NONE 

do not use LPC prediction or use all zero coefficients

FF_LPC_TYPE_FIXED 

fixed LPC coefficients

FF_LPC_TYPE_LEVINSON 

Levinson-Durbin recursion.

FF_LPC_TYPE_CHOLESKY 

Cholesky factorization.

FF_LPC_TYPE_NB 

Not part of ABI.

Definition at line 42 of file lpc.h.

Function Documentation

◆ 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 min_shift,
int max_shift,
int zero_shift )

Calculate LPC coefficients for multiple orders.

Parameters
lpc_typeLPC method for determining coefficients, see FFLPCType for details

Definition at line 240 of file lpc.c.

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

◆ ff_lpc_calc_ref_coefs()

int ff_lpc_calc_ref_coefs ( LPCContext * s,
const int32_t * samples,
int order,
double * ref )

Definition at line 197 of file lpc.c.

Referenced by cng_encode_frame().

◆ ff_lpc_calc_ref_coefs_f()

double ff_lpc_calc_ref_coefs_f ( LPCContext * s,
const float * samples,
int len,
int order,
double * ref,
int apply_window )

Definition at line 209 of file lpc.c.

Referenced by ff_aac_search_for_tns(), and search_for_tns_short_pooled().

◆ ff_lpc_init()

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

◆ ff_lpc_init_riscv()

void ff_lpc_init_riscv ( LPCContext * s)

Definition at line 31 of file lpc_init.c.

Referenced by ff_lpc_init().

◆ ff_lpc_init_x86()

void ff_lpc_init_x86 ( LPCContext * s)

Definition at line 106 of file lpc_init.c.

Referenced by ff_lpc_init().

◆ ff_lpc_end()