diff --git a/Doxyfile b/Doxyfile index 461d1540750f275d23fa21b1e55b4067fb2598ef..b3175bbe9521b3e69dcc82609e87d57e237b141d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = CELT -PROJECT_NUMBER = 0.3.2 +PROJECT_NUMBER = 0.5.0 OUTPUT_DIRECTORY = doc/API CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff --git a/Doxyfile.devel b/Doxyfile.devel index 5aa7e2cba60d27a07ac0ca4a934dc7a16f45d524..39ef5134d902fd0277255093c401f88084edeb9f 100644 --- a/Doxyfile.devel +++ b/Doxyfile.devel @@ -5,7 +5,7 @@ #--------------------------------------------------------------------------- DOXYFILE_ENCODING = UTF-8 PROJECT_NAME = CELT -PROJECT_NUMBER = 0.3.2 +PROJECT_NUMBER = 0.5.0 OUTPUT_DIRECTORY = doc/devel CREATE_SUBDIRS = NO OUTPUT_LANGUAGE = English diff --git a/configure.ac b/configure.ac index befb94f98ed6eb1b27a6463fdc5b0e3c12a6eba3..2ab7876af02b85e12ce7c30ee2eb4030dc2ed090 100644 --- a/configure.ac +++ b/configure.ac @@ -5,8 +5,8 @@ AC_INIT(libcelt/arch.h) AM_CONFIG_HEADER([config.h]) CELT_MAJOR_VERSION=0 -CELT_MINOR_VERSION=4 -CELT_MICRO_VERSION=1 +CELT_MINOR_VERSION=5 +CELT_MICRO_VERSION=0 CELT_EXTRA_VERSION= CELT_VERSION=$CELT_MAJOR_VERSION.$CELT_MINOR_VERSION.$CELT_MICRO_VERSION$CELT_EXTRA_VERSION diff --git a/libcelt/Makefile.am b/libcelt/Makefile.am index 184d23ef531419af742c0ff2556b48d4a0e0440c..d34c1dc57fe9252e92a107cab4934bcf12bd8c49 100644 --- a/libcelt/Makefile.am +++ b/libcelt/Makefile.am @@ -24,7 +24,7 @@ libcelt_la_SOURCES = bands.c celt.c cwrs.c ecintrin.h entcode.c \ libcelt_la_LDFLAGS = -version-info @CELT_LT_CURRENT@:@CELT_LT_REVISION@:@CELT_LT_AGE@ noinst_HEADERS = _kiss_fft_guts.h arch.h bands.h fixed_c5x.h fixed_c6x.h \ - cwrs.h ecintrin.h entcode.h entdec.h entenc.h fixed_generic.h \ + cwrs.h ecintrin.h entcode.h entdec.h entenc.h fixed_generic.h float_cast.h \ kfft_double.h kfft_single.h kiss_fft.h kiss_fftr.h laplace.h mdct.h mfrngcod.h \ mathops.h modes.h os_support.h pgain_table.h pitch.h psy.h \ quant_bands.h quant_pitch.h rate.h stack_alloc.h vq.h diff --git a/libcelt/celt.h b/libcelt/celt.h index 33c6ef37b143ccb3a8ba2155f8f953efeacc3664..c77f058328e9020145027a512550bd0a2baf6754 100644 --- a/libcelt/celt.h +++ b/libcelt/celt.h @@ -68,8 +68,8 @@ extern "C" { #define CELT_UNIMPLEMENTED -5 /* Requests */ -/** Controls the complexity from 0-10 (int) */ #define CELT_SET_COMPLEXITY_REQUEST 2 +/** Controls the complexity from 0-10 (int) */ #define CELT_SET_COMPLEXITY(x) CELT_SET_COMPLEXITY_REQUEST, _celt_check_int(x) /** GET the frame size used in the current mode */ @@ -145,18 +145,37 @@ EXPORT void celt_encoder_destroy(CELTEncoder *st); /** Encodes a frame of audio. @param st Encoder state - @param pcm PCM audio in signed 16-bit format (native endian). There must be - exactly frame_size samples per channel. The input data is - overwritten by a copy of what the remote decoder would decode. + @param pcm PCM audio in signed float format. There must be + * exactly frame_size samples per channel. The input data is + * overwritten by a copy of what the remote decoder would decode. + @param optional_synthesis If not NULL, the encoder copies the audio signal that + * the decoder would decode. It is the same as calling the + * decoder on the compressed data, just faster. @param compressed The compressed data is written here @param nbCompressedBytes Number of bytes to use for compressing the frame - (can change from one frame to another) + * (can change from one frame to another) @return Number of bytes written to "compressed". Should be the same as - "nbCompressedBytes" unless the stream is VBR. If negative, an error - has occured (see error codes). It is IMPORTANT that the length returned - be somehow transmitted to the decoder. Otherwise, no decoding is possible. + * "nbCompressedBytes" unless the stream is VBR. If negative, an error + * has occured (see error codes). It is IMPORTANT that the length returned + * be somehow transmitted to the decoder. Otherwise, no decoding is possible. */ EXPORT int celt_encode_float(CELTEncoder *st, const float *pcm, float *optional_synthesis, unsigned char *compressed, int nbCompressedBytes); +/** Encodes a frame of audio. + @param st Encoder state + @param pcm PCM audio in signed 16-bit format (native endian). There must be + * exactly frame_size samples per channel. The input data is + * overwritten by a copy of what the remote decoder would decode. + @param optional_synthesis If not NULL, the encoder copies the audio signal that + * the decoder would decode. It is the same as calling the + * decoder on the compressed data, just faster. + @param compressed The compressed data is written here + @param nbCompressedBytes Number of bytes to use for compressing the frame + * (can change from one frame to another) + @return Number of bytes written to "compressed". Should be the same as + * "nbCompressedBytes" unless the stream is VBR. If negative, an error + * has occured (see error codes). It is IMPORTANT that the length returned + * be somehow transmitted to the decoder. Otherwise, no decoding is possible. + */ EXPORT int celt_encode(CELTEncoder *st, const celt_int16_t *pcm, celt_int16_t *optional_synthesis, unsigned char *compressed, int nbCompressedBytes); /** Query and set encoder parameters @@ -189,10 +208,19 @@ EXPORT void celt_decoder_destroy(CELTDecoder *st); @param len Number of bytes to read from "data". This MUST be exactly the number of bytes returned by the encoder. Using a larger value WILL NOT WORK. @param pcm One frame (frame_size samples per channel) of decoded PCM will be - returned here. + returned here in float format. @return Error code. */ EXPORT int celt_decode_float(CELTDecoder *st, unsigned char *data, int len, float *pcm); +/** Decodes a frame of audio. + @param st Decoder state + @param data Compressed data produced by an encoder + @param len Number of bytes to read from "data". This MUST be exactly the number + of bytes returned by the encoder. Using a larger value WILL NOT WORK. + @param pcm One frame (frame_size samples per channel) of decoded PCM will be + returned here in 16-bit PCM format (native endian). + @return Error code. + */ EXPORT int celt_decode(CELTDecoder *st, unsigned char *data, int len, celt_int16_t *pcm); /* @} */ diff --git a/libcelt/float_cast.h b/libcelt/float_cast.h index 9e74c69aebd4ec284e5fa1bb0804d3ce2f478e95..280b4911fbb6ff793079d8d19d8d8b60a838ed43 100644 --- a/libcelt/float_cast.h +++ b/libcelt/float_cast.h @@ -94,8 +94,10 @@ #else +#ifdef __GNUC__ /* supported by gcc, but not by all other compilers*/ #warning "Don't have the functions lrint() and lrintf ()." #warning "Replacing these functions with a standard C cast." +#endif /* __GNUC__ */ #include <math.h> diff --git a/libcelt/modes.h b/libcelt/modes.h index 72015dd9500d52c83d52de8081815bd8d14db293..1126e1a669416cfb6fa0e1a0e8b8fa13ccd4be1a 100644 --- a/libcelt/modes.h +++ b/libcelt/modes.h @@ -39,7 +39,7 @@ #include "psy.h" #include "pitch.h" -#define CELT_BITSTREAM_VERSION 0x80000004 +#define CELT_BITSTREAM_VERSION 0x80000005 #ifdef STATIC_MODES #include "static_modes.h"