libcelt/celt.h File Reference
Contains all the functions for encoding and decoding audio.
More...
#include "celt_types.h"
Go to the source code of this file.
Defines |
#define | CELT_OK 0 |
#define | CELT_BAD_ARG -1 |
#define | CELT_INVALID_MODE -2 |
#define | CELT_INTERNAL_ERROR -3 |
#define | CELT_CORRUPTED_DATA -4 |
#define | CELT_UNIMPLEMENTED -5 |
#define | CELT_INVALID_STATE -6 |
#define | CELT_ALLOC_FAIL -7 |
#define | CELT_GET_MODE(x) CELT_GET_MODE_REQUEST, _celt_check_mode_ptr_ptr(x) |
#define | CELT_SET_COMPLEXITY(x) CELT_SET_COMPLEXITY_REQUEST, _celt_check_int(x) |
#define | CELT_SET_PREDICTION(x) CELT_SET_PREDICTION_REQUEST, _celt_check_int(x) |
#define | CELT_SET_VBR_RATE(x) CELT_SET_VBR_RATE_REQUEST, _celt_check_int(x) |
#define | CELT_RESET_STATE_REQUEST 8 |
#define | CELT_GET_FRAME_SIZE 1000 |
#define | CELT_GET_LOOKAHEAD 1001 |
#define | CELT_GET_SAMPLE_RATE 1003 |
#define | CELT_GET_BITSTREAM_VERSION 2000 |
Typedefs |
typedef struct CELTEncoder | CELTEncoder |
| Encoder state.
|
typedef struct CELTDecoder | CELTDecoder |
typedef struct CELTMode | CELTMode |
Functions |
EXPORT CELTMode * | celt_mode_create (celt_int32 Fs, int frame_size, int *error) |
EXPORT void | celt_mode_destroy (CELTMode *mode) |
EXPORT int | celt_mode_info (const CELTMode *mode, int request, celt_int32 *value) |
EXPORT CELTEncoder * | celt_encoder_create (const CELTMode *mode, int channels, int *error) |
EXPORT void | celt_encoder_destroy (CELTEncoder *st) |
EXPORT int | celt_encode_float (CELTEncoder *st, const float *pcm, float *optional_synthesis, unsigned char *compressed, int nbCompressedBytes) |
EXPORT int | celt_encode (CELTEncoder *st, const celt_int16 *pcm, celt_int16 *optional_synthesis, unsigned char *compressed, int nbCompressedBytes) |
EXPORT int | celt_encoder_ctl (CELTEncoder *st, int request,...) |
EXPORT CELTDecoder * | celt_decoder_create (const CELTMode *mode, int channels, int *error) |
EXPORT void | celt_decoder_destroy (CELTDecoder *st) |
EXPORT int | celt_decode_float (CELTDecoder *st, const unsigned char *data, int len, float *pcm) |
EXPORT int | celt_decode (CELTDecoder *st, const unsigned char *data, int len, celt_int16 *pcm) |
EXPORT int | celt_decoder_ctl (CELTDecoder *st, int request,...) |
EXPORT const char * | celt_strerror (int error) |
Detailed Description
Contains all the functions for encoding and decoding audio.
Definition in file celt.h.
Define Documentation
#define CELT_ALLOC_FAIL -7 |
Memory allocation has failed
Definition at line 75 of file celt.h.
An (or more) invalid argument (e.g. out of range)
Definition at line 63 of file celt.h.
#define CELT_CORRUPTED_DATA -4 |
The data passed (e.g. compressed data to decoder) is corrupted
Definition at line 69 of file celt.h.
#define CELT_GET_BITSTREAM_VERSION 2000 |
GET the bit-stream version for compatibility check
Definition at line 106 of file celt.h.
#define CELT_GET_FRAME_SIZE 1000 |
GET the frame size used in the current mode
Definition at line 99 of file celt.h.
#define CELT_GET_LOOKAHEAD 1001 |
GET the lookahead used in the current mode
Definition at line 101 of file celt.h.
#define CELT_GET_MODE |
( |
x |
|
) |
CELT_GET_MODE_REQUEST, _celt_check_mode_ptr_ptr(x) |
Get the CELTMode used by an encoder or decoder
Definition at line 80 of file celt.h.
#define CELT_GET_SAMPLE_RATE 1003 |
GET the sample rate used in the current mode
Definition at line 103 of file celt.h.
#define CELT_INTERNAL_ERROR -3 |
An internal error was detected
Definition at line 67 of file celt.h.
#define CELT_INVALID_MODE -2 |
The mode struct passed is invalid
Definition at line 65 of file celt.h.
#define CELT_INVALID_STATE -6 |
An encoder or decoder structure is invalid or already freed
Definition at line 73 of file celt.h.
No error
Definition at line 61 of file celt.h.
#define CELT_RESET_STATE_REQUEST 8 |
Reset the encoder/decoder memories to zero
Definition at line 95 of file celt.h.
#define CELT_SET_COMPLEXITY |
( |
x |
|
) |
CELT_SET_COMPLEXITY_REQUEST, _celt_check_int(x) |
Controls the complexity from 0-10 (int)
Definition at line 83 of file celt.h.
#define CELT_SET_PREDICTION |
( |
x |
|
) |
CELT_SET_PREDICTION_REQUEST, _celt_check_int(x) |
Controls the use of interframe prediction. 0=Independent frames 1=Short term interframe prediction allowed 2=Long term prediction allowed
Definition at line 90 of file celt.h.
#define CELT_SET_VBR_RATE |
( |
x |
|
) |
CELT_SET_VBR_RATE_REQUEST, _celt_check_int(x) |
Set the target VBR rate in bits per second(int); 0=CBR (default)
Definition at line 93 of file celt.h.
#define CELT_UNIMPLEMENTED -5 |
Invalid/unsupported request number
Definition at line 71 of file celt.h.
Typedef Documentation
State of the decoder. One decoder state is needed for each stream. It is initialised once at the beginning of the stream. Do *not* re-initialise the state for every frame
Definition at line 119 of file celt.h.
Encoder state.
Contains the state of an encoder. One encoder state is needed for each stream. It is initialised once at the beginning of the stream. Do *not* re-initialise the state for every frame.
Definition at line 114 of file celt.h.
The mode contains all the information necessary to create an encoder. Both the encoder and decoder need to be initialised with exactly the same mode, otherwise the quality will be very bad
Definition at line 125 of file celt.h.