Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Side by Side Diff: third_party/opus/src/silk/structs.h

Issue 2962373002: [Opus] Update to v1.2.1 (Closed)
Patch Set: Include minor updates including fix for win_clang Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /*********************************************************************** 1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved. 2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without 3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions 4 modification, are permitted provided that the following conditions
5 are met: 5 are met:
6 - Redistributions of source code must retain the above copyright notice, 6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer. 7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright 8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the 9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution. 10 documentation and/or other materials provided with the distribution.
(...skipping 30 matching lines...) Expand all
41 41
42 /************************************/ 42 /************************************/
43 /* Noise shaping quantization state */ 43 /* Noise shaping quantization state */
44 /************************************/ 44 /************************************/
45 typedef struct { 45 typedef struct {
46 opus_int16 xq[ 2 * MAX_FRAME_LENGTH ]; /* Buffer for quantized output signal */ 46 opus_int16 xq[ 2 * MAX_FRAME_LENGTH ]; /* Buffer for quantized output signal */
47 opus_int32 sLTP_shp_Q14[ 2 * MAX_FRAME_LENGTH ]; 47 opus_int32 sLTP_shp_Q14[ 2 * MAX_FRAME_LENGTH ];
48 opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LEN GTH ]; 48 opus_int32 sLPC_Q14[ MAX_SUB_FRAME_LENGTH + NSQ_LPC_BUF_LEN GTH ];
49 opus_int32 sAR2_Q14[ MAX_SHAPE_LPC_ORDER ]; 49 opus_int32 sAR2_Q14[ MAX_SHAPE_LPC_ORDER ];
50 opus_int32 sLF_AR_shp_Q14; 50 opus_int32 sLF_AR_shp_Q14;
51 opus_int32 sDiff_shp_Q14;
51 opus_int lagPrev; 52 opus_int lagPrev;
52 opus_int sLTP_buf_idx; 53 opus_int sLTP_buf_idx;
53 opus_int sLTP_shp_buf_idx; 54 opus_int sLTP_shp_buf_idx;
54 opus_int32 rand_seed; 55 opus_int32 rand_seed;
55 opus_int32 prev_gain_Q16; 56 opus_int32 prev_gain_Q16;
56 opus_int rewhite_flag; 57 opus_int rewhite_flag;
57 } silk_nsq_state; 58 } silk_nsq_state;
58 59
59 /********************************/ 60 /********************************/
60 /* VAD state */ 61 /* VAD state */
(...skipping 18 matching lines...) Expand all
79 opus_int mode; /* Operating mode, <0: switch down, >0: switch up; 0: do nothing */ 80 opus_int mode; /* Operating mode, <0: switch down, >0: switch up; 0: do nothing */
80 } silk_LP_state; 81 } silk_LP_state;
81 82
82 /* Structure containing NLSF codebook */ 83 /* Structure containing NLSF codebook */
83 typedef struct { 84 typedef struct {
84 const opus_int16 nVectors; 85 const opus_int16 nVectors;
85 const opus_int16 order; 86 const opus_int16 order;
86 const opus_int16 quantStepSize_Q16; 87 const opus_int16 quantStepSize_Q16;
87 const opus_int16 invQuantStepSize_Q6; 88 const opus_int16 invQuantStepSize_Q6;
88 const opus_uint8 *CB1_NLSF_Q8; 89 const opus_uint8 *CB1_NLSF_Q8;
90 const opus_int16 *CB1_Wght_Q9;
89 const opus_uint8 *CB1_iCDF; 91 const opus_uint8 *CB1_iCDF;
90 const opus_uint8 *pred_Q8; 92 const opus_uint8 *pred_Q8;
91 const opus_uint8 *ec_sel; 93 const opus_uint8 *ec_sel;
92 const opus_uint8 *ec_iCDF; 94 const opus_uint8 *ec_iCDF;
93 const opus_uint8 *ec_Rates_Q5; 95 const opus_uint8 *ec_Rates_Q5;
94 const opus_int16 *deltaMin_Q15; 96 const opus_int16 *deltaMin_Q15;
95 } silk_NLSF_CB_struct; 97 } silk_NLSF_CB_struct;
96 98
97 typedef struct { 99 typedef struct {
98 opus_int16 pred_prev_Q13[ 2 ]; 100 opus_int16 pred_prev_Q13[ 2 ];
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 opus_int PacketLoss_perc; /* Packet lo ss rate measured by farend */ 164 opus_int PacketLoss_perc; /* Packet lo ss rate measured by farend */
163 opus_int32 frameCounter; 165 opus_int32 frameCounter;
164 opus_int Complexity; /* Complexit y setting */ 166 opus_int Complexity; /* Complexit y setting */
165 opus_int nStatesDelayedDecision; /* Number of states in delayed decision quantization */ 167 opus_int nStatesDelayedDecision; /* Number of states in delayed decision quantization */
166 opus_int useInterpolatedNLSFs; /* Flag for using NLSF interpolation */ 168 opus_int useInterpolatedNLSFs; /* Flag for using NLSF interpolation */
167 opus_int shapingLPCOrder; /* Filter or der for noise shaping filters */ 169 opus_int shapingLPCOrder; /* Filter or der for noise shaping filters */
168 opus_int predictLPCOrder; /* Filter or der for prediction filters */ 170 opus_int predictLPCOrder; /* Filter or der for prediction filters */
169 opus_int pitchEstimationComplexity; /* Complexit y level for pitch estimator */ 171 opus_int pitchEstimationComplexity; /* Complexit y level for pitch estimator */
170 opus_int pitchEstimationLPCOrder; /* Whitening filter order for pitch estimator */ 172 opus_int pitchEstimationLPCOrder; /* Whitening filter order for pitch estimator */
171 opus_int32 pitchEstimationThreshold_Q16; /* Threshold for pitch estimator */ 173 opus_int32 pitchEstimationThreshold_Q16; /* Threshold for pitch estimator */
172 opus_int LTPQuantLowComplexity; /* Flag for low complexity LTP quantization */
173 opus_int mu_LTP_Q9; /* Rate-dist ortion tradeoff in LTP quantization */
174 opus_int32 sum_log_gain_Q7; /* Cumulativ e max prediction gain */ 174 opus_int32 sum_log_gain_Q7; /* Cumulativ e max prediction gain */
175 opus_int NLSF_MSVQ_Survivors; /* Number of survivors in NLSF MSVQ */ 175 opus_int NLSF_MSVQ_Survivors; /* Number of survivors in NLSF MSVQ */
176 opus_int first_frame_after_reset; /* Flag for deactivating NLSF interpolation, pitch prediction */ 176 opus_int first_frame_after_reset; /* Flag for deactivating NLSF interpolation, pitch prediction */
177 opus_int controlled_since_last_payload; /* Flag for ensuring codec_control only runs once per packet */ 177 opus_int controlled_since_last_payload; /* Flag for ensuring codec_control only runs once per packet */
178 opus_int warping_Q16; /* Warping p arameter for warped noise shaping */ 178 opus_int warping_Q16; /* Warping p arameter for warped noise shaping */
179 opus_int useCBR; /* Flag to e nable constant bitrate */ 179 opus_int useCBR; /* Flag to e nable constant bitrate */
180 opus_int prefillFlag; /* Flag to i ndicate that only buffers are prefilled, no coding */ 180 opus_int prefillFlag; /* Flag to i ndicate that only buffers are prefilled, no coding */
181 const opus_uint8 *pitch_lag_low_bits_iCDF; /* Pointer t o iCDF table for low bits of pitch lag index */ 181 const opus_uint8 *pitch_lag_low_bits_iCDF; /* Pointer t o iCDF table for low bits of pitch lag index */
182 const opus_uint8 *pitch_contour_iCDF; /* Pointer t o iCDF table for pitch contour index */ 182 const opus_uint8 *pitch_contour_iCDF; /* Pointer t o iCDF table for pitch contour index */
183 const silk_NLSF_CB_struct *psNLSF_CB; /* Pointer t o NLSF codebook */ 183 const silk_NLSF_CB_struct *psNLSF_CB; /* Pointer t o NLSF codebook */
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 294
295 /* Quantization indices */ 295 /* Quantization indices */
296 SideInfoIndices indices; 296 SideInfoIndices indices;
297 297
298 /* CNG state */ 298 /* CNG state */
299 silk_CNG_struct sCNG; 299 silk_CNG_struct sCNG;
300 300
301 /* Stuff used for PLC */ 301 /* Stuff used for PLC */
302 opus_int lossCnt; 302 opus_int lossCnt;
303 opus_int prevSignalType; 303 opus_int prevSignalType;
304 int arch;
304 305
305 silk_PLC_struct sPLC; 306 silk_PLC_struct sPLC;
306 307
307 } silk_decoder_state; 308 } silk_decoder_state;
308 309
309 /************************/ 310 /************************/
310 /* Decoder control */ 311 /* Decoder control */
311 /************************/ 312 /************************/
312 typedef struct { 313 typedef struct {
313 /* Prediction and coding parameters */ 314 /* Prediction and coding parameters */
314 opus_int pitchL[ MAX_NB_SUBFR ]; 315 opus_int pitchL[ MAX_NB_SUBFR ];
315 opus_int32 Gains_Q16[ MAX_NB_SUBFR ]; 316 opus_int32 Gains_Q16[ MAX_NB_SUBFR ];
316 /* Holds interpolated and final coefficients, 4-byte aligned */ 317 /* Holds interpolated and final coefficients, 4-byte aligned */
317 silk_DWORD_ALIGN opus_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ]; 318 silk_DWORD_ALIGN opus_int16 PredCoef_Q12[ 2 ][ MAX_LPC_ORDER ];
318 opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ]; 319 opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];
319 opus_int LTP_scale_Q14; 320 opus_int LTP_scale_Q14;
320 } silk_decoder_control; 321 } silk_decoder_control;
321 322
322 323
323 #ifdef __cplusplus 324 #ifdef __cplusplus
324 } 325 }
325 #endif 326 #endif
326 327
327 #endif 328 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698