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_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_NB_CHANNELS   1002
#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 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, const unsigned char *data, int len, float *pcm)
EXPORT int celt_decode (CELTDecoder *st, const unsigned char *data, int len, celt_int16_t *pcm)
EXPORT int celt_decoder_ctl (CELTDecoder *st, int request,...)


Detailed Description

Contains all the functions for encoding and decoding audio.

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

#define CELT_CORRUPTED_DATA   -4

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

Definition at line 67 of file celt.h.

#define CELT_GET_BITSTREAM_VERSION   2000

GET the bit-stream version for compatibility check

Definition at line 104 of file celt.h.

#define CELT_GET_FRAME_SIZE   1000

GET the frame size used in the current mode

Definition at line 95 of file celt.h.

#define CELT_GET_LOOKAHEAD   1001

GET the lookahead used in the current mode

Definition at line 97 of file celt.h.

#define CELT_GET_MODE (  )     CELT_GET_MODE_REQUEST, _celt_check_mode_ptr_ptr(x)

Get the CELTMode used by an encoder or decoder

Definition at line 76 of file celt.h.

#define CELT_GET_NB_CHANNELS   1002

GET the number of channels used in the current mode

Definition at line 99 of file celt.h.

#define CELT_GET_SAMPLE_RATE   1003

GET the sample rate used in the current mode

Definition at line 101 of file celt.h.

#define CELT_INTERNAL_ERROR   -3

An internal error was detected

Definition at line 65 of file celt.h.

#define CELT_INVALID_MODE   -2

The mode struct passed is invalid

Definition at line 63 of file celt.h.

#define CELT_INVALID_STATE   -6

An encoder or decoder structure is invalid or already freed

Definition at line 71 of file celt.h.

#define CELT_OK   0

No error

Definition at line 59 of file celt.h.

#define CELT_RESET_STATE_REQUEST   8

Reset the encoder/decoder memories to zero

Definition at line 91 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 79 of file celt.h.

#define CELT_SET_PREDICTION (  )     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 86 of file celt.h.

#define CELT_SET_VBR_RATE (  )     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 89 of file celt.h.

#define CELT_UNIMPLEMENTED   -5

Invalid/unsupported request number

Definition at line 69 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 117 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 112 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 123 of file celt.h.


Generated on Wed Jul 29 23:04:47 2009 for CELT by  doxygen 1.5.9