/*********************************************************************** Copyright (c) 2006-2011, Skype Limited. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - Neither the name of Internet Society, IETF or IETF Trust, nor the names of specific contributors, may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ***********************************************************************/ #ifndef SILK_DEFINE_H #define SILK_DEFINE_H #include "errors.h" #include "typedef.h" #ifdef __cplusplus extern "C" { #endif /* Max number of encoder channels (1/2) */ #define ENCODER_NUM_CHANNELS … /* Number of decoder channels (1/2) */ #define DECODER_NUM_CHANNELS … #define MAX_FRAMES_PER_PACKET … /* Limits on bitrate */ #define MIN_TARGET_RATE_BPS … #define MAX_TARGET_RATE_BPS … /* LBRR thresholds */ #define LBRR_NB_MIN_RATE_BPS … #define LBRR_MB_MIN_RATE_BPS … #define LBRR_WB_MIN_RATE_BPS … /* DTX settings */ #define NB_SPEECH_FRAMES_BEFORE_DTX … #define MAX_CONSECUTIVE_DTX … #define DTX_ACTIVITY_THRESHOLD … /* VAD decision */ #define VAD_NO_DECISION … #define VAD_NO_ACTIVITY … #define VAD_ACTIVITY … /* Maximum sampling frequency */ #define MAX_FS_KHZ … #define MAX_API_FS_KHZ … /* Signal types */ #define TYPE_NO_VOICE_ACTIVITY … #define TYPE_UNVOICED … #define TYPE_VOICED … /* Conditional coding types */ #define CODE_INDEPENDENTLY … #define CODE_INDEPENDENTLY_NO_LTP_SCALING … #define CODE_CONDITIONALLY … /* Settings for stereo processing */ #define STEREO_QUANT_TAB_SIZE … #define STEREO_QUANT_SUB_STEPS … #define STEREO_INTERP_LEN_MS … #define STEREO_RATIO_SMOOTH_COEF … /* Range of pitch lag estimates */ #define PITCH_EST_MIN_LAG_MS … #define PITCH_EST_MAX_LAG_MS … /* Maximum number of subframes */ #define MAX_NB_SUBFR … /* Number of samples per frame */ #define LTP_MEM_LENGTH_MS … #define SUB_FRAME_LENGTH_MS … #define MAX_SUB_FRAME_LENGTH … #define MAX_FRAME_LENGTH_MS … #define MAX_FRAME_LENGTH … /* Milliseconds of lookahead for pitch analysis */ #define LA_PITCH_MS … #define LA_PITCH_MAX … /* Order of LPC used in find pitch */ #define MAX_FIND_PITCH_LPC_ORDER … /* Length of LPC window used in find pitch */ #define FIND_PITCH_LPC_WIN_MS … #define FIND_PITCH_LPC_WIN_MS_2_SF … #define FIND_PITCH_LPC_WIN_MAX … /* Milliseconds of lookahead for noise shape analysis */ #define LA_SHAPE_MS … #define LA_SHAPE_MAX … /* Maximum length of LPC window used in noise shape analysis */ #define SHAPE_LPC_WIN_MAX … /* dB level of lowest gain quantization level */ #define MIN_QGAIN_DB … /* dB level of highest gain quantization level */ #define MAX_QGAIN_DB … /* Number of gain quantization levels */ #define N_LEVELS_QGAIN … /* Max increase in gain quantization index */ #define MAX_DELTA_GAIN_QUANT … /* Max decrease in gain quantization index */ #define MIN_DELTA_GAIN_QUANT … /* Quantization offsets (multiples of 4) */ #define OFFSET_VL_Q10 … #define OFFSET_VH_Q10 … #define OFFSET_UVL_Q10 … #define OFFSET_UVH_Q10 … #define QUANT_LEVEL_ADJUST_Q10 … /* Maximum numbers of iterations used to stabilize an LPC vector */ #define MAX_LPC_STABILIZE_ITERATIONS … #define MAX_PREDICTION_POWER_GAIN … #define MAX_PREDICTION_POWER_GAIN_AFTER_RESET … #define MAX_LPC_ORDER … #define MIN_LPC_ORDER … /* Find Pred Coef defines */ #define LTP_ORDER … /* LTP quantization settings */ #define NB_LTP_CBKS … /* Flag to use harmonic noise shaping */ #define USE_HARM_SHAPING … /* Max LPC order of noise shaping filters */ #define MAX_SHAPE_LPC_ORDER … #define HARM_SHAPE_FIR_TAPS … /* Maximum number of delayed decision states */ #define MAX_DEL_DEC_STATES … #define LTP_BUF_LENGTH … #define LTP_MASK … #define DECISION_DELAY … /* Number of subframes for excitation entropy coding */ #define SHELL_CODEC_FRAME_LENGTH … #define LOG2_SHELL_CODEC_FRAME_LENGTH … #define MAX_NB_SHELL_BLOCKS … /* Number of rate levels, for entropy coding of excitation */ #define N_RATE_LEVELS … /* Maximum sum of pulses per shell coding frame */ #define SILK_MAX_PULSES … #define MAX_MATRIX_SIZE … #define NSQ_LPC_BUF_LENGTH … /***************************/ /* Voice activity detector */ /***************************/ #define VAD_N_BANDS … #define VAD_INTERNAL_SUBFRAMES_LOG2 … #define VAD_INTERNAL_SUBFRAMES … #define VAD_NOISE_LEVEL_SMOOTH_COEF_Q16 … #define VAD_NOISE_LEVELS_BIAS … /* Sigmoid settings */ #define VAD_NEGATIVE_OFFSET_Q5 … #define VAD_SNR_FACTOR_Q16 … /* smoothing for SNR measurement */ #define VAD_SNR_SMOOTH_COEF_Q18 … /* Size of the piecewise linear cosine approximation table for the LSFs */ #define LSF_COS_TAB_SZ_FIX … /******************/ /* NLSF quantizer */ /******************/ #define NLSF_W_Q … #define NLSF_VQ_MAX_VECTORS … #define NLSF_QUANT_MAX_AMPLITUDE … #define NLSF_QUANT_MAX_AMPLITUDE_EXT … #define NLSF_QUANT_LEVEL_ADJ … #define NLSF_QUANT_DEL_DEC_STATES_LOG2 … #define NLSF_QUANT_DEL_DEC_STATES … /* Transition filtering for mode switching */ #define TRANSITION_TIME_MS … #define TRANSITION_NB … #define TRANSITION_NA … #define TRANSITION_INT_NUM … #define TRANSITION_FRAMES … #define TRANSITION_INT_STEPS … /* BWE factors to apply after packet loss */ #define BWE_AFTER_LOSS_Q16 … /* Defines for CN generation */ #define CNG_BUF_MASK_MAX … #define CNG_GAIN_SMTH_Q16 … #define CNG_GAIN_SMTH_THRESHOLD_Q16 … #define CNG_NLSF_SMTH_Q16 … #ifdef __cplusplus } #endif #endif