ref: 5ac6d42e816d06450c953700ce08cc4f47412ace
parent: 926131291f67b5ce998e25910aabafa397c9e061
author: Jean-Marc Valin <[email protected]>
date: Thu Oct 9 03:27:10 EDT 2008
Preparing for 0.5.0
--- 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
--- 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
--- a/configure.ac
+++ b/configure.ac
@@ -5,8 +5,8 @@
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
--- a/libcelt/Makefile.am
+++ b/libcelt/Makefile.am
@@ -24,7 +24,7 @@
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
--- a/libcelt/celt.h
+++ b/libcelt/celt.h
@@ -68,8 +68,8 @@
#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 @@
/** 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 @@
@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);
/* @} */
--- 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>
--- 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"