SEGA CRI adx codecs.
More...
#include <stdint.h>
#include "avcodec.h"
Go to the source code of this file.
|
|
#define | COEFF_BITS 12 |
| |
|
#define | BLOCK_SIZE 18 |
| |
|
#define | BLOCK_SAMPLES 32 |
| |
§ ff_adx_calculate_coeffs()
| 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
-
| cutoff | cutoff frequency |
| sample_rate | sample rate |
| bits | number of bits used to quantize coefficients |
| [out] | coeff | 2 quantized LPC coefficients |
§ 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.
- Parameters
-
| avctx | codec context |
| buf | header data |
| bufsize | data size, should be at least 24 bytes |
| [out] | header_size | size of ADX header |
| [out] | coeff | 2 LPC coefficients, can be NULL |
- Returns
- data offset or negative error code if header is invalid