All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
adx.c File Reference
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "adx.h"

Go to the source code of this file.


void ff_adx_calculate_coeffs (int cutoff, int sample_rate, int bits, int *coeff)
 Calculate LPC coefficients based on cutoff frequency and sample rate. More...
int ff_adx_decode_header (AVCodecContext *avctx, const uint8_t *buf, int bufsize, int *header_size, int *coeff)
 Decode ADX stream header. More...

Function Documentation

void ff_adx_calculate_coeffs ( int  cutoff,
int  sample_rate,
int  bits,
int coeff 

Calculate LPC coefficients based on cutoff frequency and sample rate.

cutoffcutoff frequency
sample_ratesample rate
bitsnumber of bits used to quantize coefficients
[out]coeff2 quantized LPC coefficients

Definition at line 26 of file adx.c.

Referenced by adx_encode_init(), and ff_adx_decode_header().

int ff_adx_decode_header ( AVCodecContext avctx,
const uint8_t buf,
int  bufsize,
int header_size,
int coeff 

Decode ADX stream header.

Sets avctx->channels and avctx->sample_rate.

avctxcodec context
bufheader data
bufsizedata size, should be at least 24 bytes
[out]header_sizesize of ADX header
[out]coeff2 LPC coefficients, can be NULL
data offset or negative error code if header is invalid

Definition at line 38 of file adx.c.

Referenced by adx_decode_frame(), and adx_decode_init().