speex.h   speex.h 
skipping to change at line 171 skipping to change at line 171
/* Prototypes for mode function pointers */ /* Prototypes for mode function pointers */
/** Encoder state initialization function */ /** Encoder state initialization function */
typedef void *(*encoder_init_func)(const struct SpeexMode *mode); typedef void *(*encoder_init_func)(const struct SpeexMode *mode);
/** Encoder state destruction function */ /** Encoder state destruction function */
typedef void (*encoder_destroy_func)(void *st); typedef void (*encoder_destroy_func)(void *st);
/** Main encoding function */ /** Main encoding function */
typedef int (*encode_func)(void *state, short *in, SpeexBits *bits); typedef int (*encode_func)(void *state, void *in, SpeexBits *bits);
/** Function for controlling the encoder options */ /** Function for controlling the encoder options */
typedef int (*encoder_ctl_func)(void *state, int request, void *ptr); typedef int (*encoder_ctl_func)(void *state, int request, void *ptr);
/** Decoder state initialization function */ /** Decoder state initialization function */
typedef void *(*decoder_init_func)(const struct SpeexMode *mode); typedef void *(*decoder_init_func)(const struct SpeexMode *mode);
/** Decoder state destruction function */ /** Decoder state destruction function */
typedef void (*decoder_destroy_func)(void *st); typedef void (*decoder_destroy_func)(void *st);
/** Main decoding function */ /** Main decoding function */
typedef int (*decode_func)(void *state, SpeexBits *bits, short *out); typedef int (*decode_func)(void *state, SpeexBits *bits, void *out);
/** Function for controlling the decoder options */ /** Function for controlling the decoder options */
typedef int (*decoder_ctl_func)(void *state, int request, void *ptr); typedef int (*decoder_ctl_func)(void *state, int request, void *ptr);
/** Query function for a mode */ /** Query function for a mode */
typedef int (*mode_query_func)(const void *mode, int request, void *ptr); typedef int (*mode_query_func)(const void *mode, int request, void *ptr);
/** Struct defining a Speex mode */ /** Struct defining a Speex mode */
typedef struct SpeexMode { typedef struct SpeexMode {
/** Pointer to the low-level mode data */ /** Pointer to the low-level mode data */
skipping to change at line 256 skipping to change at line 256
/** Frees all resources associated to an existing Speex encoder state. /** Frees all resources associated to an existing Speex encoder state.
* @param state Encoder state to be destroyed */ * @param state Encoder state to be destroyed */
void speex_encoder_destroy(void *state); void speex_encoder_destroy(void *state);
/** Uses an existing encoder state to encode one frame of speech pointed to by /** Uses an existing encoder state to encode one frame of speech pointed to by
"in". The encoded bit-stream is saved in "bits". "in". The encoded bit-stream is saved in "bits".
@param state Encoder state @param state Encoder state
@param in Frame that will be encoded with a +-2^16 range @param in Frame that will be encoded with a +-2^16 range
@param bits Bit-stream where the data will be written @param bits Bit-stream where the data will be written
*/ */
int speex_encode(void *state, short *in, SpeexBits *bits); int speex_encode(void *state, float *in, SpeexBits *bits);
/** Uses an existing encoder state to encode one frame of speech pointed to
by
"in". The encoded bit-stream is saved in "bits".
@param state Encoder state
@param in Frame that will be encoded with a +-2^16 range
@param bits Bit-stream where the data will be written
*/
int speex_encode_int(void *state, short *in, SpeexBits *bits);
/** Used like the ioctl function to control the encoder parameters /** Used like the ioctl function to control the encoder parameters
* *
* @param state Encoder state * @param state Encoder state
* @param request ioctl-type request (one of the SPEEX_* macros) * @param request ioctl-type request (one of the SPEEX_* macros)
* @param ptr Data exchanged to-from function * @param ptr Data exchanged to-from function
* @return 0 if frame needs not be transmitted (DTX only), 1 otherwise * @return 0 if frame needs not be transmitted (DTX only), 1 otherwise
*/ */
int speex_encoder_ctl(void *state, int request, void *ptr); int speex_encoder_ctl(void *state, int request, void *ptr);
skipping to change at line 291 skipping to change at line 299
void speex_decoder_destroy(void *state); void speex_decoder_destroy(void *state);
/** Uses an existing decoder state to decode one frame of speech from /** Uses an existing decoder state to decode one frame of speech from
* bit-stream bits. The output speech is saved written to out. * bit-stream bits. The output speech is saved written to out.
* *
* @param state Decoder state * @param state Decoder state
* @param bits Bit-stream from which to decode the frame (NULL if the packe t was lost) * @param bits Bit-stream from which to decode the frame (NULL if the packe t was lost)
* @param out Where to write the decoded frame * @param out Where to write the decoded frame
* @return return status (0 for no error, -1 for end of stream, -2 other) * @return return status (0 for no error, -1 for end of stream, -2 other)
*/ */
int speex_decode(void *state, SpeexBits *bits, short *out); int speex_decode(void *state, SpeexBits *bits, float *out);
/** Uses an existing decoder state to decode one frame of speech from
* bit-stream bits. The output speech is saved written to out.
*
* @param state Decoder state
* @param bits Bit-stream from which to decode the frame (NULL if the packe
t was lost)
* @param out Where to write the decoded frame
* @return return status (0 for no error, -1 for end of stream, -2 other)
*/
int speex_decode_int(void *state, SpeexBits *bits, short *out);
/** Used like the ioctl function to control the encoder parameters /** Used like the ioctl function to control the encoder parameters
* *
* @param state Decoder state * @param state Decoder state
* @param request ioctl-type request (one of the SPEEX_* macros) * @param request ioctl-type request (one of the SPEEX_* macros)
* @param ptr Data exchanged to-from function * @param ptr Data exchanged to-from function
* @return 0 for no error, 1 if a terminator is reached, 2 for another erro r * @return 0 for no error, 1 if a terminator is reached, 2 for another erro r
*/ */
int speex_decoder_ctl(void *state, int request, void *ptr); int speex_decoder_ctl(void *state, int request, void *ptr);
 End of changes. 4 change blocks. 
4 lines changed or deleted 24 lines changed or added


 speex_echo.h   speex_echo.h 
skipping to change at line 32 skipping to change at line 32
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef SPEEX_ECHO_H
#define SPEEX_ECHO_H
#ifdef __cplusplus
extern "C" {
#endif
struct drft_lookup; struct drft_lookup;
typedef struct SpeexEchoState { typedef struct SpeexEchoState {
int frame_size; /**< Number of samples processed each time */ int frame_size; /**< Number of samples processed each time */
int window_size; int window_size;
int M; int M;
int cancel_count; int cancel_count;
float adapt_rate; float adapt_rate;
float *x; float *x;
skipping to change at line 66 skipping to change at line 73
} SpeexEchoState; } SpeexEchoState;
/** Creates a new echo canceller state */ /** Creates a new echo canceller state */
SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length); SpeexEchoState *speex_echo_state_init(int frame_size, int filter_length);
/** Destroys an echo canceller state */ /** Destroys an echo canceller state */
void speex_echo_state_destroy(SpeexEchoState *st); void speex_echo_state_destroy(SpeexEchoState *st);
/** Performs echo cancellation a frame */ /** Performs echo cancellation a frame */
void speex_echo_cancel(SpeexEchoState *st, float *ref, float *echo, float * void speex_echo_cancel(SpeexEchoState *st, short *ref, short *echo, short *
out, float *Y); out, int *Y);
#ifdef __cplusplus
}
#endif
#endif
 End of changes. 2 change blocks. 
0 lines changed or deleted 7 lines changed or added


 speex_jitter.h   speex_jitter.h 
skipping to change at line 35 skipping to change at line 35
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef SPEEX_JITTER_H
#define SPEEX_JITTER_H
#include "speex.h" #include "speex.h"
#include "speex_bits.h" #include "speex_bits.h"
#ifndef SPEEX_JITTER_H #ifdef __cplusplus
#define SPEEX_JITTER_H extern "C" {
#endif
#define SPEEX_JITTER_MAX_PACKET_SIZE 2000 #define SPEEX_JITTER_MAX_PACKET_SIZE 2000
#define SPEEX_JITTER_MAX_BUFFER_SIZE 20 #define SPEEX_JITTER_MAX_BUFFER_SIZE 20
typedef struct SpeexJitter { typedef struct SpeexJitter {
int buffer_size; int buffer_size;
int pointer_timestamp; int pointer_timestamp;
SpeexBits current_packet; SpeexBits current_packet;
int valid_bits; int valid_bits;
skipping to change at line 73 skipping to change at line 77
} SpeexJitter; } SpeexJitter;
void speex_jitter_init(SpeexJitter *jitter, void *decoder, int sampling_rat e); void speex_jitter_init(SpeexJitter *jitter, void *decoder, int sampling_rat e);
void speex_jitter_destroy(SpeexJitter *jitter); void speex_jitter_destroy(SpeexJitter *jitter);
void speex_jitter_put(SpeexJitter *jitter, char *packet, int len, int time) ; void speex_jitter_put(SpeexJitter *jitter, char *packet, int len, int time) ;
void speex_jitter_get(SpeexJitter *jitter, short *out); void speex_jitter_get(SpeexJitter *jitter, short *out);
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 3 change blocks. 
2 lines changed or deleted 10 lines changed or added


 speex_preprocess.h   speex_preprocess.h 
skipping to change at line 33 skipping to change at line 33
DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE. POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef SPEEX_PREPROCESS_H
#define SPEEX_PREPROCESS_H
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
struct drft_lookup; struct drft_lookup;
typedef struct SpeexPreprocessState { typedef struct SpeexPreprocessState {
int frame_size; /**< Number of samples processed each time */ int frame_size; /**< Number of samples processed each time */
int ps_size; /**< Number of points in the power spectrum */ int ps_size; /**< Number of points in the power spectrum */
int sampling_rate; /**< Sampling rate of the input/output */ int sampling_rate; /**< Sampling rate of the input/output */
/* parameters */ /* parameters */
int denoise_enabled; int denoise_enabled;
int agc_enabled; int agc_enabled;
float agc_level; float agc_level;
int vad_enabled; int vad_enabled;
int dereverb_enabled;
float reverb_decay;
float reverb_level;
float *frame; /**< Processing frame (2*ps_size) */ float *frame; /**< Processing frame (2*ps_size) */
float *ps; /**< Current power spectrum */ float *ps; /**< Current power spectrum */
float *gain2; /**< Adjusted gains */ float *gain2; /**< Adjusted gains */
float *window; /**< Analysis/Synthesis window */ float *window; /**< Analysis/Synthesis window */
float *noise; /**< Noise estimate */ float *noise; /**< Noise estimate */
float *reverb_estimate; /**< Estimate of reverb energy */
float *old_ps; /**< Power spectrum for last frame */ float *old_ps; /**< Power spectrum for last frame */
float *gain; /**< Ephraim Malah gain */ float *gain; /**< Ephraim Malah gain */
float *prior; /**< A-priori SNR */ float *prior; /**< A-priori SNR */
float *post; /**< A-posteriori SNR */ float *post; /**< A-posteriori SNR */
float *S; /**< Smoothed power spectrum */ float *S; /**< Smoothed power spectrum */
float *Smin; /**< See Cohen paper */ float *Smin; /**< See Cohen paper */
float *Stmp; /**< See Cohen paper */ float *Stmp; /**< See Cohen paper */
float *update_prob; /**< Propability of speech presence for noise update */ float *update_prob; /**< Propability of speech presence for noise update */
skipping to change at line 102 skipping to change at line 109
} SpeexPreprocessState; } SpeexPreprocessState;
/** Creates a new preprocessing state */ /** Creates a new preprocessing state */
SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampl ing_rate); SpeexPreprocessState *speex_preprocess_state_init(int frame_size, int sampl ing_rate);
/** Destroys a denoising state */ /** Destroys a denoising state */
void speex_preprocess_state_destroy(SpeexPreprocessState *st); void speex_preprocess_state_destroy(SpeexPreprocessState *st);
/** Preprocess a frame */ /** Preprocess a frame */
int speex_preprocess(SpeexPreprocessState *st, short *x, float *noise); int speex_preprocess(SpeexPreprocessState *st, short *x, int *echo);
/** Preprocess a frame */ /** Preprocess a frame */
void speex_preprocess_estimate_update(SpeexPreprocessState *st, short *x, f loat *noise); void speex_preprocess_estimate_update(SpeexPreprocessState *st, short *x, i nt *echo);
/** Used like the ioctl function to control the preprocessor parameters */ /** Used like the ioctl function to control the preprocessor parameters */
int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr); int speex_preprocess_ctl(SpeexPreprocessState *st, int request, void *ptr);
#define SPEEX_PREPROCESS_SET_DENOISE 0 #define SPEEX_PREPROCESS_SET_DENOISE 0
#define SPEEX_PREPROCESS_GET_DENOISE 1 #define SPEEX_PREPROCESS_GET_DENOISE 1
#define SPEEX_PREPROCESS_SET_AGC 2 #define SPEEX_PREPROCESS_SET_AGC 2
#define SPEEX_PREPROCESS_GET_AGC 3 #define SPEEX_PREPROCESS_GET_AGC 3
#define SPEEX_PREPROCESS_SET_VAD 4 #define SPEEX_PREPROCESS_SET_VAD 4
#define SPEEX_PREPROCESS_GET_VAD 5 #define SPEEX_PREPROCESS_GET_VAD 5
#define SPEEX_PREPROCESS_SET_AGC_LEVEL 6 #define SPEEX_PREPROCESS_SET_AGC_LEVEL 6
#define SPEEX_PREPROCESS_GET_AGC_LEVEL 7 #define SPEEX_PREPROCESS_GET_AGC_LEVEL 7
#define SPEEX_PREPROCESS_SET_DEREVERB 8
#define SPEEX_PREPROCESS_GET_DEREVERB 9
#define SPEEX_PREPROCESS_SET_DEREVERB_LEVEL 10
#define SPEEX_PREPROCESS_GET_DEREVERB_LEVEL 11
#define SPEEX_PREPROCESS_SET_DEREVERB_DECAY 12
#define SPEEX_PREPROCESS_GET_DEREVERB_DECAY 13
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
#endif
 End of changes. 7 change blocks. 
