Initial Skype commit taken from FreeSwitch, which got it from the IETF draft.
[opus.git] / src / SKP_Silk_main.h
1 /***********************************************************************\r
2 Copyright (c) 2006-2010, Skype Limited. All rights reserved. \r
3 Redistribution and use in source and binary forms, with or without \r
4 modification, (subject to the limitations in the disclaimer below) \r
5 are permitted provided that the following conditions are met:\r
6 - Redistributions of source code must retain the above copyright notice,\r
7 this list of conditions and the following disclaimer.\r
8 - Redistributions in binary form must reproduce the above copyright \r
9 notice, this list of conditions and the following disclaimer in the \r
10 documentation and/or other materials provided with the distribution.\r
11 - Neither the name of Skype Limited, nor the names of specific \r
12 contributors, may be used to endorse or promote products derived from \r
13 this software without specific prior written permission.\r
14 NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED \r
15 BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND \r
16 CONTRIBUTORS ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,\r
17 BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND \r
18 FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE \r
19 COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, \r
20 INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\r
21 NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF \r
22 USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON \r
23 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT \r
24 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE \r
25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
26 ***********************************************************************/\r
27 \r
28 #ifndef SKP_SILK_MAIN_H\r
29 #define SKP_SILK_MAIN_H\r
30 \r
31 #include "SKP_Silk_SigProc_FIX.h"\r
32 #include "SKP_Silk_define.h"\r
33 #include "SKP_Silk_structs.h"\r
34 #include "SKP_Silk_tables.h"\r
35 #include "SKP_Silk_PLC.h"\r
36 \r
37 #ifdef __cplusplus\r
38 extern "C"\r
39 {\r
40 #endif\r
41 \r
42 /* Encodes signs of excitation */\r
43 void SKP_Silk_encode_signs(\r
44     SKP_Silk_range_coder_state  *psRC,              /* I/O  Range coder state                           */\r
45     const SKP_int               q[],                /* I    pulse signal                                */\r
46     const SKP_int               length,             /* I    length of input                             */\r
47     const SKP_int               sigtype,            /* I    Signal type                                 */\r
48     const SKP_int               QuantOffsetType,    /* I    Quantization offset type                    */\r
49     const SKP_int               RateLevelIndex      /* I    Rate Level Index                            */\r
50 );\r
51 \r
52 /* Decodes signs of excitation */\r
53 void SKP_Silk_decode_signs(\r
54     SKP_Silk_range_coder_state  *psRC,              /* I/O  Range coder state                           */\r
55     SKP_int                     q[],                /* I/O  pulse signal                                */\r
56     const SKP_int               length,             /* I    length of output                            */\r
57     const SKP_int               sigtype,            /* I    Signal type                                 */\r
58     const SKP_int               QuantOffsetType,    /* I    Quantization offset type                    */\r
59     const SKP_int               RateLevelIndex      /* I    Rate Level Index                            */\r
60 );\r
61 \r
62 /***************/\r
63 /* Shell coder */\r
64 /***************/\r
65 \r
66 /* Encode quantization indices of excitation */\r
67 void SKP_Silk_encode_pulses(\r
68     SKP_Silk_range_coder_state  *psRC,              /* I/O  Range coder state                           */\r
69     const SKP_int               sigtype,            /* I    Sigtype                                     */\r
70     const SKP_int               QuantOffsetType,    /* I    QuantOffsetType                             */\r
71     const SKP_int               q[],                /* I    quantization indices                        */\r
72     const SKP_int               frame_length        /* I    Frame length                                */\r
73 );\r
74 \r
75 /* Shell encoder, operates on one shell code frame of 16 pulses */\r
76 void SKP_Silk_shell_encoder(\r
77     SKP_Silk_range_coder_state  *psRC,              /* I/O  compressor data structure                   */\r
78     const SKP_int               *pulses0            /* I    data: nonnegative pulse amplitudes          */\r
79 );\r
80 \r
81 /* Shell decoder, operates on one shell code frame of 16 pulses */\r
82 void SKP_Silk_shell_decoder(\r
83     SKP_int                     *pulses0,           /* O    data: nonnegative pulse amplitudes          */\r
84     SKP_Silk_range_coder_state  *psRC,              /* I/O  compressor data structure                   */\r
85     const SKP_int               pulses4             /* I    number of pulses per pulse-subframe         */\r
86 );\r
87 \r
88 /***************/\r
89 /* Range coder */\r
90 /***************/\r
91 /* Range encoder for one symbol */\r
92 void SKP_Silk_range_encoder(\r
93     SKP_Silk_range_coder_state  *psRC,              /* I/O  compressor data structure                   */\r
94     const SKP_int               data,               /* I    uncompressed data                           */\r
95     const SKP_uint16            prob[]              /* I    cumulative density functions                */\r
96 );\r
97     \r
98 /* Range encoder for multiple symbols */\r
99 void SKP_Silk_range_encoder_multi(\r
100     SKP_Silk_range_coder_state  *psRC,              /* I/O  compressor data structure                   */\r
101     const SKP_int               data[],             /* I    uncompressed data    [nSymbols]             */\r
102     const SKP_uint16 * const    prob[],             /* I    cumulative density functions                */\r
103     const SKP_int               nSymbols            /* I    number of data symbols                      */\r
104 );\r
105 \r
106 /* Range decoder for one symbol */\r
107 void SKP_Silk_range_decoder(\r
108     SKP_int                     data[],             /* O    uncompressed data                           */\r
109     SKP_Silk_range_coder_state  *psRC,              /* I/O  compressor data structure                   */\r
110     const SKP_uint16            prob[],             /* I    cumulative density function                 */\r
111     SKP_int                     probIx              /* I    initial (middle) entry of cdf               */\r
112 );\r
113 \r
114 /* Range decoder for multiple symbols */\r
115 void SKP_Silk_range_decoder_multi(\r
116     SKP_int                     data[],             /* O    uncompressed data                [nSymbols] */\r
117     SKP_Silk_range_coder_state  *psRC,              /* I/O  compressor data structure                   */\r
118     const SKP_uint16 * const    prob[],             /* I    cumulative density functions                */\r
119     const SKP_int               probStartIx[],      /* I    initial (middle) entries of cdfs [nSymbols] */\r
120     const SKP_int               nSymbols            /* I    number of data symbols                      */\r
121 );\r
122 \r
123 /* Initialize range coder structure for encoder */\r
124 void SKP_Silk_range_enc_init(\r
125     SKP_Silk_range_coder_state  *psRC               /* O    compressor data structure                   */\r
126 );\r
127 \r
128 /* Initialize range coder structure for decoder */\r
129 void SKP_Silk_range_dec_init(\r
130     SKP_Silk_range_coder_state  *psRC,              /* O    compressor data structure                   */\r
131     const SKP_uint8             buffer[],           /* I    buffer for compressed data [bufferLength]   */\r
132     const SKP_int32             bufferLength        /* I    buffer length (in bytes)                    */\r
133 );\r
134 \r
135 /* Determine length of bitstream */\r
136 SKP_int SKP_Silk_range_coder_get_length(            /* O    returns number of BITS in stream            */\r
137     const SKP_Silk_range_coder_state    *psRC,      /* I    compressed data structure                   */\r
138     SKP_int                             *nBytes     /* O    number of BYTES in stream                   */\r
139 );\r
140 \r
141 /* Write decodable stream to buffer, and determine its length */\r
142 void SKP_Silk_range_enc_wrap_up(\r
143     SKP_Silk_range_coder_state  *psRC               /* I/O  compressed data structure                   */\r
144 );\r
145 \r
146 /* Check that any remaining bits in the last byte are set to 1 */\r
147 void SKP_Silk_range_coder_check_after_decoding(\r
148     SKP_Silk_range_coder_state  *psRC               /* I/O  compressed data structure                   */\r
149 );\r
150 \r
151 /* Gain scalar quantization with hysteresis, uniform on log scale */\r
152 void SKP_Silk_gains_quant(\r
153     SKP_int                     ind[ NB_SUBFR ],        /* O    gain indices                            */\r
154     SKP_int32                   gain_Q16[ NB_SUBFR ],   /* I/O  gains (quantized out)                   */\r
155     SKP_int                     *prev_ind,              /* I/O  last index in previous frame            */\r
156     const SKP_int               conditional             /* I    first gain is delta coded if 1          */\r
157 );\r
158 \r
159 /* Gains scalar dequantization, uniform on log scale */\r
160 void SKP_Silk_gains_dequant(\r
161     SKP_int32                   gain_Q16[ NB_SUBFR ],   /* O    quantized gains                         */\r
162     const SKP_int               ind[ NB_SUBFR ],        /* I    gain indices                            */\r
163     SKP_int                     *prev_ind,              /* I/O  last index in previous frame            */\r
164     const SKP_int               conditional             /* I    first gain is delta coded if 1          */\r
165 );\r
166 \r
167 /* Convert NLSF parameters to stable AR prediction filter coefficients */\r
168 void SKP_Silk_NLSF2A_stable(\r
169     SKP_int16                   pAR_Q12[ MAX_LPC_ORDER ],   /* O    Stabilized AR coefs [LPC_order]     */ \r
170     const SKP_int               pNLSF[ MAX_LPC_ORDER ],     /* I    NLSF vector         [LPC_order]     */\r
171     const SKP_int               LPC_order                   /* I    LPC/LSF order                       */\r
172 );\r
173 \r
174 /* Interpolate two vectors */\r
175 void SKP_Silk_interpolate(\r
176     SKP_int                     xi[ MAX_LPC_ORDER ],    /* O    interpolated vector                     */\r
177     const SKP_int               x0[ MAX_LPC_ORDER ],    /* I    first vector                            */\r
178     const SKP_int               x1[ MAX_LPC_ORDER ],    /* I    second vector                           */\r
179     const SKP_int               ifact_Q2,               /* I    interp. factor, weight on 2nd vector    */\r
180     const SKP_int               d                       /* I    number of parameters                    */\r
181 );\r
182 \r
183 /***********************************/\r
184 /* Noise shaping quantization (NSQ)*/\r
185 /***********************************/\r
186 void SKP_Silk_NSQ(\r
187     SKP_Silk_encoder_state          *psEncC,                                    /* I/O  Encoder State                       */\r
188     SKP_Silk_encoder_control        *psEncCtrlC,                                /* I    Encoder Control                     */\r
189     SKP_Silk_nsq_state              *NSQ,                                       /* I/O  NSQ state                           */\r
190     const SKP_int16                 x[],                                        /* I    prefiltered input signal            */\r
191     SKP_int                         q[],                                        /* O    quantized qulse signal              */\r
192     const SKP_int                   LSFInterpFactor_Q2,                         /* I    LSF interpolation factor in Q2      */\r
193     const SKP_int16                 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Short term prediction coefficients  */\r
194     const SKP_int16                 LTPCoef_Q14[ LTP_ORDER * NB_SUBFR ],        /* I    Long term prediction coefficients   */\r
195     const SKP_int16                 AR2_Q13[ NB_SUBFR * SHAPE_LPC_ORDER_MAX ],  /* I                                        */\r
196     const SKP_int                   HarmShapeGain_Q14[ NB_SUBFR ],              /* I                                        */\r
197     const SKP_int                   Tilt_Q14[ NB_SUBFR ],                       /* I    Spectral tilt                       */\r
198     const SKP_int32                 LF_shp_Q14[ NB_SUBFR ],                     /* I                                        */\r
199     const SKP_int32                 Gains_Q16[ NB_SUBFR ],                      /* I                                        */\r
200     const SKP_int                   Lambda_Q10,                                 /* I                                        */\r
201     const SKP_int                   LTP_scale_Q14                               /* I    LTP state scaling                   */\r
202 );\r
203 \r
204 /* Noise shaping using delayed decision */\r
205 void SKP_Silk_NSQ_del_dec(\r
206     SKP_Silk_encoder_state          *psEncC,                                    /* I/O  Encoder State                       */\r
207     SKP_Silk_encoder_control        *psEncCtrlC,                                /* I    Encoder Control                     */\r
208     SKP_Silk_nsq_state              *NSQ,                                       /* I/O  NSQ state                           */\r
209     const SKP_int16                 x[],                                        /* I    Prefiltered input signal            */\r
210     SKP_int                         q[],                                        /* O    Quantized pulse signal              */\r
211     const SKP_int                   LSFInterpFactor_Q2,                         /* I    LSF interpolation factor in Q2      */\r
212     const SKP_int16                 PredCoef_Q12[ 2 * MAX_LPC_ORDER ],          /* I    Prediction coefs                    */\r
213     const SKP_int16                 LTPCoef_Q14[ LTP_ORDER * NB_SUBFR ],        /* I    LT prediction coefs                 */\r
214     const SKP_int16                 AR2_Q13[ NB_SUBFR * SHAPE_LPC_ORDER_MAX ],  /* I                                        */\r
215     const SKP_int                   HarmShapeGain_Q14[ NB_SUBFR ],              /* I                                        */\r
216     const SKP_int                   Tilt_Q14[ NB_SUBFR ],                       /* I    Spectral tilt                       */\r
217     const SKP_int32                 LF_shp_Q14[ NB_SUBFR ],                     /* I                                        */\r
218     const SKP_int32                 Gains_Q16[ NB_SUBFR ],                      /* I                                        */\r
219     const SKP_int                   Lambda_Q10,                                 /* I                                        */\r
220     const SKP_int                   LTP_scale_Q14                               /* I    LTP state scaling                   */\r
221 );\r
222 \r
223 /************/\r
224 /* Silk VAD */\r
225 /************/\r
226 /* Initialize the Silk VAD */\r
227 SKP_int SKP_Silk_VAD_Init(                          /* O    Return value, 0 if success                  */ \r
228     SKP_Silk_VAD_state          *psSilk_VAD         /* I/O  Pointer to Silk VAD state                   */ \r
229 ); \r
230 \r
231 /* Silk VAD noise level estimation */\r
232 void SKP_Silk_VAD_GetNoiseLevels(\r
233     const SKP_int32             pX[ VAD_N_BANDS ],  /* I    subband energies                            */\r
234     SKP_Silk_VAD_state          *psSilk_VAD         /* I/O  Pointer to Silk VAD state                   */ \r
235 );\r
236 \r
237 /* Get speech activity level in Q8 */\r
238 SKP_int SKP_Silk_VAD_GetSA_Q8(                                  /* O    Return value, 0 if success      */\r
239     SKP_Silk_VAD_state          *psSilk_VAD,                    /* I/O  Silk VAD state                  */\r
240     SKP_int                     *pSA_Q8,                        /* O    Speech activity level in Q8     */\r
241     SKP_int                     *pSNR_dB_Q7,                    /* O    SNR for current frame in Q7     */\r
242     SKP_int                     pQuality_Q15[ VAD_N_BANDS ],    /* O    Smoothed SNR for each band      */\r
243     SKP_int                     *pTilt_Q15,                     /* O    current frame's frequency tilt  */\r
244     const SKP_int16             pIn[],                          /* I    PCM input       [framelength]   */\r
245     const SKP_int               framelength                     /* I    Input frame length              */\r
246 );\r
247 \r
248 /* Detect signal in 8 - 12 khz range */\r
249 void SKP_Silk_detect_SWB_input(\r
250     SKP_Silk_detect_SWB_state   *psSWBdetect,       /* I/O  Encoder state                               */\r
251     const SKP_int16             samplesIn[],        /* I    Input to encoder                            */\r
252     SKP_int                     nSamplesIn          /* I    Length of input                             */\r
253 );\r
254 \r
255 #if SWITCH_TRANSITION_FILTERING\r
256 /* Low-pass filter with variable cutoff frequency based on  */\r
257 /* piece-wise linear interpolation between elliptic filters */\r
258 /* Start by setting transition_frame_no = 1;                */\r
259 void SKP_Silk_LP_variable_cutoff(\r
260     SKP_Silk_LP_state           *psLP,              /* I/O  LP filter state                             */\r
261     SKP_int16                   *out,               /* O    Low-pass filtered output signal             */\r
262     const SKP_int16             *in,                /* I    Input signal                                */\r
263     const SKP_int               frame_length        /* I    Frame length                                */\r
264 );\r
265 #endif\r
266 \r
267 /****************************************************/\r
268 /* Decoder Functions                                */\r
269 /****************************************************/\r
270 SKP_int SKP_Silk_create_decoder(\r
271     SKP_Silk_decoder_state      **ppsDec            /* I/O  Decoder state pointer pointer               */\r
272 );\r
273 \r
274 SKP_int SKP_Silk_free_decoder(\r
275     SKP_Silk_decoder_state      *psDec              /* I/O  Decoder state pointer                       */\r
276 );\r
277 \r
278 SKP_int SKP_Silk_init_decoder(\r
279     SKP_Silk_decoder_state      *psDec              /* I/O  Decoder state pointer                       */\r
280 );\r
281 \r
282 /* Set decoder sampling rate */\r
283 void SKP_Silk_decoder_set_fs(\r
284     SKP_Silk_decoder_state      *psDec,             /* I/O  Decoder state pointer                       */\r
285     SKP_int                     fs_kHz              /* I    Sampling frequency (kHz)                    */\r
286 );\r
287 \r
288 /****************/\r
289 /* Decode frame */\r
290 /****************/\r
291 SKP_int SKP_Silk_decode_frame(\r
292     SKP_Silk_decoder_state      *psDec,             /* I/O  Pointer to Silk decoder state               */\r
293     SKP_int16                   pOut[],             /* O    Pointer to output speech frame              */\r
294     SKP_int16                   *pN,                /* O    Pointer to size of output frame             */\r
295     const SKP_uint8             pCode[],            /* I    Pointer to payload                          */\r
296     const SKP_int               nBytes,             /* I    Payload length                              */\r
297     SKP_int                     action,             /* I    Action from Jitter Buffer                   */\r
298     SKP_int                     *decBytes           /* O    Used bytes to decode this frame             */\r
299 );\r
300 \r
301 /* Decode parameters from payload */\r
302 void SKP_Silk_decode_parameters(\r
303     SKP_Silk_decoder_state      *psDec,             /* I/O  State                                       */\r
304     SKP_Silk_decoder_control    *psDecCtrl,         /* I/O  Decoder control                             */\r
305     SKP_int                     q[],                /* O    Excitation signal                           */\r
306     const SKP_int               fullDecoding        /* I    Flag to tell if only arithmetic decoding    */\r
307 );\r
308 \r
309 /* Decode indices from payload v4 Bitstream */\r
310 void SKP_Silk_decode_indices_v4(\r
311     SKP_Silk_decoder_state      *psDec              /* I/O  State                                       */\r
312 );\r
313 \r
314 /* Decode parameters from payload v4 Bitstream */\r
315 void SKP_Silk_decode_parameters_v4(\r
316     SKP_Silk_decoder_state      *psDec,                                 /* I/O  State                                    */\r
317     SKP_Silk_decoder_control    *psDecCtrl,                             /* I/O  Decoder control                          */\r
318     SKP_int                     q[ MAX_FRAME_LENGTH ],                  /* O    Excitation signal                        */\r
319     const SKP_int               fullDecoding                            /* I    Flag to tell if only arithmetic decoding */\r
320 );\r
321 \r
322 /* Core decoder. Performs inverse NSQ operation LTP + LPC */\r
323 void SKP_Silk_decode_core(\r
324     SKP_Silk_decoder_state      *psDec,                             /* I/O  Decoder state               */\r
325     SKP_Silk_decoder_control    *psDecCtrl,                         /* I    Decoder control             */\r
326     SKP_int16                   xq[],                               /* O    Decoded speech              */\r
327     const SKP_int               q[ MAX_FRAME_LENGTH ]               /* I    Pulse signal                */\r
328 );\r
329 \r
330 /* NLSF vector decoder */\r
331 void SKP_Silk_NLSF_MSVQ_decode(\r
332     SKP_int                         *pNLSF_Q15,     /* O    Pointer to decoded output [LPC_ORDER x 1]   */\r
333     const SKP_Silk_NLSF_CB_struct   *psNLSF_CB,     /* I    Pointer to NLSF codebook struct             */\r
334     const SKP_int                   *NLSFIndices,   /* I    Pointer to NLSF indices [nStages x 1]       */\r
335     const SKP_int                   LPC_order       /* I    LPC order                                   */\r
336 );\r
337 \r
338 /**********************/\r
339 /* Arithmetic coding */\r
340 /*********************/\r
341 \r
342 /* Decode quantization indices of excitation (Shell coding) */\r
343 void SKP_Silk_decode_pulses(\r
344     SKP_Silk_range_coder_state  *psRC,              /* I/O  Range coder state                           */\r
345     SKP_Silk_decoder_control    *psDecCtrl,         /* I/O  Decoder control                             */\r
346     SKP_int                     q[],                /* O    Excitation signal                           */\r
347     const SKP_int               frame_length        /* I    Frame length (preliminary)                  */\r
348 );\r
349 \r
350 /******************/\r
351 /* CNG */\r
352 /******************/\r
353 \r
354 /* Reset CNG */\r
355 void SKP_Silk_CNG_Reset(\r
356     SKP_Silk_decoder_state      *psDec              /* I/O  Decoder state                               */\r
357 );\r
358 \r
359 /* Updates CNG estimate, and applies the CNG when packet was lost   */\r
360 void SKP_Silk_CNG(\r
361     SKP_Silk_decoder_state      *psDec,             /* I/O  Decoder state                               */\r
362     SKP_Silk_decoder_control    *psDecCtrl,         /* I/O  Decoder control                             */\r
363     SKP_int16                   signal[],           /* I/O  Signal                                      */\r
364     SKP_int                     length              /* I    Length of residual                          */\r
365 );\r
366 \r
367 /* Encoding of various parameters */\r
368 void SKP_Silk_encode_parameters(\r
369     SKP_Silk_encoder_state      *psEncC,            /* I/O  Encoder state                               */\r
370     SKP_Silk_encoder_control    *psEncCtrlC,        /* I/O  Encoder control                             */\r
371     SKP_Silk_range_coder_state  *psRC,              /* I/O  Range coder state                           */\r
372     const SKP_int               *q                  /* I    Quantization indices                        */\r
373 );\r
374 \r
375 /* Encoding of various parameters */\r
376 void SKP_Silk_encode_parameters_v4(\r
377     SKP_Silk_encoder_state      *psEncC,            /* I/O  Encoder state                               */\r
378     SKP_Silk_encoder_control    *psEncCtrlC,        /* I/O  Encoder control                             */\r
379     SKP_Silk_range_coder_state  *psRC               /* I/O  Range encoder state                         */\r
380 );\r
381 \r
382 /* Extract lowest layer encoding */\r
383 void SKP_Silk_get_low_layer_internal(\r
384     const SKP_uint8             *indata,            /* I:   Encoded input vector                        */\r
385     const SKP_int16             nBytesIn,           /* I:   Number of input Bytes                       */\r
386     SKP_uint8                   *Layer0data,        /* O:   Layer0 payload                              */\r
387     SKP_int16                   *nLayer0Bytes       /* O:   Number of FEC Bytes                         */\r
388 );\r
389 \r
390 /* Resets LBRR buffer, used if packet size changes */\r
391 void SKP_Silk_LBRR_reset( \r
392     SKP_Silk_encoder_state      *psEncC             /* I/O  Pointer to Silk encoder state               */\r
393 );\r
394 \r
395 /* Predict number of bytes used to encode q */\r
396 SKP_int SKP_Silk_pulses_to_bytes( /* O  Return value, predicted number of bytes used to encode q */ \r
397     SKP_Silk_encoder_state      *psEncC,            /* I/O  Encoder State*/\r
398     SKP_int                     q[]                 /* I     Pulse signal */\r
399 );\r
400 \r
401 #ifdef __cplusplus\r
402 }\r
403 #endif\r
404 \r
405 #endif\r