webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
structs_FIX.h
Go to the documentation of this file.
1 /***********************************************************************
2 Copyright (c) 2006-2011, Skype Limited. All rights reserved.
3 Redistribution and use in source and binary forms, with or without
4 modification, are permitted provided that the following conditions
5 are met:
6 - Redistributions of source code must retain the above copyright notice,
7 this list of conditions and the following disclaimer.
8 - Redistributions in binary form must reproduce the above copyright
9 notice, this list of conditions and the following disclaimer in the
10 documentation and/or other materials provided with the distribution.
11 - Neither the name of Internet Society, IETF or IETF Trust, nor the
12 names of specific contributors, may be used to endorse or promote
13 products derived from this software without specific prior written
14 permission.
15 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
19 LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20 CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21 SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23 CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24 ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25 POSSIBILITY OF SUCH DAMAGE.
26 ***********************************************************************/
27 
28 #ifndef SILK_STRUCTS_FIX_H
29 #define SILK_STRUCTS_FIX_H
30 
31 #include "typedef.h"
32 #include "main.h"
33 #include "structs.h"
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
40 /********************************/
41 /* Noise shaping analysis state */
42 /********************************/
43 typedef struct {
49 
50 /********************************/
51 /* Prefilter state */
52 /********************************/
53 typedef struct {
63 
64 /********************************/
65 /* Encoder state FIX */
66 /********************************/
67 typedef struct {
68  silk_encoder_state sCmn; /* Common struct, shared with floating-point code */
69  silk_shape_state_FIX sShape; /* Shape state */
70  silk_prefilter_state_FIX sPrefilt; /* Prefilter State */
71 
72  /* Buffer for find pitch and noise shape analysis */
73  silk_DWORD_ALIGN opus_int16 x_buf[ 2 * MAX_FRAME_LENGTH + LA_SHAPE_MAX ];/* Buffer for find pitch and noise shape analysis */
74  opus_int LTPCorr_Q15; /* Normalized correlation from pitch lag estimator */
76 
77 /************************/
78 /* Encoder control FIX */
79 /************************/
80 typedef struct {
81  /* Prediction and coding parameters */
82  opus_int32 Gains_Q16[ MAX_NB_SUBFR ];
84  opus_int16 LTPCoef_Q14[ LTP_ORDER * MAX_NB_SUBFR ];
87 
88  /* Noise shaping parameters */
89  /* Testing */
92  opus_int32 LF_shp_Q14[ MAX_NB_SUBFR ]; /* Packs two int16 coefficients per int32 value */
93  opus_int GainsPre_Q14[ MAX_NB_SUBFR ];
94  opus_int HarmBoost_Q14[ MAX_NB_SUBFR ];
95  opus_int Tilt_Q14[ MAX_NB_SUBFR ];
96  opus_int HarmShapeGain_Q14[ MAX_NB_SUBFR ];
100 
101  /* measures */
105  opus_int32 ResNrg[ MAX_NB_SUBFR ]; /* Residual energy per subframe */
106  opus_int ResNrgQ[ MAX_NB_SUBFR ]; /* Q domain for the residual energy > 0 */
107 
108  /* Parameters for CBR mode */
109  opus_int32 GainsUnq_Q16[ MAX_NB_SUBFR ];
112 
113 /************************/
114 /* Encoder Super Struct */
115 /************************/
116 typedef struct {
127 } silk_encoder;
128 
129 
130 #ifdef __cplusplus
131 }
132 #endif
133 
134 #endif
opus_int allowBandwidthSwitch
Definition: structs_FIX.h:125
Definition: structs_FIX.h:53
opus_int nChannelsInternal
Definition: structs_FIX.h:122
silk_shape_state_FIX sShape
Definition: structs_FIX.h:69
opus_int sparseness_Q8
Definition: structs_FIX.h:102
opus_int timeSinceSwitchAllowed_ms
Definition: structs_FIX.h:124
#define ENCODER_NUM_CHANNELS
Definition: define.h:40
short opus_int16
Definition: opus_types.h:144
#define MAX_FRAME_LENGTH
Definition: define.h:92
opus_int Lambda_Q10
Definition: structs_FIX.h:97
Definition: structs_FIX.h:67
#define opus_int
Definition: opus_types.h:151
opus_int sLTP_shp_buf_idx
Definition: structs_FIX.h:56
opus_int32 HarmBoost_smth_Q16
Definition: structs_FIX.h:45
opus_int32 HarmShapeGain_smth_Q16
Definition: structs_FIX.h:46
#define opus_int8
Definition: opus_types.h:153
opus_int32 Tilt_smth_Q16
Definition: structs_FIX.h:47
opus_int32 sLF_AR_shp_Q12
Definition: structs_FIX.h:57
opus_int LTPredCodGain_Q7
Definition: structs_FIX.h:104
#define silk_DWORD_ALIGN
Definition: SigProc_FIX.h:391
silk_encoder_state sCmn
Definition: structs_FIX.h:68
opus_int LTP_scale_Q14
Definition: structs_FIX.h:85
opus_int32 sHarmHP_Q2
Definition: structs_FIX.h:59
opus_int input_quality_Q14
Definition: structs_FIX.h:98
opus_int nChannelsAPI
Definition: structs_FIX.h:121
#define LA_SHAPE_MAX
Definition: define.h:108
opus_int32 sLF_MA_shp_Q12
Definition: structs_FIX.h:58
opus_int LTPCorr_Q15
Definition: structs_FIX.h:74
#define LTP_ORDER
Definition: define.h:141
#define LTP_BUF_LENGTH
Definition: define.h:157
silk_prefilter_state_FIX sPrefilt
Definition: structs_FIX.h:70
opus_int nPrevChannelsInternal
Definition: structs_FIX.h:123
opus_int prev_decode_only_middle
Definition: structs_FIX.h:126
Definition: structs_FIX.h:43
int opus_int32
Definition: opus_types.h:146
Definition: structs_FIX.h:116
stereo_enc_state sStereo
Definition: structs_FIX.h:118
Definition: structs.h:97
Definition: structs_FIX.h:80
opus_int lagPrev
Definition: structs_FIX.h:61
opus_int8 LastGainIndex
Definition: structs_FIX.h:44
opus_int32 nBitsUsedLBRR
Definition: structs_FIX.h:119
#define MAX_SHAPE_LPC_ORDER
Definition: define.h:150
opus_int coding_quality_Q14
Definition: structs_FIX.h:99
opus_int32 predGain_Q16
Definition: structs_FIX.h:103
opus_int32 nBitsExceeded
Definition: structs_FIX.h:120
Definition: structs.h:132
#define MAX_LPC_ORDER
Definition: define.h:137
#define MAX_NB_SUBFR
Definition: define.h:85
opus_int8 lastGainIndexPrev
Definition: structs_FIX.h:110
opus_int32 rand_seed
Definition: structs_FIX.h:60