adx.h File Reference

SEGA CRI adx codecs. More...

#include <stdint.h>
#include "avcodec.h"
Include dependency graph for adx.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  ADXChannelState
 
struct  ADXContext
 

Macros

#define COEFF_BITS   12
 
#define BLOCK_SIZE   18
 
#define BLOCK_SAMPLES   32
 

Typedefs

typedef struct ADXChannelState ADXChannelState
 
typedef struct ADXContext ADXContext
 

Functions

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 avpriv_adx_decode_header (AVCodecContext *avctx, const uint8_t *buf, int bufsize, int *header_size, int *coeff)
 Decode ADX stream header. More...
 

Detailed Description

SEGA CRI adx codecs.

Reference documents: http://ku-www.ss.titech.ac.jp/~yatsushi/adx.html adx2wav & wav2adx http://www.geocities.co.jp/Playtown/2004/

Definition in file adx.h.

Macro Definition Documentation

#define BLOCK_SAMPLES   32
#define COEFF_BITS   12

Definition at line 51 of file adx.h.

Referenced by adx_decode(), adx_encode(), adx_encode_init(), and avpriv_adx_decode_header().

Typedef Documentation

typedef struct ADXContext ADXContext

Function Documentation

int avpriv_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.

Parameters
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
Returns
data offset or negative error code if header is invalid

Definition at line 38 of file adx.c.

Referenced by adx_decode_frame(), adx_decode_init(), and adx_read_header().

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

Calculate LPC coefficients based on cutoff frequency and sample rate.

Parameters
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 avpriv_adx_decode_header().