2 lines changed or deleted 18 lines changed or added


 speex_stereo.h   speex_stereo.h 
skipping to change at line 40 skipping to change at line 40
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
#ifndef STEREO_H #ifndef STEREO_H
#define STEREO_H #define STEREO_H
#include "speex_bits.h" #include "speex_bits.h"
#ifdef __cplusplus
extern "C" {
#endif
/** State used for decoding (intensity) stereo information */ /** State used for decoding (intensity) stereo information */
typedef struct SpeexStereoState { typedef struct SpeexStereoState {
float balance; /**< Left/right balance info */ float balance; /**< Left/right balance info */
float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(rig ht)] */ float e_ratio; /**< Ratio of energies: E(left+right)/[E(left)+E(rig ht)] */
float smooth_left; /**< Smoothed left channel gain */ float smooth_left; /**< Smoothed left channel gain */
float smooth_right; /**< Smoothed right channel gain */ float smooth_right; /**< Smoothed right channel gain */
float reserved1; /**< Reserved for future use */ float reserved1; /**< Reserved for future use */
float reserved2; /**< Reserved for future use */ float reserved2; /**< Reserved for future use */
} SpeexStereoState; } SpeexStereoState;
/** Initialization value for a stereo state */ /** Initialization value for a stereo state */
#define SPEEX_STEREO_STATE_INIT {1,.5,1,1} #define SPEEX_STEREO_STATE_INIT {1,.5,1,1}
/** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */ /** Transforms a stereo frame into a mono frame and stores intensity stereo info in 'bits' */
void speex_encode_stereo(short *data, int frame_size, SpeexBits *bits); void speex_encode_stereo(float *data, int frame_size, SpeexBits *bits);
/** Transforms a stereo frame into a mono frame and stores intensity stereo
info in 'bits' */
void speex_encode_stereo_int(short *data, int frame_size, SpeexBits *bits);
/** Transforms a mono frame into a stereo frame using intensity stereo info */ /** Transforms a mono frame into a stereo frame using intensity stereo info */
void speex_decode_stereo(short *data, int frame_size, SpeexStereoState *ste void speex_decode_stereo(float *data, int frame_size, SpeexStereoState *ste
reo); reo);
/** Transforms a mono frame into a stereo frame using intensity stereo info
*/
void speex_decode_stereo_int(short *data, int frame_size, SpeexStereoState
*stereo);
/** Callback handler for intensity stereo info */ /** Callback handler for intensity stereo info */
int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *da ta); int speex_std_stereo_request_handler(SpeexBits *bits, void *state, void *da ta);
#ifdef __cplusplus
}
#endif
#endif #endif
 End of changes. 4 change blocks. 
3 lines changed or deleted 20 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/