libcelt/celt.h File Reference

Contains all the functions for encoding and decoding audio streams. 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_SET_COMPLEXITY(x)   CELT_SET_COMPLEXITY_REQUEST, _celt_check_int(x)
#define CELT_SET_LTP(x)   CELT_SET_LTP_REQUEST, _celt_check_int(x)
#define CELT_GET_FRAME_SIZE   1000
#define CELT_GET_LOOKAHEAD   1001
#define CELT_GET_NB_CHANNELS   1002
#define CELT_GET_BITSTREAM_VERSION   2000

Typedefs

typedef struct CELTEncoder CELTEncoder
 Encoder state.
typedef struct CELTDecoder CELTDecoder
typedef struct CELTMode CELTMode

Functions

EXPORT CELTModecelt_mode_create (celt_int32_t Fs, int channels, int frame_size, int *error)
EXPORT void celt_mode_destroy (CELTMode *mode)
EXPORT int celt_mode_info (const CELTMode *mode, int request, celt_int32_t *value)
EXPORT CELTEncodercelt_encoder_create (const CELTMode *mode)
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_t *pcm, celt_int16_t *optional_synthesis, unsigned char *compressed, int nbCompressedBytes)
EXPORT int celt_encoder_ctl (CELTEncoder *st, int request,...)
EXPORT CELTDecodercelt_decoder_create (const CELTMode *mode)
EXPORT void celt_decoder_destroy (CELTDecoder *st)
EXPORT int celt_decode_float (CELTDecoder *st, unsigned char *data, int len, float *pcm)
EXPORT int celt_decode (CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm)


Detailed Description

Contains all the functions for encoding and decoding audio streams.

Definition in file celt.h.


Define Documentation

#define CELT_BAD_ARG   -1

An (or more) invalid argument (e.g. out of range)

Definition at line 60 of file celt.h.

#define CELT_CORRUPTED_DATA   -4

The data passed (e.g. compressed data to decoder) is corrupted

Definition at line 66 of file celt.h.

#define CELT_GET_BITSTREAM_VERSION   2000

GET the bit-stream version for compatibility check

Definition at line 86 of file celt.h.

#define CELT_GET_FRAME_SIZE   1000

GET the frame size used in the current mode

Definition at line 79 of file celt.h.

#define CELT_GET_LOOKAHEAD   1001

GET the lookahead used in the current mode

Definition at line 81 of file celt.h.

#define CELT_GET_NB_CHANNELS   1002

GET the number of channels used in the current mode

Definition at line 83 of file celt.h.

#define CELT_INTERNAL_ERROR   -3

An internal error was detected

Definition at line 64 of file celt.h.

#define CELT_INVALID_MODE   -2

The mode struct passed is invalid

Definition at line 62 of file celt.h.

#define CELT_OK   0

No error

Definition at line 58 of file celt.h.

#define CELT_SET_COMPLEXITY (  )     CELT_SET_COMPLEXITY_REQUEST, _celt_check_int(x)

Controls the complexity from 0-10 (int)

Definition at line 73 of file celt.h.

#define CELT_SET_LTP (  )     CELT_SET_LTP_REQUEST, _celt_check_int(x)

Activate or deactivate the use of the long term predictor (PITCH) from 0 or 1 (int)

Definition at line 76 of file celt.h.

#define CELT_UNIMPLEMENTED   -5

Invalid/unsupported request number

Definition at line 68 of file celt.h.


Typedef Documentation

typedef struct CELTDecoder CELTDecoder

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 99 of file celt.h.

typedef struct CELTEncoder CELTEncoder

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 94 of file celt.h.

typedef struct CELTMode CELTMode

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 104 of file celt.h.


Generated on Mon Feb 16 15:55:45 2009 for CELT by  doxygen 1.5.8