/*********************************************************************** 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.
***********************************************************************/
/********************************/ /* VAD state */ /********************************/ typedefstruct {
opus_int32 AnaState[ 2 ]; /* Analysis filterbank state: 0-8 kHz */
opus_int32 AnaState1[ 2 ]; /* Analysis filterbank state: 0-4 kHz */
opus_int32 AnaState2[ 2 ]; /* Analysis filterbank state: 0-2 kHz */
opus_int32 XnrgSubfr[ VAD_N_BANDS ]; /* Subframe energies */
opus_int32 NrgRatioSmth_Q8[ VAD_N_BANDS ]; /* Smoothed energy level in each band */
opus_int16 HPstate; /* State of differentiator in the lowest band */
opus_int32 NL[ VAD_N_BANDS ]; /* Noise energy level in each band */
opus_int32 inv_NL[ VAD_N_BANDS ]; /* Inverse noise energy level in each band */
opus_int32 NoiseLevelBias[ VAD_N_BANDS ]; /* Noise level estimator bias/offset */
opus_int32 counter; /* Frame counter used in the initial phase */
} silk_VAD_state;
/* Variable cut-off low-pass filter state */ typedefstruct {
opus_int32 In_LP_State[ 2 ]; /* Low pass filter state */
opus_int32 transition_frame_no; /* Counter which is mapped to a cut-off frequency */
opus_int mode; /* Operating mode, <0: switch down, >0: switch up; 0: do nothing */
opus_int32 saved_fs_kHz; /* If non-zero, holds the last sampling rate before a bandwidth switching reset. */
} silk_LP_state;
/********************************/ /* Encoder state */ /********************************/ typedefstruct {
opus_int32 In_HP_State[ 2 ]; /* High pass filter state */
opus_int32 variable_HP_smth1_Q15; /* State of first smoother */
opus_int32 variable_HP_smth2_Q15; /* State of second smoother */
silk_LP_state sLP; /* Low pass filter state */
silk_VAD_state sVAD; /* Voice activity detector state */
silk_nsq_state sNSQ; /* Noise Shape Quantizer State */
opus_int16 prev_NLSFq_Q15[ MAX_LPC_ORDER ]; /* Previously quantized NLSF vector */
opus_int speech_activity_Q8; /* Speech activity */
opus_int allow_bandwidth_switch; /* Flag indicating that switching of internal bandwidth is allowed */
opus_int8 LBRRprevLastGainIndex;
opus_int8 prevSignalType;
opus_int prevLag;
opus_int pitch_LPC_win_length;
opus_int max_pitch_lag; /* Highest possible pitch lag (samples) */
opus_int32 API_fs_Hz; /* API sampling frequency (Hz) */
opus_int32 prev_API_fs_Hz; /* Previous API sampling frequency (Hz) */
opus_int maxInternal_fs_Hz; /* Maximum internal sampling frequency (Hz) */
opus_int minInternal_fs_Hz; /* Minimum internal sampling frequency (Hz) */
opus_int desiredInternal_fs_Hz; /* Soft request for internal sampling frequency (Hz) */
opus_int fs_kHz; /* Internal sampling frequency (kHz) */
opus_int nb_subfr; /* Number of 5 ms subframes in a frame */
opus_int frame_length; /* Frame length (samples) */
opus_int subfr_length; /* Subframe length (samples) */
opus_int ltp_mem_length; /* Length of LTP memory */
opus_int la_pitch; /* Look-ahead for pitch analysis (samples) */
opus_int la_shape; /* Look-ahead for noise shape analysis (samples) */
opus_int shapeWinLength; /* Window length for noise shape analysis (samples) */
opus_int32 TargetRate_bps; /* Target bitrate (bps) */
opus_int PacketSize_ms; /* Number of milliseconds to put in each packet */
opus_int PacketLoss_perc; /* Packet loss rate measured by farend */
opus_int32 frameCounter;
opus_int Complexity; /* Complexity setting */
opus_int nStatesDelayedDecision; /* Number of states in delayed decision quantization */
opus_int useInterpolatedNLSFs; /* Flag for using NLSF interpolation */
opus_int shapingLPCOrder; /* Filter order for noise shaping filters */
opus_int predictLPCOrder; /* Filter order for prediction filters */
opus_int pitchEstimationComplexity; /* Complexity level for pitch estimator */
opus_int pitchEstimationLPCOrder; /* Whitening filter order for pitch estimator */
opus_int32 pitchEstimationThreshold_Q16; /* Threshold for pitch estimator */
opus_int32 sum_log_gain_Q7; /* Cumulative max prediction gain */
opus_int NLSF_MSVQ_Survivors; /* Number of survivors in NLSF MSVQ */
opus_int first_frame_after_reset; /* Flag for deactivating NLSF interpolation, pitch prediction */
opus_int controlled_since_last_payload; /* Flag for ensuring codec_control only runs once per packet */
opus_int warping_Q16; /* Warping parameter for warped noise shaping */
opus_int useCBR; /* Flag to enable constant bitrate */
opus_int prefillFlag; /* Flag to indicate that only buffers are prefilled, no coding */ const opus_uint8 *pitch_lag_low_bits_iCDF; /* Pointer to iCDF table for low bits of pitch lag index */ const opus_uint8 *pitch_contour_iCDF; /* Pointer to iCDF table for pitch contour index */ const silk_NLSF_CB_struct *psNLSF_CB; /* Pointer to NLSF codebook */
opus_int input_quality_bands_Q15[ VAD_N_BANDS ];
opus_int input_tilt_Q15;
opus_int SNR_dB_Q7; /* Quality setting */
/* Parameters For LTP scaling Control */
opus_int frames_since_onset;
/* Specifically for entropy coding */
opus_int ec_prevSignalType;
opus_int16 ec_prevLagIndex;
silk_resampler_state_struct resampler_state;
/* DTX */
opus_int useDTX; /* Flag to enable DTX */
opus_int inDTX; /* Flag to signal DTX period */
opus_int noSpeechCounter; /* Counts concecutive nonactive frames, used by DTX */
/* Inband Low Bitrate Redundancy (LBRR) data */
opus_int useInBandFEC; /* Saves the API setting for query */
opus_int LBRR_enabled; /* Depends on useInBandFRC, bitrate and packet loss rate */
opus_int LBRR_GainIncreases; /* Gains increment for coding LBRR frames */
SideInfoIndices indices_LBRR[ MAX_FRAMES_PER_PACKET ];
opus_int8 pulses_LBRR[ MAX_FRAMES_PER_PACKET ][ MAX_FRAME_LENGTH ];
} silk_encoder_state;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.